CN115811586B - Intelligent code stream switching device and switching method - Google Patents
Intelligent code stream switching device and switching method Download PDFInfo
- Publication number
- CN115811586B CN115811586B CN202211467389.1A CN202211467389A CN115811586B CN 115811586 B CN115811586 B CN 115811586B CN 202211467389 A CN202211467389 A CN 202211467389A CN 115811586 B CN115811586 B CN 115811586B
- Authority
- CN
- China
- Prior art keywords
- code stream
- monitoring result
- standby
- monitoring
- main
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000012544 monitoring process Methods 0.000 claims abstract description 631
- 238000012545 processing Methods 0.000 claims abstract description 13
- 230000002159 abnormal effect Effects 0.000 claims description 83
- 238000013507 mapping Methods 0.000 claims description 25
- 230000003993 interaction Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 3
- 238000001824 photoionisation detection Methods 0.000 description 123
- 230000005856 abnormality Effects 0.000 description 42
- 238000004364 calculation method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010899 nucleation Methods 0.000 description 1
- 230000010287 polarization Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention relates to an intelligent code stream switching device and a switching method, which belong to the technical field of broadcast digital televisions and comprise a chassis, wherein a signal processing board and a front panel are arranged in the chassis, and the signal processing board comprises a main path code stream input unit, a main path code stream monitoring module, a standby path code stream input unit, a standby path code stream monitoring module, a mat broadcast code stream input unit, a switching judgment module, a code stream output unit and a main control CPU unit; the switching judgment module is used for respectively receiving the main channel code stream signal, the standby channel code stream signal and the unicast code stream signal, and is also used for carrying out switching selection of the code stream input unit according to the main channel monitoring result signal and the standby channel monitoring result signal and sending the code stream signal output by the switching selected code stream input unit to the code stream output unit; the main control CPU unit is used for controlling the code stream intelligent switching device. The method and the device can facilitate comprehensive judgment of the code stream quality of each input information source, so that the provided program information source is more stable and reliable.
Description
Technical Field
The application relates to the technical field of broadcast digital televisions, in particular to an intelligent code stream switching device and a switching method.
Background
With the rapid development and full popularization of broadcast television technology, television programs and broadcast programs are popular and interesting as the most convincing live programs. Because the broadcasting television program sources are wide, most of front-end broadcasting machine rooms of cable television network companies and IPTV new media are digital television programs transmitted by satellites and digital television programs transmitted by optical fibers, and then ASI or TS/IP signals are output to later-stage equipment for descrambling, decoding, transcoding and other processing.
At present, in order to obtain stable and reliable information sources at the front end of the cable television network company and the front end of the IPTV new media broadcasting, two paths of information sources of main and standby are adopted to receive the television programs, when the standby information sources are abnormal, the standby information sources are switched to the standby information sources, and when the main and standby information sources are abnormal, the two paths of information sources are switched to the pad broadcasting information sources.
With respect to the related art described above, the inventors found that there are at least the following problems in the related art: in the related art, when the main, standby and pad three-way input information sources are switched, the code stream quality of each input information source is not comprehensively judged in most cases, so that the switching is not timely and accurate enough, misjudgment is easy to occur, and the broadcasting stability of the program information source is reduced.
Disclosure of Invention
In order to provide a stable and reliable program information source, the application provides an intelligent code stream switching device and a switching method.
In a first aspect, the present application provides an intelligent switching device for code streams, which adopts the following technical scheme:
the intelligent code stream switching device comprises a case, wherein a signal processing board and a front panel are arranged in the case, the signal processing board comprises a main channel code stream input unit, a main channel code stream monitoring module, a standby channel code stream input unit, a standby channel code stream monitoring module, a mat code stream input unit, a switching judgment module, a code stream output unit and a main control CPU unit, and the front panel is used for providing display and key operation functions;
the switching judgment module is respectively connected with the main path code stream input unit, the standby path code stream input unit and the pad broadcast code stream input unit and is used for respectively receiving a main path code stream signal, a standby path code stream signal and a pad broadcast code stream signal;
the main path code stream monitoring module is connected with the main path code stream input unit and is used for monitoring the main path code stream signal and outputting a main path monitoring result signal;
the standby code stream monitoring module is connected with the standby code stream input unit and is used for monitoring the standby code stream signal and outputting a standby monitoring result signal;
The monitoring result signals comprise video monitoring result signals, audio monitoring result signals, PMT monitoring result signals and PAT monitoring result signals;
the switching judgment module is also respectively connected with the main path code stream monitoring module, the standby path code stream monitoring module and the code stream output unit, and is used for switching and selecting the code stream input unit according to the main path monitoring result signal and the standby path monitoring result signal and sending the code stream signal output by the switching and selecting code stream input unit to the code stream output unit;
the main control CPU unit is respectively and electrically connected with the front panel, the main path code stream input unit, the main path code stream monitoring module, the standby path code stream input unit, the standby path code stream monitoring module, the pad broadcasting code stream input unit, the switching judgment module and the code stream output unit and is used for controlling the code stream intelligent switching device.
By adopting the technical scheme, the main channel, the standby channel and the pad broadcast three-channel code stream input unit are adopted, the main channel code stream monitoring module and the standby channel code stream monitoring module are used for respectively monitoring the main channel code stream signal and the standby channel code stream signal, the monitoring types comprise video monitoring, audio monitoring, PMT monitoring and PAT monitoring are integrated, and the switching judgment module is used for switching and selecting the code stream input unit according to the main channel monitoring result signal and the standby channel monitoring result signal and outputting corresponding code stream signals; through the comprehensive monitoring of multiple types, the code stream quality of each input information source is convenient to comprehensively judge, so that the provided program information source is more stable and reliable, and therefore, when a certain code stream is abnormal in quality, the switching is timely and accurately performed, the requirements of the cable television network company and the IPTV new media machine room on the safe broadcasting of the broadcasting front end are met, and the user experience is improved.
Optionally, the front panel includes a display module and a key interaction module, where the display module is configured to provide a display function, and the key interaction module is configured to receive and respond to a key trigger signal to perform corresponding selection and parameter configuration.
By adopting the technical scheme, the display module is utilized to provide a display function, and the key interaction module is utilized to perform pre-configuration on parameters, preset monitoring periods, preset thresholds and the like, so that different program playing requirements of users are met conveniently, and the use experience of the users is improved.
Optionally, the main code stream monitoring module comprises a main video monitoring unit, a main audio monitoring unit, a main PMT monitoring unit, a main PAT monitoring unit and a main monitoring result output unit;
the main path video monitoring unit is used for monitoring whether the frequency of video PID errors of the main path code stream signal in a preset monitoring period exceeds a preset video PID error frequency threshold, and if so, outputting a main path video PID monitoring result signal as abnormal;
the main video monitoring unit is further configured to monitor whether the number of times of video PID continuous counting errors occurring in the main code stream signal in a preset monitoring period exceeds a preset video PID continuous counting error number threshold, and if yes, output a main video PID continuous counting monitoring result signal as abnormal;
The main channel audio monitoring unit is used for monitoring whether the frequency of audio PID errors of the main channel code stream signal in a preset monitoring period exceeds a preset audio PID error frequency threshold, and if so, outputting a main channel audio PID monitoring result signal as abnormal;
the main audio monitoring unit is further configured to monitor whether the number of times of audio PID continuous counting errors occurring in the main code stream signal in a preset monitoring period exceeds a preset audio PID continuous counting error number threshold, and if yes, output a main audio PID continuous counting monitoring result signal as abnormal;
the main channel PMT monitoring unit is used for monitoring whether the number of times of PMT errors of the main channel code stream signal in a preset monitoring period exceeds a preset PMT error number threshold, and if so, outputting a main channel PMT monitoring result signal as abnormal;
the main path PAT monitoring unit is used for monitoring whether the number of times of PAT errors of the main path code stream signal in a preset monitoring period exceeds a preset PAT error number threshold, and if yes, outputting a main path PAT monitoring result signal as an abnormality;
the main channel monitoring result output unit is respectively connected with the main channel video monitoring unit, the main channel audio monitoring unit, the main channel PMT monitoring unit and the main channel PAT monitoring unit, and is used for respectively receiving the main channel video PID monitoring result signal, the main channel video PID continuous counting monitoring result signal, the main channel audio PID continuous counting monitoring result signal, the main channel PMT monitoring result signal and the main channel PAT monitoring result signal, and generating and outputting the main channel monitoring result signal.
By adopting the technical scheme, each monitoring unit is utilized to monitor the video PID, the video PID continuous count, the audio PID continuous count, the PMT and the PAT in the main channel code stream signal respectively, and each monitoring result signal is summarized into the main channel monitoring result signal to be used as the basis of comprehensive judgment, so that the accuracy of main channel code stream quality judgment is improved.
Optionally, the backup code stream monitoring module includes a backup video monitoring unit, a backup audio monitoring unit, a backup PMT monitoring unit, a backup PAT monitoring unit and a backup monitoring result output unit;
the standby video monitoring unit is used for monitoring whether the frequency of video PID errors of the standby code stream signal in a preset monitoring period exceeds a preset video PID error frequency threshold, and if so, outputting a standby video PID monitoring result signal as abnormal;
the standby video monitoring unit is further configured to monitor whether the number of times of video PID continuous counting errors occurring in the standby code stream signal in a preset monitoring period exceeds a preset video PID continuous counting error number threshold, and if yes, output a standby video PID continuous counting monitoring result signal as abnormal;
The standby audio monitoring unit is used for monitoring whether the frequency of audio PID errors of the standby code stream signal in a preset monitoring period exceeds a preset audio PID error frequency threshold, and if so, outputting a standby audio PID monitoring result signal as abnormal;
the standby audio monitoring unit is further configured to monitor whether the number of times of audio PID continuous counting errors occurring in the standby code stream signal in a preset monitoring period exceeds a preset audio PID continuous counting error number threshold, and if yes, output a standby audio PID continuous counting monitoring result signal as abnormal;
the standby channel PMT monitoring unit is used for monitoring whether the number of times of PMT errors of the standby channel code stream signal in a preset monitoring period exceeds a preset PMT error number threshold, and if so, outputting a standby channel PMT monitoring result signal as abnormal;
the backup path PAT monitoring unit is configured to monitor whether the number of times of occurrence of PAT errors of the backup path code stream signal in a preset monitoring period exceeds a preset PAT error number threshold, and if yes, output a backup path PAT monitoring result signal as an anomaly;
the standby path monitoring result output unit is respectively connected with the standby path video monitoring unit, the standby path audio monitoring unit, the standby path PMT monitoring unit and the standby path PAT monitoring unit, and is used for respectively receiving the standby path video PID monitoring result signal, the standby path video PID continuous counting monitoring result signal, the standby path audio PID continuous counting monitoring result signal, the standby path PMT monitoring result signal and the standby path PAT monitoring result signal, and generating and outputting the standby path monitoring result signal.
By adopting the technical scheme, each monitoring unit is utilized to monitor the video PID, the video PID continuous count, the audio PID continuous count, the PMT and the PAT in the standby code stream signal respectively, and each monitoring result signal is summarized into the standby monitoring result signal to be used as the basis of comprehensive judgment, so that the accuracy of the quality judgment of the standby code stream is improved.
Optionally, the switching decision module includes a code stream error index generating unit, a main path decision unit, a standby path decision unit, a unicast decision unit and an auxiliary decision unit;
the code stream error index generation unit is used for respectively generating a corresponding main channel code stream error index and a corresponding standby channel code stream error index according to the main channel monitoring result signal and the standby channel monitoring result signal;
the main path judging unit is connected with the code stream error index generating unit and is used for judging whether the standby path code stream error index is smaller than the main path code stream error index when the current switching selection code stream input unit is the main path code stream input unit, and if so, switching selection is carried out to the standby path code stream input unit;
the standby path judging unit is connected with the code stream error index generating unit and is used for judging whether the main path code stream error index is smaller than or equal to the standby path code stream error index when the current switching selection code stream input unit is the standby path code stream input unit, and switching selection to the main path code stream input unit if the main path code stream error index is smaller than or equal to the standby path code stream error index;
The auxiliary judging unit is used for judging according to the main channel monitoring result signal and the standby channel monitoring result signal when the current switching selected code stream input unit is a main channel code stream input unit or a standby channel code stream input unit, judging whether the standby channel PMT monitoring result signal and/or the standby channel PAT monitoring result signal are abnormal or not if the main channel PMT monitoring result signal and/or the main channel PAT monitoring result signal are abnormal, and switching to the unicast code stream input unit if the main channel PMT monitoring result signal and the standby channel PAT monitoring result signal are abnormal;
the main channel PMT monitoring result signal and/or the main channel PAT monitoring result signal are/is judged to be abnormal according to the main channel monitoring result signal when the currently switched and selected code stream input unit is the padded code stream input unit, and if not, the main channel PMT monitoring result signal and/or the main channel PAT monitoring result signal are/is switched and selected to the main channel code stream input unit; if yes, judging whether the standby PMT monitoring result signal and/or the standby PAT monitoring result signal are abnormal or not according to the standby monitoring result signal, and if not, switching and selecting to the standby code stream input unit.
By adopting the technical scheme, when the current source is a main input source or a standby input source, comparing the main code stream error index with the standby code stream error index, when the two code stream error indexes are unequal, preferentially selecting the source with smaller code stream error index to perform main-standby channel switching, when the two code stream error indexes are equal, preferentially switching and selecting the source to the main input source, and when the main input source has PMT abnormality and/or PAT abnormality, if the standby input source also has PMT abnormality and/or PAT abnormality, switching to the unicast input source; when the current is the unicast input information source, if the main input information source does not have PMT abnormality and/or PAT abnormality, switching to the main input information source, and if the main input information source has PMT abnormality and/or PAT abnormality, and the standby input information source does not have PMT abnormality and/or PAT abnormality, switching to the standby input information source; the code stream quality of the main and standby input information sources is comprehensively judged, and the condition of switching judgment is refined, so that the program information source with more reliable code stream quality is provided for a user, and the stability of program broadcasting is improved.
Optionally, the code stream error index generating unit comprises a main path code stream error index generating unit and a standby path code stream error index generating unit;
the main channel code stream error index generation unit is used for accumulating preset error indexes corresponding to abnormal monitoring result signals in main channel monitoring result signals according to a preset mapping table to obtain main channel code stream error indexes;
the backup code stream error index generation unit is used for accumulating preset error indexes corresponding to abnormal monitoring result signals in backup monitoring result signals according to a preset mapping table to obtain the backup code stream error indexes;
the preset mapping table comprises a plurality of groups of preset error indexes corresponding to the monitoring result signals, and each monitoring result signal corresponds to one preset error index.
By adopting the technical scheme, the preset mapping table is preconfigured, each monitoring result signal is respectively provided with a corresponding preset error index according to the influence degree of the monitoring content on the code stream quality, the preset error indexes corresponding to the monitoring result signals with the abnormality in the main path monitoring result signals are accumulated to obtain the main path code stream error indexes, the preset error indexes corresponding to the monitoring result signals with the abnormality in the standby path monitoring result signals are accumulated to obtain the standby path code stream error indexes, and the main path code stream error indexes and the standby path code stream error indexes are obtained through calculation, so that the code stream quality conditions of the main path and the standby path can be judged and compared conveniently.
In a second aspect, the present application provides a method for intelligently switching a code stream, which adopts the following technical scheme:
the intelligent code stream switching method is applied to the intelligent code stream switching device of the first aspect, and comprises the following steps:
receiving the main channel code stream signal, the standby channel code stream signal and the unicast code stream signal respectively;
receiving the main path monitoring result signal and the standby path monitoring result signal; the monitoring result signals comprise video monitoring result signals, audio monitoring result signals, PMT monitoring result signals and PAT monitoring result signals;
and switching and selecting the code stream input unit according to the main path monitoring result signal and the standby path monitoring result signal, and sending the code stream signal output by the code stream input unit which is switched and selected to the code stream output unit.
By adopting the technical scheme, the main channel, the standby channel and the pad broadcast three-channel code stream input units are adopted to monitor the main channel code stream signal and the standby channel code stream signal respectively, the monitoring types comprise video monitoring, audio monitoring, PMT monitoring and PAT monitoring are integrated, and the switching judgment module performs switching selection of the code stream input units according to the main channel monitoring result signal and the standby channel monitoring result signal and outputs corresponding code stream signals; through the comprehensive monitoring of multiple types, the code stream quality of each input information source is convenient to comprehensively judge, so that the provided program information source is more stable and reliable, and therefore, when a certain code stream is abnormal in quality, the switching is timely and accurately performed, the requirements of the cable television network company and the IPTV new media machine room on the safe broadcasting of the broadcasting front end are met, and the user experience is improved.
Optionally, the step of performing switching selection of the code stream input unit according to the main path monitoring result signal and the standby path monitoring result signal includes: when the current switching selected code stream input unit is a main channel code stream input unit, respectively generating a corresponding main channel code stream error index and a corresponding standby channel code stream error index according to the main channel monitoring result signal and the standby channel monitoring result signal, judging whether the standby channel code stream error index is smaller than the main channel code stream error index, and if yes, switching to the standby channel code stream input unit;
when the current switching selected code stream input unit is a standby code stream input unit, respectively generating a corresponding main code stream error index and standby code stream error index according to the main channel monitoring result signal and the standby monitoring result signal, judging whether the main code stream error index is smaller than or equal to the standby code stream error index, and if yes, switching to the main code stream input unit;
when the current switching selected code stream input unit is a main path code stream input unit or a standby path code stream input unit, judging according to the main path monitoring result signal and the standby path monitoring result signal, if the main path PMT monitoring result signal and/or the main path PAT monitoring result signal are abnormal, judging whether the standby path PMT monitoring result signal and/or the standby path PAT monitoring result signal are abnormal, and if so, switching to the mat broadcasting code stream input unit;
When the current switching selected code stream input unit is a mat code stream input unit, judging whether the main channel PMT monitoring result signal and/or the main channel PAT monitoring result signal are abnormal or not according to the main channel monitoring result signal, and if not, switching to the main channel code stream input unit; if yes, judging whether the standby PMT monitoring result signal and/or the standby PAT monitoring result signal are abnormal or not according to the standby monitoring result signal, and if not, switching and selecting to the standby code stream input unit.
By adopting the technical scheme, when the current source is a main input source or a standby input source, comparing the main code stream error index with the standby code stream error index, when the two code stream error indexes are unequal, preferentially selecting the source with smaller code stream error index to perform main-standby channel switching, when the two code stream error indexes are equal, preferentially switching and selecting the source to the main input source, and when the main input source has PMT abnormality and/or PAT abnormality, if the standby input source also has PMT abnormality and/or PAT abnormality, switching to the unicast input source; when the current is the unicast input information source, if the main input information source does not have PMT abnormality and/or PAT abnormality, switching to the main input information source, and if the main input information source has PMT abnormality and/or PAT abnormality, and the standby input information source does not have PMT abnormality and/or PAT abnormality, switching to the standby input information source; the method has the advantages that the main code stream quality and the standby code stream quality are compared, the main code stream is selected and switched to be a better input information source, and corresponding code stream signals are output, so that the program information source with more reliable code stream quality is provided for users, and the stability of program broadcasting is improved.
Optionally, the step of generating the corresponding main code stream error index and the corresponding standby code stream error index according to the main channel monitoring result signal and the standby monitoring result signal respectively includes:
accumulating preset error indexes corresponding to abnormal monitoring result signals in the main channel monitoring result signals according to a preset mapping table to obtain the main channel code stream error indexes;
accumulating preset error indexes corresponding to abnormal monitoring result signals in the standby channel monitoring result signals according to a preset mapping table to obtain the standby channel code stream error indexes;
the preset mapping table comprises a plurality of groups of preset error indexes corresponding to the monitoring result signals, and each monitoring result signal corresponds to one preset error index.
By adopting the technical scheme, the preset mapping table is preconfigured, each monitoring result signal is respectively provided with a corresponding preset error index according to the influence degree of the monitoring content on the code stream quality, the preset error indexes corresponding to the monitoring result signals with the abnormality in the main path monitoring result signals are accumulated to obtain the main path code stream error indexes, the preset error indexes corresponding to the monitoring result signals with the abnormality in the standby path monitoring result signals are accumulated to obtain the standby path code stream error indexes, and the main path code stream error indexes and the standby path code stream error indexes are obtained through calculation, so that the code stream quality conditions of the main path and the standby path can be judged and compared conveniently.
In a third aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer readable storage medium storing a computer program capable of being loaded by a processor and executing any one of the methods of the second aspect.
Drawings
Fig. 1 is a block diagram of a code stream intelligent switching device according to one embodiment of the present application.
Fig. 2 is a block diagram of a main-way code stream monitoring module according to one embodiment of the present application.
Fig. 3 is a block diagram of a backup code stream monitoring module according to one embodiment of the present application.
Fig. 4 is a block diagram of a handover decision module according to one embodiment of the present application.
Fig. 5 is a flow chart of a method for intelligent switching of a code stream according to one embodiment of the present application.
Reference numerals illustrate: 1. a chassis; 2. a signal processing board; 21. a main code stream input unit; 22. a main code stream monitoring module; 221. a main video monitoring unit; 222. a main path audio monitoring unit; 223. a main channel PMT monitoring unit; 224. a main path PAT monitoring unit; 225. a main path monitoring result output unit; 23. a standby code stream input unit; 24. the standby code stream monitoring module; 241. a standby video monitoring unit; 242. a standby audio monitoring unit; 243. a standby PMT monitoring unit; 244. a backup path PAT monitoring unit; 245. a standby monitoring result output unit; 25. a code stream input unit for broadcasting; 26. a switching judgment module; 261. a code stream error index generation unit; 262. a main path judging unit; 263. a standby judgment unit; 264. a seeding judgment unit; 265. an auxiliary judgment unit; 27. a code stream output unit; 28. a main control CPU unit; 3. a front panel; 4. and a power panel.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to fig. 1 to 5 and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The embodiment of the application discloses an intelligent code stream switching device.
Referring to fig. 1, an intelligent code stream switching device includes a chassis 1, a signal processing board 2, a front panel 3 and a power panel 4 are disposed in the chassis 1, the signal processing board 2 is connected with the power panel 4 and the front panel 3 through wires, the signal processing board 2 includes a main channel code stream input unit 21, a main channel code stream monitoring module 22, a standby channel code stream input unit 23, a standby channel code stream monitoring module 24, a mat code stream input unit 25, a switching decision module 26, a code stream output unit 27 and a main control CPU unit 28, and the front panel 3 is used for providing display and key operation functions;
the switching decision module 26 is respectively connected to the main-path code stream input unit 21, the standby-path code stream input unit 23 and the mat-broadcasting code stream input unit 25, and is configured to respectively receive the main-path code stream signal output by the main-path code stream input unit 21, the standby-path code stream signal output by the standby-path code stream input unit 23 and the mat-broadcasting code stream signal output by the mat-broadcasting code stream input unit 25;
The main code stream monitoring module 22 is connected to the main code stream input unit 21, and is configured to monitor a main code stream signal and output a main monitoring result signal;
the standby code stream monitoring module 24 is connected to the standby code stream input unit 23, and is configured to monitor a standby code stream signal and output a standby monitoring result signal;
the monitoring result signals comprise video monitoring result signals, audio monitoring result signals, PMT monitoring result signals and PAT monitoring result signals;
the switching decision module 26 is further connected to the main-path code stream monitoring module 22, the standby-path code stream monitoring module 24, and the code stream output unit 27, and is configured to perform switching selection of the code stream input unit according to the main-path monitoring result signal and the standby-path monitoring result signal, and send the code stream signal output by the switching selected code stream input unit to the code stream output unit 27;
the main control CPU unit 28 is electrically connected to the front panel 3, the main channel code stream input unit 21, the main channel code stream monitoring module 22, the standby channel code stream input unit 23, the standby channel code stream monitoring module 24, the unicast code stream input unit 25, the switching decision module 26, and the code stream output unit 27, respectively, and is used for controlling the intelligent code stream switching device.
In the above embodiment, the main channel, the standby channel and the pad broadcast three-channel code stream input units are adopted, the main channel code stream monitoring module 22 and the standby channel code stream monitoring module 24 are utilized to monitor the main channel code stream signal and the standby channel code stream signal respectively, the monitoring types not only include video monitoring, but also integrate audio monitoring, PMT monitoring and PAT monitoring, and the switching decision module 26 performs switching selection of the code stream input units according to the main channel monitoring result signal and the standby channel monitoring result signal and outputs corresponding code stream signals; through the comprehensive monitoring of multiple types, the code stream quality of each input information source is convenient to comprehensively judge, so that the provided program information source is more stable and reliable, and therefore, when a certain code stream is abnormal in quality, the switching is timely and accurately performed, the requirements of the cable television network company and the IPTV new media machine room on the safe broadcasting of the broadcasting front end are met, and the user experience is improved.
As an implementation mode of the case 1, the case 1 adopts a standard case 1 with the width of 19 inches and the height of 1U, and can be suitable for being installed and used in a standard cabinet with the width of 19 inches, wherein the height occupied by equipment installation in the standard cabinet with the width of 19 inches is represented by a special unit 'U', and 1 u=44.45 mm; all functions are integrated in the case 1, and the high integration and low cost of the product are realized through the embedded SOC chip.
As an embodiment of the front panel 3, the front panel 3 includes a display module for providing a display function for inputting information sources, configuration parameters, and the like, and a key interaction module for receiving and responding to key trigger signals to perform corresponding selection and parameter configuration. In this embodiment, the display module may be an LCD liquid crystal display screen, the key interaction module may be a key panel, and the key trigger signal is a trigger signal generated when the user performs key interaction with the key interaction module, so that the user may configure various parameters, preset monitoring periods, preset thresholds and the like in advance or select an input information source through the key interaction module, thereby being convenient for meeting different program playing requirements of the user and improving the use experience of the user.
As an implementation manner of the main-path code stream input unit 21 and the standby-path code stream input unit 23, a user can display and select the sources of the main-path code stream input unit 21 and the standby-path code stream input unit 23 through the front panel 3, wherein the selectable sources comprise any one of DVB-S/S2 satellite signals, ASI and TS/IP input sources, and meanwhile, the front panel 3 is used for configuring input parameters of the selected input sources.
If the DVB-S/S2 satellite signal is selected to be input to the source, parameters such as a receiving frequency point, a symbol rate, a polarization mode and the like can be displayed and configured through the front panel 3, and then the main code stream input unit 21 or the standby code stream input unit 23 is utilized to automatically perform signal locking and demodulation processing on the radio frequency signal, so as to output a parallel code stream signal; if an ASI input source is selected, parameter setting is not needed, the main path code stream input unit 21 or the standby path code stream input unit 23 is utilized to lock the input signal automatically, and the serial code stream input by the ASI is converted into parallel code stream to be output; if a TS/IP input source is selected, parameters such as unicast/multicast, IP input address, IP input port number and the like are displayed and selected in operation through the front panel 3 according to the output parameters of the upper-level equipment, the input signal is automatically locked by the main path code stream input unit 21 or the standby path code stream input unit 23, and the TS code stream data packets encapsulated by the IP are unpackaged to output parallel code stream signals; in addition, TS/IP input also supports the code stream input sources in UDP and RTP formats.
As an embodiment of the unicast code stream input unit 25, the optional sources of the unicast code stream input unit 25 include ASI input sources and TS/IP input sources, which can be selected by the front panel 3, and the front panel 3 can be used to perform input parameter configuration after selecting the sources.
If an ASI input source is selected, parameter setting is not needed, and the input signal is automatically locked by using the mat code stream input unit 25, and a serial code stream input by the ASI is converted into a parallel code stream to be output; if a TS/IP input source is selected, parameters such as unicast/multicast, IP input address, IP input port number and the like are displayed and selected in operation through the front panel 3 according to the output parameters of the upper-level equipment, the input signal is automatically locked by using the mat code stream input unit 25, and the TS code stream data packets encapsulated by the IP are decapsulated to output parallel code stream signals; in addition, TS/IP input also supports the code stream input sources in UDP and RTP formats.
As an implementation mode of the main path monitoring result signal and the standby path monitoring result signal, the main path monitoring result signal comprises a main path video monitoring result signal, a main path audio monitoring result signal, a main path PMT monitoring result signal and a main path PAT monitoring result signal; the standby channel monitoring result signals comprise standby channel video monitoring result signals, standby channel audio monitoring result signals, standby channel PMT monitoring result signals and standby channel PAT monitoring result signals;
the main video monitoring result signals comprise main video PID monitoring result signals and main video PID continuous counting monitoring result signals, the main audio monitoring result signals comprise main audio PID monitoring result signals and main audio PID continuous counting monitoring result signals, the standby video monitoring result signals comprise standby video PID monitoring result signals and standby video PID continuous counting monitoring result signals, and the standby audio monitoring result signals comprise standby audio PID monitoring result signals and standby audio PID continuous counting monitoring result signals.
As an embodiment of the code stream output unit 27, the code stream output unit 27 is configured to perform output setting and code stream format conversion processing according to the output parameters configured by the front panel 3, and output the processed code stream to the subsequent device.
In the above embodiment, the code stream output signal of the code stream switching apparatus may be used as an input source of a device such as a post-decoder or a multiplexer, and support ASI output and TS/IP output.
Referring to fig. 2, as an embodiment of the main-path code stream monitoring module 22, the main-path code stream monitoring module 22 includes a main-path video monitoring unit 221, a main-path audio monitoring unit 222, a main-path PMT monitoring unit 223, a main-path PAT monitoring unit 224, and a main-path monitoring result output unit 225;
the main video monitoring unit 221 is configured to monitor whether the number of times of video PID errors occurring in the main code stream signal in a preset monitoring period exceeds a preset video PID error number threshold, and if yes, output a main video PID monitoring result signal as abnormal;
the main video monitoring unit 221 is further configured to monitor whether the number of times of video PID continuous counting errors occurring in the main code stream signal in a preset monitoring period exceeds a preset video PID continuous counting error number threshold, and if yes, output a main video PID continuous counting monitoring result signal as abnormal;
The main audio monitoring unit 222 is configured to monitor whether the number of times of audio PID errors occurring in the main code stream signal in a preset monitoring period exceeds a preset audio PID error number threshold, and if yes, output that the main audio PID monitoring result signal is abnormal;
the main audio monitoring unit 222 is further configured to monitor whether the number of times of audio PID continuous counting errors occurring in the main code stream signal in the preset monitoring period exceeds a preset audio PID continuous counting error number threshold, and if yes, output a main audio PID continuous counting monitoring result signal as abnormal;
the main channel PMT monitoring unit 223 is configured to monitor whether the number of PMT errors occurring in the main channel code stream signal in a preset monitoring period exceeds a preset PMT error number threshold, and if yes, output a main channel PMT monitoring result signal as abnormal;
the main path PAT monitoring unit 224 is configured to monitor whether the number of times of PAT errors occurring in the main path code stream signal in a preset monitoring period exceeds a preset PAT error number threshold, and if yes, output a main path PAT monitoring result signal as an anomaly;
the main channel monitoring result output unit 225 is respectively connected to the main channel video monitoring unit 221, the main channel audio monitoring unit 222, the main channel PMT monitoring unit 223, and the main channel PAT monitoring unit 224, and is configured to respectively receive the main channel video PID monitoring result signal, the main channel video PID continuous count monitoring result signal, the main channel audio PID continuous count monitoring result signal, the main channel PMT monitoring result signal, and the main channel PAT monitoring result signal, and generate and output the main channel monitoring result signal.
In the above embodiment, each monitoring unit is used to monitor the video PID, the video PID continuous count, the audio PID continuous count, the PMT and the PAT in the main channel code stream signal, and collect each monitoring result signal as the main channel monitoring result signal to be used as the basis of comprehensive judgment, thereby improving the accuracy of main channel code stream quality judgment.
Referring to fig. 3, as an embodiment of the backup code stream monitoring module 24, the backup code stream monitoring module 24 includes a backup video monitoring unit 241, a backup audio monitoring unit 242, a backup PMT monitoring unit 243, a backup PAT monitoring unit 244, and a backup monitoring result output unit 245;
the standby video monitoring unit 241 is configured to monitor whether the number of times of video PID errors occurring in the standby code stream signal in a preset monitoring period exceeds a preset video PID error number threshold, and if yes, output a standby video PID monitoring result signal as abnormal;
the standby video monitoring unit 241 is further configured to monitor whether the number of times of video PID continuous counting errors occurring in the standby code stream signal in a preset monitoring period exceeds a preset video PID continuous counting error number threshold, and if yes, output a standby video PID continuous counting monitoring result signal as abnormal;
The standby audio monitoring unit 242 is configured to monitor whether the number of times of audio PID errors occurring in the standby code stream signal in a preset monitoring period exceeds a preset audio PID error number threshold, and if yes, output a standby audio PID monitoring result signal as abnormal;
the standby audio monitoring unit 242 is further configured to monitor whether the number of times of audio PID continuous counting errors occurring in the standby code stream signal in a preset monitoring period exceeds a preset audio PID continuous counting error number threshold, and if yes, output a standby audio PID continuous counting monitoring result signal as abnormal;
the standby PMT monitoring unit 243 is configured to monitor whether the number of PMT errors occurring in the standby code stream signal in a preset monitoring period exceeds a preset PMT error number threshold, and if yes, output a standby PMT monitoring result signal as an anomaly;
the backup PAT monitoring unit 244 is configured to monitor whether the number of times that the backup PAT code stream signal generates PAT errors in a preset monitoring period exceeds a preset PAT error number threshold, and if yes, output a backup PAT monitoring result signal as an anomaly;
the standby channel monitoring result output unit 245 is respectively connected to the standby channel video monitoring unit 241, the standby channel audio monitoring unit 242, the standby channel PMT monitoring unit 243 and the standby channel PAT monitoring unit 244, and is configured to receive the standby channel video PID monitoring result signal, the standby channel video PID continuous count monitoring result signal, the standby channel audio PID continuous count monitoring result signal, the standby channel PMT monitoring result signal and the standby channel PAT monitoring result signal, respectively, and generate and output the standby channel monitoring result signal.
In the above embodiment, each monitoring unit is used to monitor the video PID, the video PID continuous count, the audio PID continuous count, the PMT and the PAT in the standby code stream signal, and collect each monitoring result signal as a standby monitoring result signal to be used as a basis for comprehensive judgment, thereby improving the accuracy of the quality judgment of the standby code stream.
As an implementation mode for monitoring whether video PID errors occur, whether each video PID has a code stream or not is detected, and if no code stream indicates that decoding of the service cannot be completed, namely that video PID errors occur; when video PID errors occur, the receiving end may have anomalies such as black screens, static frames, mosaics, etc.
As an embodiment for monitoring whether a video PID continuous counting error occurs, there is a 4-bit continuity counter in the header of the TS packet, which is incremented with an increase in the number of TS packets having the same PID, and when the maximum value of the counter is reached, a new counting is started again from 0; when the conditions of video PID packet loss, repeated packets or error packet sequence in the TS stream are found, the continuous counting error of the video PID can be judged to occur; when video PID consecutive count errors occur, a situation may occur in which the decoder cannot be mosaic-patterned.
As an implementation mode for monitoring whether audio PID errors occur, whether each audio PID has a code stream or not is detected, and if the code stream does not exist, decoding of the service cannot be completed, namely that the audio PID errors occur; when an audio PID error occurs, the receiving end may experience an abnormality such as sound stuck, silence, etc.
As an embodiment for monitoring whether an audio PID continuous counting error occurs, there is a 4-bit continuity counter in the header of the TS packet, which is incremented with an increase in the number of TS packets having the same PID, and when the counter maximum value is reached, a new count is started again from 0; when the conditions of packet loss, repeated packets or error packet sequence and the like of the audio PID in the TS stream are found, the audio PID continuous counting error can be judged to occur; when an audio PID continuous count error occurs, a sound stuck condition may occur at the receiving end.
As an embodiment for monitoring whether PMT errors occur, PMT is a program map table indicating PIDs of audio streams, video streams, and program reference clocks PCR for each service; if the encryption control field of the header of the PMT packet is not 0, the PMT packet arrives overtime or is lost, and the like, the PMT error can be judged to occur; in addition, when PMT is wrong, there may be a case where the receiving end cannot search for a program or a program search error.
As one embodiment for monitoring whether a PAT error occurs, PAT is a program association table, and when it is found that a PAT packet is lost, time-out, no content in the packet, or an encryption control field in the packet header is not 0, it can be determined that a PAT error occurs; when the PAT is wrong, the receiving end may not search for the program or the program searching error may occur.
It should be noted that, the above-mentioned preset monitoring period, preset video PID error frequency threshold, preset video PID continuous count error frequency threshold, preset audio PID continuous count error frequency threshold, preset PMT error frequency threshold, and preset PAT error frequency threshold may be preconfigured through the front panel 3 in combination with actual conditions or according to historical experience.
Referring to fig. 4, as an embodiment of the handover decision unit, the handover decision module 26 includes a bit stream error index generation unit 261, a main path decision unit 262, an alternate path decision unit 263, a unicast decision unit 264, and an auxiliary decision unit 265;
the code stream error index generating unit 261 is configured to generate a corresponding main channel code stream error index and a corresponding standby channel code stream error index according to the main channel monitoring result signal and the standby channel monitoring result signal, respectively;
The code stream error index is used for reflecting the condition of the code stream quality output by an input information source, and the larger the code stream error index is, the more errors occur in the code stream, and the worse the code stream quality is;
the main path decision unit 262 is connected to the code stream error index generation unit 261, and is configured to determine whether the spare path code stream error index is smaller than the main path code stream error index when the currently selected code stream input unit is the main path code stream input unit 21, and if yes, switch to the spare path code stream input unit 23;
wherein, the smaller the code stream error index is, the better the code stream quality is, so when the code stream quality of the standby channel is better than the code stream quality of the main channel, the standby channel can be switched to the code stream input unit 23;
the backup path judging unit 263 is connected to the code stream error index generating unit 261, and is configured to judge whether the error index of the main path code stream is less than or equal to the error index of the backup path code stream when the current switching selected code stream input unit is the backup path code stream input unit 23, and if yes, switch to the main path code stream input unit 21;
wherein, the smaller the code stream error index is, the better the code stream quality is, so when the main channel code stream quality is better than the standby channel code stream quality, the main channel code stream input unit 21 can be switched;
The auxiliary decision unit 265 is configured to determine, when the currently selected code stream input unit is the main-path code stream input unit 21 or the standby-path code stream input unit 23, according to the main-path monitoring result signal and the standby-path monitoring result signal, if the main-path PMT monitoring result signal and/or the main-path PAT monitoring result signal are abnormal, determine whether the standby-path PMT monitoring result signal and/or the standby-path PAT monitoring result signal are abnormal, and if so, switch to the unicast code stream input unit 25;
when the main channel PMT monitoring result signal and/or the main channel PAT monitoring result signal are/is abnormal, and the standby channel PMT monitoring result signal and/or the standby channel PAT monitoring result signal are/is also abnormal, that is, the code streams input by the main channel PMT and the standby channel PMT and/or the standby channel PAT monitoring result signal cannot be correctly analyzed, it can be judged that the quality of the code streams in the main channel PMT and the standby channel PMT and/or the standby channel PAT monitoring result signal are/is abnormal, and the code streams can be switched to the unicast code stream input unit 25;
the padding decision unit 264 is configured to determine whether an abnormality occurs in the main path PMT monitoring result signal and/or the main path PAT monitoring result signal according to the main path monitoring result signal when the currently selected code stream input unit is the padding code stream input unit 25, and if not, switch to the main path code stream input unit 21; if so, judging whether the standby PMT monitoring result signal and/or the standby PAT monitoring result signal are abnormal according to the standby monitoring result signal, and if not, switching and selecting to the standby code stream input unit 23.
When the current is the mat code stream input, judging whether the main channel PMT monitoring result signal and/or the main channel PAT monitoring result signal are abnormal, and if not, switching to the main channel code stream input unit 21 according to a main channel priority principle; if there is an abnormality, it is determined whether or not an abnormality occurs in the backup PMT monitoring result signal and/or the backup PAT monitoring result signal, and if there is no abnormality, it is switched to the backup code stream input unit 23.
In this embodiment, the code stream error index generating unit 261, the main path decision unit 262, the standby path decision unit 263, the mat decision unit 264, and the auxiliary decision unit 265 are all electrically connected with the main control CPU unit 28.
In the above embodiment, when the current source is a main input source or a standby input source, the main code stream error index and the standby code stream error index are compared, when the two code stream error indexes are unequal, the source with smaller code stream error index is preferentially selected to switch the main and standby channels, when the two code stream error indexes are equal, the source is preferentially switched to the main input source, when the main input source has PMT abnormality and/or PAT abnormality, if the standby input source also has PMT abnormality and/or PAT abnormality, the source is switched to the unicast input source; when the current is the unicast input information source, if the main input information source does not have PMT abnormality and/or PAT abnormality, switching to the main input information source, and if the main input information source has PMT abnormality and/or PAT abnormality, and the standby input information source does not have PMT abnormality and/or PAT abnormality, switching to the standby input information source; the code stream quality of the main and standby input information sources is comprehensively judged, and the condition of switching judgment is refined, so that the program information source with more reliable code stream quality is provided for a user, and the stability of program broadcasting is improved.
As an embodiment of the code stream error index generation unit 261, the code stream error index generation unit 261 includes a main-path code stream error index generation unit and a standby-path code stream error index generation unit;
the main channel code stream error index generation unit is used for accumulating preset error indexes corresponding to abnormal monitoring result signals in the main channel monitoring result signals according to a preset mapping table to obtain main channel code stream error indexes;
the standby code stream error index generation unit is used for accumulating preset error indexes corresponding to abnormal monitoring result signals in the standby monitoring result signals according to a preset mapping table to obtain standby code stream error indexes;
the preset mapping table includes preset error indexes corresponding to multiple groups of monitoring result signals, each monitoring result signal corresponds to one preset error index, and the preset mapping table can be preconfigured through the front panel 3.
In the above embodiment, a preset mapping table is preset, each monitoring result signal sets a corresponding preset error index according to the influence degree of the monitoring content on the quality of the code stream, then the preset error indexes corresponding to the abnormal monitoring result signals in the main channel monitoring result signals are accumulated to obtain the main channel code stream error index, the preset error indexes corresponding to the abnormal monitoring result signals in the standby channel monitoring result signals are accumulated to obtain the standby channel code stream error index, and the main channel code stream error index and the standby channel code stream error index are obtained through calculation, so that the code stream quality conditions of the main channel and the standby channel are conveniently judged and compared, and the code stream with better health is selected for decoding and outputting.
It should be noted that the above-mentioned monitoring result signals include a video PID monitoring result signal, a video PID continuous count monitoring result signal, an audio PID continuous count monitoring result signal, a PMT monitoring result signal, and a PAT monitoring result signal; when only one of the main code stream or the standby code stream is abnormal, the corresponding code stream error index is the preset error index corresponding to the monitoring result signal; when the main channel code stream or the standby channel code stream has multiple monitoring result signals which are abnormal, the corresponding code stream error index is the sum of the preset error indexes corresponding to all the abnormal monitoring result signals.
As an implementation manner of the preset mapping table, the preset mapping table includes preset error indexes corresponding to multiple groups of monitoring result signals, each monitoring result signal is correspondingly provided with one preset error index, and each monitoring result signal is further provided with a corresponding error level, and the higher the error level is, the larger the corresponding preset error index is.
In this embodiment, the monitoring result signals are classified into three levels according to the severity of the error, the severity of the first level error is the highest, and the corresponding preset error index is the largest, wherein the PMT monitoring result signals and PAT monitoring result signals are abnormal, that is, the first level error is corresponding to the occurrence of the abnormality; the severity of the second-level error is higher, and the corresponding preset error index is larger, wherein the video PID monitoring result signal and the video PID continuous counting monitoring result signal are corresponding to the second-level error; the third level error has the lowest severity, and the corresponding preset error index is the lowest, wherein the audio PID monitoring result signal and the audio PID continuous counting monitoring result signal are corresponding to the third level error.
In addition, it should be emphasized that the preset error index corresponding to the monitoring result signal of the first level error is greater than the sum of the preset error indexes corresponding to the monitoring result signals of all the second level errors and the third level errors, and the preset error index corresponding to the monitoring result signal of the second level error is greater than the sum of the preset error indexes corresponding to the monitoring result signals of all the third level errors; for example, in the present embodiment, the occurrence of abnormality in the PMT monitoring result signal and the PAT monitoring result signal corresponds to a first level error, and the preset error indexes corresponding to the PMT monitoring result signal and the PAT monitoring result signal are both set to 9; the video PID monitoring result signal and the video PID continuous counting monitoring result signal are both corresponding to the second level error, and the preset error indexes corresponding to the video PID monitoring result signal and the video PID continuous counting monitoring result signal are both set to be 3; the audio PID monitoring result signal and the audio PID continuous counting monitoring result signal are respectively corresponding to a third level error, and the preset error indexes corresponding to the audio PID monitoring result signal and the audio PID continuous counting monitoring result signal are respectively 1.
In the above embodiment, when PMT error or PAT error occurs in the code stream, the decoding end may not correctly analyze the TS code stream structure, so that the decoded audio/video signal may not be obtained; when the video PID error occurs in the code stream, the decoding end can not decode the video correctly, so that the situation of mosaic and even black screen appears in the video; when the code stream has audio PID error, the decoding end can not decode the audio correctly, thereby causing audio jamming or even silence; therefore, when PMT errors or PAT errors occur, the post-equipment of the machine room may not normally work, which affects not only the stability of the post-equipment of the machine room, but also the user experience, so that the preset error index is the highest and far higher than the preset error index corresponding to the audio/video problem, and the audio/video problem only affects the user experience, and the viewing experience brought by the video is more visual relative to the audio, so that the viewing experience of the user can be directly affected, and therefore, the preset error index corresponding to the video is relatively higher, and the preset error index corresponding to the audio is relatively lower; through different configurations of preset error indexes, the error condition of the TS code stream can be more conveniently evaluated, and the code stream quality of the main and standby paths is comprehensively compared.
The embodiment of the application also discloses an intelligent code stream switching method based on the switching judgment module 26 side.
Referring to fig. 5, a method for intelligently switching a code stream is applied to the above-mentioned intelligent switching device for a code stream, and the switching method includes:
step S101, respectively receiving a main channel code stream signal, a standby channel code stream signal and a unicast code stream signal;
step S102, receiving a main path monitoring result signal and a standby path monitoring result signal;
the monitoring result signals comprise video monitoring result signals, audio monitoring result signals, PMT monitoring result signals and PAT monitoring result signals;
step S103, switching and selecting a code stream input unit according to the main path monitoring result signal and the standby path monitoring result signal;
step S104, the code stream signal output from the code stream input unit selected by the switching is sent to the code stream output unit 27.
In the above embodiment, the main channel, the standby channel and the pad broadcast three-channel code stream input units are adopted to monitor the main channel code stream signal and the standby channel code stream signal respectively, the monitoring types include video monitoring, audio monitoring, PMT monitoring and PAT monitoring are integrated, and the switching decision module 26 performs switching selection of the code stream input units according to the main channel monitoring result signal and the standby channel monitoring result signal and outputs the corresponding code stream signals; through the comprehensive monitoring of multiple types, the code stream quality of each input information source is convenient to comprehensively judge, so that the provided program information source is more stable and reliable, and therefore, when a certain code stream is abnormal in quality, the switching is timely and accurately performed, the requirements of the cable television network company and the IPTV new media machine room on the safe broadcasting of the broadcasting front end are met, and the user experience is improved.
As an embodiment of the switching selection of the code stream input unit according to the main path monitoring result signal and the standby path monitoring result signal in step S103, the specific steps include:
when the current switching selected code stream input unit is the main channel code stream input unit 21, respectively generating a corresponding main channel code stream error index and a corresponding standby channel code stream error index according to the main channel monitoring result signal and the standby channel monitoring result signal, judging whether the standby channel code stream error index is smaller than the main channel code stream error index, and if yes, switching to the standby channel code stream input unit 23;
when the current switching selected code stream input unit is the standby code stream input unit 23, respectively generating a corresponding main code stream error index and standby code stream error index according to the main channel monitoring result signal and the standby monitoring result signal, judging whether the main code stream error index is smaller than or equal to the standby code stream error index, if yes, switching and selecting to the main code stream input unit 21;
when the currently selected code stream input unit is the main-path code stream input unit 21 or the standby-path code stream input unit 23, judging according to the main-path monitoring result signal and the standby-path monitoring result signal, if the main-path PMT monitoring result signal and/or the main-path PAT monitoring result signal are abnormal, judging whether the standby-path PMT monitoring result signal and/or the standby-path PAT monitoring result signal are abnormal, and if so, switching to the unicast code stream input unit 25;
When the currently selected code stream input unit is the mat code stream input unit 25, judging whether the main channel PMT monitoring result signal and/or the main channel PAT monitoring result signal are abnormal or not according to the main channel monitoring result signal, and if not, switching to the main channel code stream input unit 21; if so, judging whether the standby PMT monitoring result signal and/or the standby PAT monitoring result signal are abnormal according to the standby monitoring result signal, and if not, switching and selecting to the standby code stream input unit 23.
In the above embodiment, the main channel, the standby channel and the pad broadcast three-channel code stream input unit are adopted, the main channel code stream signal and the standby channel code stream signal are monitored respectively, the monitoring types include video monitoring, audio monitoring, PMT monitoring and PAT monitoring are integrated, the code stream states of the main channel and the standby channel input information sources are continuously judged respectively according to the preset monitoring frequency set by a user, the quality conditions of the main channel code stream and the standby channel code stream are compared, the main channel code stream signal and the standby channel code stream signal are selectively switched to the optimal input information sources, and the corresponding code stream signals are output; through multiple types of comprehensive monitoring, comprehensive judgment of the code stream quality of each input information source is facilitated, and the provided program information source is more stable and reliable.
As an embodiment of generating the corresponding main-path code stream error index and the corresponding standby-path code stream error index according to the main-path monitoring result signal and the standby-path monitoring result signal, the specific steps include:
accumulating preset error indexes corresponding to abnormal monitoring result signals in the main channel monitoring result signals according to a preset mapping table to obtain the main channel code stream error indexes;
accumulating preset error indexes corresponding to abnormal monitoring result signals in the standby channel monitoring result signals according to a preset mapping table to obtain the standby channel code stream error indexes;
the preset mapping table comprises a plurality of groups of preset error indexes corresponding to the monitoring result signals, and each monitoring result signal corresponds to one preset error index.
In the above embodiment, a preset mapping table is preset, each monitoring result signal sets a corresponding preset error index according to the influence degree of the monitoring content on the quality of the code stream, then the preset error indexes corresponding to the abnormal monitoring result signals in the main channel monitoring result signals are accumulated to obtain the main channel code stream error index, the preset error indexes corresponding to the abnormal monitoring result signals in the standby channel monitoring result signals are accumulated to obtain the standby channel code stream error index, and the main channel code stream error index and the standby channel code stream error index are obtained through calculation, so that the judgment and comparison of the code stream quality conditions of the main channel and the standby channel are facilitated.
As an embodiment of the preset error index corresponding to the monitoring result signal, the preset error index corresponding to the PMT monitoring result signal or the PAT monitoring result signal is greater than the preset error index corresponding to the video monitoring result signal, and the preset error index corresponding to the video monitoring result signal is greater than the preset error index corresponding to the audio monitoring result signal.
The video monitoring result signals comprise video PID monitoring result signals and video PID continuous counting monitoring result signals, and the audio monitoring result signals comprise audio PID monitoring result signals and audio PID continuous counting monitoring result signals.
In the above embodiment, when PMT errors or PAT errors occur, the post-equipment of the machine room may not normally work, which affects not only the stability of the post-equipment of the machine room, but also the user experience, so that the preset error index set is the highest, and the audio/video problem only affects the user experience, and since the viewing experience brought by the video is more visual relative to the audio, the viewing experience of the user can be directly affected, so that the preset error index corresponding to the video is relatively high, and the preset error index corresponding to the audio is relatively low; through different configurations of preset error indexes, the error condition of the TS code stream can be more conveniently evaluated, and the code stream quality of the main and standby paths is comprehensively compared.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that the provided apparatus and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, a division of a certain module or unit is merely a logical function division, and there may be another division manner when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted or not performed. Alternatively, the connections may be indirect coupling or communication connections via interfaces, systems, or units, which may be electrical connections, or may be in other forms such as connectors.
Embodiments of the present application disclose a computer readable storage medium.
A computer readable storage medium storing a computer program capable of being loaded by a processor and executing the code stream intelligent switching method as described above.
Wherein a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device; program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
The foregoing description of the preferred embodiments of the present application is not intended to limit the scope of the application, in which any feature disclosed in this specification (including abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. That is, each feature is one example only of a generic series of equivalent or similar features, unless expressly stated otherwise.
Claims (9)
1. An intelligent code stream switching device is characterized in that: the mobile terminal comprises a case (1), wherein a signal processing board (2) and a front panel (3) are arranged in the case (1), the signal processing board (2) comprises a main path code stream input unit (21), a main path code stream monitoring module (22), a standby path code stream input unit (23), a standby path code stream monitoring module (24), a mat code stream input unit (25), a switching judgment module (26), a code stream output unit (27) and a main control CPU (28), and the front panel (3) is used for providing display and key operation functions;
the switching judgment module (26) is respectively connected with the main path code stream input unit (21), the standby path code stream input unit (23) and the pad code stream input unit (25) and is used for respectively receiving a main path code stream signal, a standby path code stream signal and a pad code stream signal;
The main path code stream monitoring module (22) is connected to the main path code stream input unit (21) and is used for monitoring the main path code stream signal and outputting a main path monitoring result signal;
the standby code stream monitoring module (24) is connected to the standby code stream input unit (23) and is used for monitoring the standby code stream signal and outputting a standby monitoring result signal;
the monitoring result signals comprise video monitoring result signals, audio monitoring result signals, PMT monitoring result signals and PAT monitoring result signals;
the switching judgment module (26) is further connected to the main path code stream monitoring module (22), the standby path code stream monitoring module (24) and the code stream output unit (27) respectively, and is used for performing switching selection of the code stream input unit according to the main path monitoring result signal and the standby path monitoring result signal, and sending the code stream signal output by the switching selected code stream input unit to the code stream output unit (27);
the main control CPU unit (28) is respectively and electrically connected with the front panel (3), the main path code stream input unit (21), the main path code stream monitoring module (22), the standby path code stream input unit (23), the standby path code stream monitoring module (24), the unicast code stream input unit (25), the switching judgment module (26) and the code stream output unit (27) and is used for controlling the intelligent code stream switching device;
The main path code stream monitoring module (22) comprises a main path video monitoring unit (221), a main path audio monitoring unit (222), a main path PMT monitoring unit (223), a main path PAT monitoring unit (224) and a main path monitoring result output unit (225);
the main video monitoring unit (221) is configured to monitor whether the number of times of video PID errors occurring in the main code stream signal in a preset monitoring period exceeds a preset video PID error number threshold, and if yes, output a main video PID monitoring result signal as abnormal;
the main video monitoring unit (221) is further configured to monitor whether the number of times that the video PID continuous counting errors occur in the main code stream signal in a preset monitoring period exceeds a preset video PID continuous counting error number threshold, and if yes, output a main video PID continuous counting monitoring result signal as abnormal;
the main audio monitoring unit (222) is configured to monitor whether the number of times of audio PID errors occurring in the main code stream signal in a preset monitoring period exceeds a preset audio PID error number threshold, and if yes, output a main audio PID monitoring result signal as abnormal;
the main audio monitoring unit (222) is further configured to monitor whether the number of times that the audio PID continuous counting errors occur in the main code stream signal in a preset monitoring period exceeds a preset audio PID continuous counting error number threshold, and if yes, output a main audio PID continuous counting monitoring result signal as abnormal;
The main channel PMT monitoring unit (223) is used for monitoring whether the number of times of PMT errors of the main channel code stream signal in a preset monitoring period exceeds a preset PMT error number threshold, and if so, outputting a main channel PMT monitoring result signal as abnormal;
the main path PAT monitoring unit (224) is configured to monitor whether the number of times of occurrence of PAT errors in the main path code stream signal in a preset monitoring period exceeds a preset PAT error number threshold, and if yes, output a main path PAT monitoring result signal as an anomaly;
the main channel monitoring result output unit (225) is respectively connected to the main channel video monitoring unit (221), the main channel audio monitoring unit (222), the main channel PMT monitoring unit (223) and the main channel PAT monitoring unit (224), and is configured to respectively receive the main channel video PID monitoring result signal, the main channel video PID continuous counting monitoring result signal, the main channel audio PID continuous counting monitoring result signal, the main channel PMT monitoring result signal and the main channel PAT monitoring result signal, and generate and output the main channel monitoring result signal.
2. The intelligent code stream switching device according to claim 1, wherein: the front panel (3) comprises a display module and a key interaction module, wherein the display module is used for providing a display function, and the key interaction module is used for receiving and responding to a key trigger signal to perform corresponding selection and parameter configuration.
3. The intelligent code stream switching device according to claim 1, wherein: the standby code stream monitoring module (24) comprises a standby video monitoring unit (241), a standby audio monitoring unit (242), a standby PMT monitoring unit (243), a standby PAT monitoring unit (244) and a standby monitoring result output unit (245);
the standby video monitoring unit (241) is configured to monitor whether the number of times of video PID errors occurring in the standby code stream signal in a preset monitoring period exceeds a preset video PID error number threshold, and if yes, output a standby video PID monitoring result signal as abnormal;
the standby video monitoring unit (241) is further configured to monitor whether the number of times that the video PID continuous counting errors occur in the standby code stream signal in a preset monitoring period exceeds a preset video PID continuous counting error number threshold, and if yes, output a standby video PID continuous counting monitoring result signal as abnormal;
the backup audio monitoring unit (242) is configured to monitor whether the number of times of audio PID errors occurring in the backup code stream signal in a preset monitoring period exceeds a preset audio PID error number threshold, and if yes, output a backup audio PID monitoring result signal as abnormal;
The standby audio monitoring unit (242) is further configured to monitor whether the number of times that the standby code stream signal generates the audio PID continuous counting error in the preset monitoring period exceeds a preset audio PID continuous counting error number threshold, and if yes, output a standby audio PID continuous counting monitoring result signal as abnormal;
the backup channel PMT monitoring unit (243) is configured to monitor whether the number of PMT errors occurring in the backup channel code stream signal in a preset monitoring period exceeds a preset PMT error number threshold, and if yes, output a backup channel PMT monitoring result signal as abnormal;
the backup path PAT monitoring unit (244) is configured to monitor whether the number of times of occurrence of PAT errors in the backup path code stream signal in a preset monitoring period exceeds a preset PAT error number threshold, and if yes, output a backup path PAT monitoring result signal as an anomaly;
the standby path monitoring result output unit (245) is respectively connected to the standby path video monitoring unit (241), the standby path audio monitoring unit (242), the standby path PMT monitoring unit (243) and the standby path PAT monitoring unit (244), and is configured to respectively receive the standby path video PID monitoring result signal, the standby path video PID continuous counting monitoring result signal, the standby path audio PID continuous counting monitoring result signal, the standby path PMT monitoring result signal and the standby path PAT monitoring result signal, and generate and output the standby path monitoring result signal.
4. A code stream intelligent switching apparatus according to any one of claims 1 to 3, wherein: the switching judgment module (26) comprises a code stream error index generation unit (261), a main path judgment unit (262), a standby path judgment unit (263), a multicast judgment unit (264) and an auxiliary judgment unit (265);
the code stream error index generation unit (261) is used for respectively generating a corresponding main channel code stream error index and a corresponding standby channel code stream error index according to the main channel monitoring result signal and the standby channel monitoring result signal;
the main path judging unit (262) is connected with the code stream error index generating unit (261) and is used for judging whether the standby path code stream error index is smaller than the main path code stream error index when the current switching selection code stream input unit is the main path code stream input unit (21), and if yes, switching selection is carried out to the standby path code stream input unit (23);
the backup path judging unit (263) is connected to the code stream error index generating unit (261) and is used for judging whether the main path code stream error index is smaller than or equal to the backup path code stream error index when the current switching selection code stream input unit is the backup path code stream input unit (23), and if yes, switching selection to the main path code stream input unit (21);
The auxiliary judging unit (265) is configured to judge, when the current switching selected code stream input unit is the main path code stream input unit (21) or the standby path code stream input unit (23), according to the main path monitoring result signal and the standby path monitoring result signal, if the main path PMT monitoring result signal and/or the main path PAT monitoring result signal are abnormal, judge whether the standby path PMT monitoring result signal and/or the standby path PAT monitoring result signal are abnormal, if yes, switch to the unicast code stream input unit (25);
the unicast judgment unit (264) is configured to judge whether an abnormal situation occurs in the main path PMT monitoring result signal and/or the main path PAT monitoring result signal according to the main path monitoring result signal when the currently switched and selected code stream input unit is a unicast code stream input unit (25), and if not, switch and select to the main path code stream input unit (21); if yes, judging whether the PMT monitoring result signal and/or the PAT monitoring result signal of the standby channel is abnormal or not according to the PMT monitoring result signal of the standby channel, and if not, switching and selecting to the PMT input unit (23).
5. The intelligent code stream switching apparatus according to claim 4, wherein: the code stream error index generation unit (261) comprises a main path code stream error index generation unit and a standby path code stream error index generation unit;
The main channel code stream error index generation unit is used for accumulating preset error indexes corresponding to abnormal monitoring result signals in main channel monitoring result signals according to a preset mapping table to obtain main channel code stream error indexes;
the backup code stream error index generation unit is used for accumulating preset error indexes corresponding to abnormal monitoring result signals in backup monitoring result signals according to a preset mapping table to obtain the backup code stream error indexes;
the preset mapping table comprises a plurality of groups of preset error indexes corresponding to the monitoring result signals, and each monitoring result signal corresponds to one preset error index.
6. A method for intelligently switching a code stream, which is applied to the intelligent switching device for a code stream according to any one of claims 1 to 5, the switching method comprising:
receiving the main channel code stream signal, the standby channel code stream signal and the unicast code stream signal respectively;
receiving the main path monitoring result signal and the standby path monitoring result signal; the monitoring result signals comprise video monitoring result signals, audio monitoring result signals, PMT monitoring result signals and PAT monitoring result signals;
And switching and selecting the code stream input unit according to the main path monitoring result signal and the standby path monitoring result signal, and sending the code stream signal output by the code stream input unit which is switched and selected to the code stream output unit (27).
7. The method for intelligent switching of a code stream according to claim 6, wherein the step of performing switching selection of the code stream input unit according to the main path monitoring result signal and the standby path monitoring result signal comprises:
when the current switching selected code stream input unit is a main channel code stream input unit (21), respectively generating a corresponding main channel code stream error index and a corresponding standby channel code stream error index according to the main channel monitoring result signal and the standby channel monitoring result signal, judging whether the standby channel code stream error index is smaller than the main channel code stream error index, and if yes, switching to the standby channel code stream input unit (23);
when the current switching selected code stream input unit is a standby code stream input unit (23), respectively generating a corresponding main code stream error index and standby code stream error index according to the main channel monitoring result signal and the standby monitoring result signal, judging whether the main code stream error index is smaller than or equal to the standby code stream error index, and if yes, switching to select to the main code stream input unit (21);
When the current switching selected code stream input unit is a main path code stream input unit (21) or a standby path code stream input unit (23), judging according to the main path monitoring result signal and the standby path monitoring result signal, if the main path PMT monitoring result signal and/or the main path PAT monitoring result signal are abnormal, judging whether the standby path PMT monitoring result signal and/or the standby path PAT monitoring result signal are abnormal, if so, switching to the unicast code stream input unit (25);
when the current switching selected code stream input unit is a mat code stream input unit (25), judging whether the main path PMT monitoring result signal and/or the main path PAT monitoring result signal are abnormal or not according to the main path monitoring result signal, and if not, switching to the main path code stream input unit (21); if yes, judging whether the PMT monitoring result signal and/or the PAT monitoring result signal of the standby channel is abnormal or not according to the PMT monitoring result signal of the standby channel, and if not, switching and selecting to the PMT input unit (23).
8. The method for intelligently switching a code stream according to claim 7, wherein the step of generating the corresponding primary and backup code stream error indexes according to the primary and backup monitoring result signals respectively includes:
Accumulating preset error indexes corresponding to abnormal monitoring result signals in the main channel monitoring result signals according to a preset mapping table to obtain the main channel code stream error indexes;
accumulating preset error indexes corresponding to abnormal monitoring result signals in the standby channel monitoring result signals according to a preset mapping table to obtain the standby channel code stream error indexes;
the preset mapping table comprises a plurality of groups of preset error indexes corresponding to the monitoring result signals, and each monitoring result signal corresponds to one preset error index.
9. A computer-readable storage medium, characterized by: a computer program being stored which can be loaded by a processor and which performs the method according to any one of claims 6 to 8.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211467389.1A CN115811586B (en) | 2022-11-22 | 2022-11-22 | Intelligent code stream switching device and switching method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211467389.1A CN115811586B (en) | 2022-11-22 | 2022-11-22 | Intelligent code stream switching device and switching method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115811586A CN115811586A (en) | 2023-03-17 |
| CN115811586B true CN115811586B (en) | 2023-07-25 |
Family
ID=85483749
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211467389.1A Active CN115811586B (en) | 2022-11-22 | 2022-11-22 | Intelligent code stream switching device and switching method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115811586B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119893216A (en) * | 2025-03-31 | 2025-04-25 | 深圳市艾科维达科技有限公司 | Monitoring analysis method and analysis system for set top box application |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101631238A (en) * | 2009-07-21 | 2010-01-20 | 北京市博汇科技有限公司 | Code stream switching equipment for supporting PID replacement and programs on-demand broadcasting, method thereof and system thereof |
| CN111988538A (en) * | 2020-08-20 | 2020-11-24 | 利亚德光电股份有限公司 | Signal switching method and device, signal processing chip and LED display equipment |
| CN212628190U (en) * | 2020-08-24 | 2021-02-26 | 上海松江东方有线网络有限公司 | Main/standby path signal monitoring and early warning device for cable television transmission machine room |
| CN114124204A (en) * | 2022-01-24 | 2022-03-01 | 北京中昱光通科技有限公司 | Double-standby-path OLP optical line protection switching method and device |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2004114583A2 (en) * | 2003-06-18 | 2004-12-29 | Thomson Licensing S.A. | Method and apparatus for false sync lock detection in a digital media receiver |
-
2022
- 2022-11-22 CN CN202211467389.1A patent/CN115811586B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101631238A (en) * | 2009-07-21 | 2010-01-20 | 北京市博汇科技有限公司 | Code stream switching equipment for supporting PID replacement and programs on-demand broadcasting, method thereof and system thereof |
| CN111988538A (en) * | 2020-08-20 | 2020-11-24 | 利亚德光电股份有限公司 | Signal switching method and device, signal processing chip and LED display equipment |
| CN212628190U (en) * | 2020-08-24 | 2021-02-26 | 上海松江东方有线网络有限公司 | Main/standby path signal monitoring and early warning device for cable television transmission machine room |
| CN114124204A (en) * | 2022-01-24 | 2022-03-01 | 北京中昱光通科技有限公司 | Double-standby-path OLP optical line protection switching method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115811586A (en) | 2023-03-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8327408B2 (en) | System and method for troubleshooting a set top box | |
| JP3745495B2 (en) | Method and apparatus for analyzing transmission packet stream of digital multiplex program | |
| US7142204B2 (en) | Portable information processing device | |
| US8424049B2 (en) | Measurement of video quality at customer premises | |
| CN101014133B (en) | Device and method for providing auxiliary function of digital multimedia broadcasting | |
| CN202334788U (en) | Set top box with fault detecting function | |
| CN115811586B (en) | Intelligent code stream switching device and switching method | |
| CN101888569A (en) | Monitoring method and system of IPTV video business | |
| KR20180079562A (en) | System and Apparatus for Monitoring Broadcasting Streaming Based on IP | |
| KR100804036B1 (en) | Digital Broadcasting Channel Monitoring System | |
| US20090128708A1 (en) | Monitoring unit for use in a system for multimedia content distribution | |
| US7180538B2 (en) | Digital television test stream generator, method thereof, and test stream recording medium using the same | |
| KR101746378B1 (en) | Apparatus for monitoring convergence broadcast using mobile terminal | |
| US20050188410A1 (en) | Methods and apparatus for switching from a non-module tuning mode to a module tuning mode in a cable television receiver | |
| CN101267539B (en) | Method of selecting broadcast channels | |
| AU2014280116A1 (en) | System and method for remote maintenance of user units | |
| JP6649236B2 (en) | System and method | |
| CN101938660B (en) | Service quality detection-based hot backup multiplexing method and system | |
| KR101474193B1 (en) | hierarchical video quality management system | |
| KR100903594B1 (en) | Digital Multimedia Broadcasting Monitoring and Analysis System, Apparatus and Method | |
| EP2996348B1 (en) | Detection of user interactions | |
| KR101510892B1 (en) | Method and apparatus for controlling integrated multi-viewer | |
| KR101521662B1 (en) | Digital broadcasting system and method of managing it | |
| JP2015167345A (en) | CATV monitoring apparatus and CATV monitoring method | |
| KR101046585B1 (en) | How to provide minor channel information |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |