CN106803979B - A method and system supporting simultaneous descrambling of multiple programs - Google Patents
A method and system supporting simultaneous descrambling of multiple programs Download PDFInfo
- Publication number
- CN106803979B CN106803979B CN201710090542.6A CN201710090542A CN106803979B CN 106803979 B CN106803979 B CN 106803979B CN 201710090542 A CN201710090542 A CN 201710090542A CN 106803979 B CN106803979 B CN 106803979B
- Authority
- CN
- China
- Prior art keywords
- program
- middleware
- index
- data channel
- conditional access
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/418—External card to be used in combination with the client device, e.g. for conditional access
- H04N21/4181—External card to be used in combination with the client device, e.g. for conditional access for conditional access
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/438—Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
- H04N21/4385—Multiplex stream processing, e.g. multiplex stream decrypting
- H04N21/43853—Multiplex stream processing, e.g. multiplex stream decrypting involving multiplex stream decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
- H04N21/4433—Implementing client middleware, e.g. Multimedia Home Platform [MHP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/45—Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
- H04N21/462—Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
- H04N21/4623—Processing of entitlement messages, e.g. ECM [Entitlement Control Message] or EMM [Entitlement Management Message]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Storage Device Security (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
技术领域technical field
本发明涉及机顶盒技术领域,尤其涉及一种支持多个节目同时解扰的方法及系统。The invention relates to the technical field of set-top boxes, in particular to a method and system for simultaneously descrambling multiple programs.
背景技术Background technique
现如今数字机顶盒已经遍布家家户户,成为大众获取实时资讯,休闲娱乐的平台,人们对于机顶盒的业务和节目质量要求越来越高,加扰节目的出现,增加了运营商的收益,用户只有在购买授权之后才可以观看加扰节目,使用户在购买授权之后能够观看加扰节目是机顶盒基本功能之一。Nowadays, digital set-top boxes have spread in every household and become a platform for the public to obtain real-time information, leisure and entertainment. People have higher and higher requirements for the service and program quality of set-top boxes. The scrambled program can only be watched after the authorization, and it is one of the basic functions of the set-top box to enable the user to watch the scrambled program after purchasing the authorization.
目前几乎所有的机顶盒厂商与CA(条件接收,ConditionalAccess)厂商合作之后,都能够做到使终端用户观看解扰节目。但是只支持处理一路数据,即直播视频。不管是应用还是CA中间件(middleware)都只处理一路数据,或者按照默认的数据通道来处理信息。很大的局限了应用的扩展,使应用的很多功能在开发的时候需要中间件配合修改软件。而且,随着用户要求的录制回放(PVR)、画中画(PIP)、无黑屏的快速切台(FCC)等功能的出现,机顶盒厂家需要实现多路解扰和多路消息的管理,使用户能同时观看多个节目或者切台的过程不需要等待,切台后直接观看,这也将成为机顶盒的一大卖点。At present, after almost all set-top box manufacturers cooperate with CA (Conditional Access, Conditional Access) manufacturers, they can enable end users to watch descrambled programs. However, it only supports processing one channel of data, that is, live video. Both the application and the CA middleware (middleware) only process one channel of data, or process information according to the default data channel. It greatly limits the expansion of the application, so that many functions of the application need to be modified by the middleware when developing the software. Moreover, with the emergence of functions such as recording playback (PVR), picture-in-picture (PIP), and fast channel switching (FCC) without black screens required by users, set-top box manufacturers need to implement multi-channel descrambling and multi-channel message management. Users can watch multiple programs at the same time or switch channels without waiting, and watch directly after switching channels, which will also become a major selling point of the set-top box.
因此,现有技术还有待于改进和发展。Therefore, the prior art still needs to be improved and developed.
发明内容Contents of the invention
本发明要解决的技术问题在于,针对现有技术的上述缺陷,提供一种支持多个节目同时解扰的方法及系统,本发明的目的在于解决现有的CA只处理直播一路的消息以及只控制直播的节目状态的短板,局限应用扩展功能的问题。The technical problem to be solved by the present invention is to provide a method and system that supports simultaneous descrambling of multiple programs in view of the above-mentioned defects of the prior art. The shortcoming of controlling the status of the live program and the problem of limiting the extension function of the application.
本发明解决技术问题所采用的技术方案如下:The technical solution adopted by the present invention to solve technical problems is as follows:
一种支持多个节目同时解扰的方法,包括步骤:A method for supporting simultaneous descrambling of multiple programs, comprising the steps of:
当用户开启一节目时,通过底层数据通道同时从底层驱动处获取包括该节目及其他节目的多个节目分别对应的条件接收表和节目映射表以及与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系,并通知给CA中间件;其中,所述对应关系包括底层数据通道ID、数据源句柄;When a user starts a program, the conditional access table and program mapping table corresponding to the program and other programs, as well as the applications, CA Correspondence between the middleware and the underlying data channel, and notify the CA middleware; wherein, the corresponding relationship includes the underlying data channel ID, data source handle;
CA中间件开辟资源保存接收到的所述条件接收表、节目映射表以及所述对应关系,将所述多个节目各自的底层数据通道ID和数据源句柄分别保存在对应的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系分别都关联对应的所述索引;The CA middleware opens up resources to save the received conditional access table, program mapping table and the corresponding relationship, and stores the respective underlying data channel IDs and data source handles of the multiple programs in corresponding array elements, and then Using the subscript variable of the array element as an index, and associating the conditional access table, the program mapping table and the corresponding relationship corresponding to the plurality of programs with the corresponding index;
CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引;The CA middleware uses the index as the parameter of calling the CA kernel open resource interface, opens the kernel resource, and obtains the program handle of the plurality of programs that the CA kernel creates; simultaneously, the conditional access table and the program mapping table are sent to the CA kernel, and associating the program handles of the plurality of programs with the corresponding indexes;
CA内核处理所述条件接收表和节目映射表的数据,通知CA中间件开解扰所需的接收授权管理信息和授权控制信息的数据通道;CA中间件根据所述多个节目各自对应的索引找到对应的底层数据通道ID,在对应的底层数据通道上开辟所述多个节目各自解扰所需的接收授权管理信息和授权控制信息的数据通道、以及设置音视频控制字的解扰通道;The CA kernel processes the data of the conditional access table and the program mapping table, and notifies the CA middleware to open and descramble the required data channels for receiving authorization management information and authorization control information; the CA middleware finds the corresponding index according to the multiple programs respectively Corresponding bottom layer data channel ID, open up the data channel for receiving authorization management information and authorization control information required for the respective descrambling of the plurality of programs on the corresponding bottom layer data channel, and set the descrambling channel of the audio and video control word;
CA内核根据所述条件接收表和节目映射表的数据,通过所述接收授权管理信息和授权控制信息的数据通道,从底层驱动处获取授权管理信息和授权控制信息,并通过所述多个节目各自的所述解扰通道分别对所述多个节目进行解扰后,通知CA中间件所述多个节目的状态;CA中间件根据所述索引通知应用做出相应的状态处理。According to the data in the conditional access table and the program mapping table, the CA core obtains the authorization management information and authorization control information from the underlying driver through the data channel for receiving the authorization management information and authorization control information, and passes the multiple program After descrambling the multiple programs, the respective descrambling channels notify the CA middleware of the statuses of the multiple programs; the CA middleware notifies the application of corresponding status processing according to the index.
所述的支持多个节目同时解扰的方法,其中,所述与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系包括:The method for supporting simultaneous descrambling of multiple programs, wherein the correspondence between the applications, CA middleware, and underlying data channels that are respectively related to the multiple programs includes:
应用与CA中间以及底层数据通道的对应关系,成员为数据源句柄、底层数据通道ID、正在使用的标识;The corresponding relationship between the application and the CA intermediate and underlying data channel, the members are the data source handle, the underlying data channel ID, and the identifier being used;
CA中间件与应用的对应关系,成员为正在使用的标识、播放器句柄、数据源类型、错误码、音频状态、视频状态。The corresponding relationship between CA middleware and applications, the members are the identifier in use, player handle, data source type, error code, audio status, and video status.
所述的支持多个节目同时解扰的方法,其中,CA中间件开辟资源保存接收到的所述条件接收表、节目映射表以及所述对应关系,将所述多个节目各自的底层数据通道ID和数据源句柄分别保存在对应的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系都分别关联对应的所述索引的步骤具体包括步骤:The method for supporting simultaneous descrambling of multiple programs, wherein the CA middleware allocates resources to save the received conditional access table, program mapping table, and the corresponding relationship, and transfers the underlying data channels of the multiple programs to The ID and the data source handle are respectively stored in corresponding array elements, and then the subscript variable of the array element is used as an index, and the conditional access table, program mapping table and the corresponding relationship corresponding to the plurality of programs are The steps of respectively associating the corresponding indexes include the following steps:
CA中间件接收到所述条件接收表、节目映射表以及所述对应关系后,分别判断所述多个节目各自的底层数据通道ID和数据源句柄是否已保存在CA中间件的数组元素中;After the CA middleware receives the conditional access table, the program mapping table and the corresponding relationship, it judges respectively whether the underlying data channel IDs and data source handles of the multiple programs have been stored in the array elements of the CA middleware;
当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系都分别关联对应的所述索引。When the underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware, store the respective underlying data channel IDs and data source handles of the multiple programs respectively In the unused array element, the subscript variable of the array element is used as an index, and the conditional access table, the program mapping table and the corresponding relationship of the plurality of programs are respectively associated with the corresponding above index.
所述的支持多个节目同时解扰的方法,其中,当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系都分别关联对应的所述索引的步骤具体包括步骤:The method for supporting simultaneous descrambling of multiple programs, wherein, when the respective underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware, the multiple The respective underlying data channel IDs and data source handles of the programs are respectively stored in unused array elements, and then the subscript variable of the array elements is used as an index, and the conditional access table corresponding to the multiple programs is The step of associating the corresponding index with the program mapping table and the corresponding relationship includes the following steps:
当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引;When the underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware, store the respective underlying data channel IDs and data source handles of the multiple programs respectively in an unused array element, then use the subscript variable of said array element as an index;
将所述索引作为保存应用发送给CA中间件的数据源类型、播放器句柄以及设置正在使用的标识的数组的下标变量;The index is used as the subscript variable of the data source type, the player handle, and the array of the identity being used to save the application sent to the CA middleware;
将所述索引作为保存所述条件接收表、节目映射表的数组的下标变量。The index is used as a subscript variable of an array storing the conditional access table and the program mapping table.
所述的支持多个节目同时解扰的方法,其中,CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引的步骤具体包括步骤:The method for supporting simultaneous descrambling of multiple programs, wherein the CA middleware uses the index as a parameter for calling the CA kernel open resource interface, opens the kernel resource, and obtains the program handle for the CA kernel to create the multiple programs; at the same time The conditional access table and the program mapping table are sent to the CA core, and the steps of associating the program handles of the plurality of programs with the corresponding indexes specifically include the steps:
CA中间件分别判断所述多个节目对应的索引关联的条件接收表、节目映射表是否与上次接收到的条件接收表、节目映射表相同;The CA middleware respectively judges whether the conditional access table and program mapping table associated with the index corresponding to the plurality of programs are the same as the conditional access table and program mapping table received last time;
当所述多个节目对应的所述索引关联的条件接收表、节目映射表与上次接收到的条件接收表表、节目映射表不同时,CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引。When the conditional access table and program mapping table associated with the index corresponding to the multiple programs are different from the conditional access table and program mapping table received last time, the CA middleware uses the index as a resource for calling the CA kernel The parameters of the interface, open the kernel resources, obtain the program handles of the multiple programs created by the CA core; simultaneously send the conditional access table and the program mapping table to the CA core, and associate the program handles of the multiple programs with the corresponding the index.
一种支持多个节目同时解扰的系统,包括:A system supporting simultaneous descrambling of multiple programs, comprising:
数据获取模块,用于当用户开启一节目时,通过底层数据通道同时从底层驱动处获取包括该节目及其他节目的多个节目分别对应的条件接收表和节目映射表以及与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系,并通知给CA中间件;其中,所述对应关系包括底层数据通道ID、数据源句柄;The data acquisition module is used to obtain the conditional access table and program mapping table respectively corresponding to multiple programs including the program and other programs from the underlying drive through the underlying data channel when the user starts a program, as well as the Corresponding relationships between relevant applications, CA middleware, and underlying data channels, and notify the CA middleware; wherein, the corresponding relationship includes the underlying data channel ID and data source handle;
索引关联模块,用于CA中间件开辟资源保存接收到的所述条件接收表、节目映射表以及所述对应关系,将所述多个节目各自的底层数据通道ID和数据源句柄分别保存在对应的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系分别都关联对应的所述索引;The index association module is used for CA middleware to open up resources and save the received conditional access table, program mapping table and the corresponding relationship, and store the respective underlying data channel IDs and data source handles of the multiple programs in the corresponding In the array element, then the subscript variable of the array element is used as an index, and the conditional access table, the program mapping table and the corresponding relationship corresponding to the plurality of programs are respectively associated with the corresponding index;
内核资源开启模块,用于CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引;The core resource opening module is used for the CA middleware to use the index as the parameter of calling the CA core open resource interface, open the core resource, and obtain the program handle of the plurality of programs created by the CA core; simultaneously the conditional access table, the program The mapping table sends the CA core, and associates the program handles of the plurality of programs with the corresponding indexes;
通道开辟模块,用于CA内核处理所述条件接收表和节目映射表的数据,通知CA中间件开解扰所需的接收授权管理信息和授权控制信息的数据通道;CA中间件根据所述多个节目各自对应的索引找到对应的底层数据通道ID,在对应的底层数据通道上开辟所述多个节目各自解扰所需的接收授权管理信息和授权控制信息的数据通道、以及设置音视频控制字的解扰通道;The channel opens up the module, is used for CA kernel to process the data of described conditional access table and program mapping table, informs CA middleware to open the data channel of receiving authorization management information and authorization control information required for descrambling; CA middleware according to the multiple The index corresponding to each program finds the corresponding underlying data channel ID, opens up the data channels for receiving authorization management information and authorization control information required for the respective descrambling of the plurality of programs on the corresponding underlying data channel, and sets the audio and video control word descrambling channel;
解扰模块,用于CA内核根据所述条件接收表和节目映射表的数据,通过所述接收授权管理信息和授权控制信息的数据通道,从底层驱动处获取授权管理信息和授权控制信息,并通过所述多个节目各自的所述解扰通道分别对所述多个节目进行解扰后,通知CA中间件所述多个节目的状态;CA中间件根据所述索引通知应用做出相应的状态处理。The descrambling module is used for the CA core to acquire the authorization management information and the authorization control information from the underlying driver through the data channel for receiving the authorization management information and the authorization control information according to the data in the conditional access table and the program mapping table, and After descrambling the multiple programs through the respective descrambling channels of the multiple programs, notify the CA middleware of the states of the multiple programs; the CA middleware notifies the application according to the index to make a corresponding response state handling.
所述的支持多个节目同时解扰的系统,其中,所述与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系包括:In the system supporting simultaneous descrambling of multiple programs, the corresponding relationship among the applications, CA middleware, and underlying data channels respectively related to the multiple programs includes:
应用与CA中间以及底层数据通道的对应关系,成员为数据源句柄、底层数据通道ID、正在使用的标识;The corresponding relationship between the application and the CA intermediate and underlying data channel, the members are the data source handle, the underlying data channel ID, and the identifier being used;
CA中间件与应用的对应关系,成员为正在使用的标识、播放器句柄、数据源类型、错误码、音频状态、视频状态。The corresponding relationship between CA middleware and applications, the members are the identifier in use, player handle, data source type, error code, audio status, and video status.
所述的支持多个节目同时解扰的系统,其中,所述索引关联模块具体包括:In the system supporting simultaneous descrambling of multiple programs, the index association module specifically includes:
第一判断单元,用于CA中间件接收到所述条件接收表、节目映射表以及所述对应关系后,分别判断所述多个节目各自的底层数据通道ID和数据源句柄是否已保存在CA中间件的数组元素中;The first judging unit is used for CA middleware to judge respectively whether the underlying data channel IDs and data source handles of the multiple programs have been stored in the CA after receiving the conditional access table, the program mapping table and the corresponding relationship. In the array element of the middleware;
索引关联单元,用于当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系都分别关联对应的所述索引。An index associating unit, configured to associate the respective underlying data channel IDs of the multiple programs when the respective underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware , data source handles are respectively stored in unused array elements, and then the subscript variable of the array element is used as an index, and the conditional access table, program mapping table and the corresponding relationship corresponding to the plurality of programs are stored are respectively associated with the corresponding indexes.
所述的支持多个节目同时解扰的系统,其中,所述索引关联单元具体包括:In the system supporting simultaneous descrambling of multiple programs, the index association unit specifically includes:
索引生成单元,用于当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引;An index generating unit, configured to use the respective underlying data channel IDs of the multiple programs when the respective underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware , the data source handle is respectively stored in unused array elements, and then the subscript variable of the array element is used as an index;
第一关联单元,用于将所述索引作为保存应用发送给CA中间件的数据源类型、播放器句柄以及设置正在使用的标识的数组的下标变量;The first association unit is used to use the index as the subscript variable of the data source type, the player handle, and the array of the identity being used to save the application sent to the CA middleware;
第二关联单元,用于将所述索引作为保存所述条件接收表、节目映射表的数组的下标变量。The second associating unit is configured to use the index as a subscript variable of an array storing the conditional access table and the program mapping table.
所述的支持多个节目同时解扰的方法,其中,所述内核资源开启模块具体包括:The method for supporting simultaneous descrambling of multiple programs, wherein the kernel resource enabling module specifically includes:
第二判断单元,用于CA中间件分别判断所述多个节目对应的索引关联的条件接收表、节目映射表是否与上次接收到的条件接收表、节目映射表相同;The second judging unit is used for the CA middleware to respectively judge whether the conditional access table and program mapping table associated with the index corresponding to the plurality of programs are the same as the conditional access table and program mapping table received last time;
内核资源开启单元,用于当所述多个节目对应的所述索引关联的条件接收表、节目映射表与上次接收到的条件接收表表、节目映射表不同时,CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引。The kernel resource opening unit is used for when the conditional access table and program mapping table associated with the index corresponding to the plurality of programs are different from the conditional access table and program mapping table received last time, the CA middleware will The index is used as the parameter of calling the CA kernel to open the resource interface, and the kernel resource is opened to obtain the program handle of the plurality of programs created by the CA kernel; simultaneously, the conditional access table and the program mapping table are sent to the CA kernel, and the plurality of programs are sent to the CA kernel. The program handles are respectively associated with the corresponding indexes.
综上所述,本发明提供了一种支持多个节目同时解扰的方法及系统,本发明所述方法能够使CA更好的支持应用扩展,且应用扩展时对CA中间件部分的修改影响很小,能够更迅速的集成涉及到多路数据处理的功能,兼容性更强;本发明可以使现有的CA不再限制应用的扩展,能同时处理多个节目及多个节目消息同时管理,可以应用于多种场景。In summary, the present invention provides a method and system that supports simultaneous descrambling of multiple programs. The method of the present invention enables CA to better support application expansion, and the modification of the CA middleware part during application expansion affects It is very small, and can more quickly integrate functions related to multi-channel data processing, and has stronger compatibility; the present invention can make the existing CA no longer limit the expansion of applications, and can simultaneously process multiple programs and manage multiple program messages at the same time , which can be applied to various scenarios.
附图说明Description of drawings
图1是本发明支持多个节目同时解扰的方法较佳实施例的流程图。Fig. 1 is a flowchart of a preferred embodiment of the method for supporting simultaneous descrambling of multiple programs in the present invention.
图2是本发明支持多个节目同时解扰的方法的简要流程图。Fig. 2 is a brief flow chart of the method for supporting simultaneous descrambling of multiple programs in the present invention.
图3是本发明支持多个节目同时解扰的方法具体应用实施例的流程图。Fig. 3 is a flowchart of a specific application embodiment of the method for supporting simultaneous descrambling of multiple programs according to the present invention.
图4是本发明支持多个节目同时解扰的系统较佳实施例的原理框图。Fig. 4 is a functional block diagram of a preferred embodiment of the system supporting simultaneous descrambling of multiple programs according to the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention more clear and definite, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
请参见图1,图1是本发明支持多个节目同时解扰的方法较佳实施例的流程图。图1所示的支持多个节目同时解扰的方法,包括:Please refer to FIG. 1. FIG. 1 is a flow chart of a preferred embodiment of the method for supporting simultaneous descrambling of multiple programs in the present invention. The method for supporting simultaneous descrambling of multiple programs shown in Figure 1 includes:
步骤S100、当用户开启一节目时,通过底层数据通道同时从底层驱动处获取包括该节目及其他节目的多个节目分别对应的条件接收表和节目映射表以及与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系,并通知给CA中间件;其中,所述对应关系包括底层数据通道ID、数据源句柄;Step S100, when the user starts a program, simultaneously obtain the conditional access table and program mapping table corresponding to the program and other programs from the bottom drive through the bottom data channel, and the corresponding Correspondence between application, CA middleware, and underlying data channel, and notify CA middleware; wherein, said corresponding relationship includes underlying data channel ID, data source handle;
步骤S200、CA中间件开辟资源保存接收到的所述条件接收表、节目映射表以及所述对应关系,将所述多个节目各自的底层数据通道ID和数据源句柄分别保存在对应的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系分别都关联对应的所述索引;Step S200, the CA middleware opens up resources to save the received conditional access table, program mapping table and the corresponding relationship, and saves the respective underlying data channel IDs and data source handles of the multiple programs in corresponding array elements In the method, the subscript variable of the array element is then used as an index, and the conditional access table, program mapping table and the corresponding relationship of the plurality of programs are respectively associated with the corresponding index;
步骤S300、CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引;Step S300, the CA middleware uses the index as a parameter for calling the CA kernel open resource interface, opens the kernel resource, and obtains the program handle of the plurality of programs created by the CA kernel; simultaneously sends the conditional access table and the program mapping table to the CA a kernel, and associating the program handles of the plurality of programs with the corresponding indexes;
步骤S400、CA内核处理所述条件接收表和节目映射表的数据,通知CA中间件开解扰所需的接收授权管理信息和授权控制信息的数据通道;CA中间件根据所述多个节目各自对应的索引找到对应的底层数据通道ID,在对应的底层数据通道上开辟所述多个节目各自解扰所需的接收授权管理信息和授权控制信息的数据通道、以及设置音视频控制字的解扰通道;Step S400, the CA core processes the data of the conditional access table and the program mapping table, and notifies the CA middleware to open the data channel for receiving authorization management information and authorization control information required for descrambling; the CA middleware corresponds to each of the multiple programs according to the index to find the corresponding underlying data channel ID, open up the data channels for receiving authorization management information and authorization control information required for the respective descrambling of the plurality of programs on the corresponding underlying data channel, and set the descrambling of the audio and video control words aisle;
步骤S500、CA内核根据所述条件接收表和节目映射表的数据,通过所述接收授权管理信息和授权控制信息的数据通道,从底层驱动处获取授权管理信息和授权控制信息,并通过所述多个节目各自的所述解扰通道分别对所述多个节目进行解扰后,通知CA中间件所述多个节目的状态;CA中间件根据所述索引通知应用做出相应的状态处理。Step S500, the CA core obtains the authorization management information and authorization control information from the underlying driver through the data channel for receiving the authorization management information and authorization control information according to the data in the conditional access table and the program mapping table, and passes the The respective descrambling channels of the multiple programs descramble the multiple programs respectively, and notify the CA middleware of the statuses of the multiple programs; the CA middleware notifies the application of corresponding status processing according to the index.
本发明所述方法是基于多路数据分配器(DMUX)或者数据分配器复用的背景提出的,其关键在于多路数据之间的管理不会互相干扰,且与上层或者底层创建的资源能够很好的衔接和处理。本发明提供的支持多个节目同时解扰的方法,可以使应用随意增加与多路解扰相关的功能,如录制回放(PVR)、画中画(PIP)、无黑屏的快速切台(FCC)等。The method of the present invention is proposed based on the background of multiplexing of multiple data distributors (DMUX) or data distributors. The key is that the management of multiple data will not interfere with each other, and the resources created by the upper layer or the bottom layer can be Great articulation and handling. The method for supporting simultaneous descrambling of multiple programs provided by the present invention enables the application to freely add functions related to multi-channel descrambling, such as recording and playback (PVR), picture-in-picture (PIP), fast channel switching without black screen (FCC) )Wait.
简单的说,本发明是实现当用户开启一节目时,不仅仅收到该节目的条件接收表和节目映射表及所述对应关系,还同时会收到其他节目的条件接收表和节目映射表及所述对应关系,将包括该节目和其他节目的多个节目的条件接收表和节目映射表同时发送给CA中间件,同时开各节目对应的解扰通道进行同时解扰,从而能够实现录制回放(PVR)、画中画(PIP)、无黑屏的快速切台(FCC)等功能。其中,画中画即可以同时观看两个节目,而无黑屏的快速切台则是由于当开启一节目时同时也对其他节目进行了解扰,当切换台时直接调用已解扰的数据即可,因此不会出现黑屏。To put it simply, the present invention realizes that when a user starts a program, he not only receives the conditional access table, program mapping table and the corresponding relationship of the program, but also receives the conditional access table and program mapping table of other programs at the same time. and the corresponding relationship, the conditional access tables and program mapping tables of multiple programs including the program and other programs are sent to the CA middleware at the same time, and the descrambling channels corresponding to each program are opened for simultaneous descrambling, so that recording can be realized Playback (PVR), picture-in-picture (PIP), fast channel cut (FCC) without black screen and other functions. Among them, the picture-in-picture can watch two programs at the same time, and the fast channel switching without black screen is because when one program is turned on, other programs are also descrambled at the same time, and the descrambled data can be directly called when switching channels , so no black screen appears.
需要说明的是,所述其他节目指的是机顶盒支持的除用户当前开启的节目之外的节目,其可以是该节目相邻的上下几个节目,也可以是用户开启一节目时同时开启的其他节目,还可以是与用户开启的节目预先关联的其他节目。It should be noted that the other programs refer to the programs supported by the set-top box other than the program currently opened by the user, which may be several programs adjacent to the program, or the programs that are opened simultaneously when the user starts a program. The other programs may also be other programs pre-associated with the program started by the user.
本实施例中,所述应用为人机界面,也即是UI交互界面,参照图2所示,在所述步骤S100中,当用户开启一节目时,通过底层数据通道同时从底层驱动处获取包括该节目及其他节目的多个节目分别对应的条件接收表和节目映射表以及与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系,并通知给CA中间件;其中,所述对应关系包括底层数据通道ID、数据源句柄;也就是说,当用户开启一节目时,例如直播,人机界面端不仅通过底层数据通道从底层驱动处获取该节目对应的条件接收表(conditional accesstable,CAT)和节目映射表(Program Map Table,PMT)以及与该节目相关的应用、CA中间件、底层数据通道之间的对应关系(对应于图2的中步骤①),并通知给CA中间件(对应于图2中的步骤②),而且还同时对其他节目也进行了相同的处理过程。其中,所述底层数据通道为底层驱动(HDI)的数据传输通道。In this embodiment, the application is a man-machine interface, that is, a UI interactive interface, as shown in FIG. The conditional access table and program mapping table corresponding to the program and multiple programs of other programs, and the correspondence between the applications, CA middleware, and underlying data channels respectively related to the multiple programs, and notify the CA middleware ; Wherein, the corresponding relationship includes the underlying data channel ID, data source handle; that is to say, when the user opens a program, such as live broadcast, the man-machine interface terminal not only obtains the corresponding conditions of the program from the underlying driver through the underlying data channel The corresponding relationship between the receiving table (conditional accesstable, CAT) and the program mapping table (Program Map Table, PMT) and the application related to the program, CA middleware, and the underlying data channel (corresponding to step ① in Figure 2), And notify the CA middleware (corresponding to step ② in Figure 2), and also carry out the same process for other programs at the same time. Wherein, the underlying data channel is a data transmission channel of an underlying driver (HDI).
具体实施时,应用开启某一功能的时候,如直播,通知CA中间件表数据(data)的更新,与节目相关的重要的表为PMT和CAT表,应用会通知该表底层数据通道ID、数据源句柄、数据源类型、播放器句柄;同时对其他节目也进行与该节目相同的处理过程。其中,每一个底层数据通道ID和数据源句柄对应一个节目。During the specific implementation, when the application starts a certain function, such as live broadcast, it notifies the update of the CA middleware table data (data). The important tables related to the program are PMT and CAT tables, and the application will notify the table of the underlying data channel ID, Data source handle, data source type, player handle; at the same time, the same process as this program is performed on other programs. Wherein, each underlying data channel ID and data source handle corresponds to a program.
在本实施例中,所述与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系包括:1)、应用与CA中间以及底层数据通道的对应关系,成员为数据源句柄、底层数据通道ID(身份标识号码),正在使用的标识;2)、CA中间件与应用的对应关系,成员为正在使用的标识、播放器句柄、数据源类型、错误码(CA错误码)、音频状态、视频状态。其中,所述数据源类型为枚举型数据源类型,例如直播,画中画,无黑屏的快速切台,录制回放等。In this embodiment, the corresponding relationship among the applications, CA middleware, and underlying data channels related to the multiple programs includes: 1), the corresponding relationship between applications and CA intermediate and underlying data channels, and the members are Data source handle, underlying data channel ID (identification number), the identity being used; 2), the corresponding relationship between CA middleware and applications, the members are the identity being used, player handle, data source type, error code (CA error code), audio status, video status. Wherein, the data source type is an enumerated data source type, such as live broadcast, picture-in-picture, fast channel switching without black screen, recording and playback, etc.
在所述步骤S200中,CA中间件开辟资源保存接收到的所述条件接收表、节目映射表以及所述对应关系,将所述多个节目各自的底层数据通道ID和数据源句柄分别保存在对应的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系分别都关联对应的所述索引;也就是说,CA中间件不仅开辟资源保存接收到的该开启节目对应的条件接收表、节目映射表以及底层数据通道ID、数据源句柄、数据源类型、播放器句柄,将底层数据通道ID、数据源句柄保存在一数组元素中,然后将该数组元素的下标变量作为索引(index),并将所述条件接收表、节目映射表以及底层数据通道ID、数据源句柄、数据源类型、播放器句柄都关联所述索引,同时也对所述多个节目中的其他节目同时做相同的处理。所不同的是,各节目关联各自对应的索引。In the step S200, the CA middleware allocates resources to save the received conditional access table, program mapping table and the corresponding relationship, and saves the respective underlying data channel IDs and data source handles of the multiple programs in the In the corresponding array element, the subscript variable of the array element is then used as an index, and the conditional access table, the program mapping table and the corresponding relationship corresponding to the plurality of programs are respectively associated with the corresponding index ; That is to say, the CA middleware not only opens up resources to save the conditional access table, program mapping table and underlying data channel ID, data source handle, data source type, and player handle corresponding to the received program, but also stores the underlying data channel ID The data source handle is stored in an array element, and then the subscript variable of the array element is used as an index (index), and the conditional access table, program mapping table, and underlying data channel ID, data source handle, and data source type , the player handle are all associated with the index, and the same process is also performed on other programs in the plurality of programs at the same time. The difference is that each program is associated with its corresponding index.
具体实施时,CA中间件为各个节目开辟资源可以通过开辟结构体数组保存应用、CA中间件、CA内核以及底层驱动的重要信息来实现。例如,可以分别为所述多个节目的每个节目开辟5个结构体数组:结构体数组1、结构体数组2、结构体数组3、结构体数组4及结构体数组5;其中,设置结构体数组1为保存应用与CA中间以及底层数据通道的对应关系,成员为数据源句柄,底层数据通道ID,正在使用的标识;设置结构体数组2为保存CA中间件与上层应用对应关系,成员为正在使用的标识(flag),播放器句柄,枚举型数据源类型,CA错误码,音频状态,视频状态;设置结构体数组3为保存CA内核与CA中间件之间的节目消息对应关系,成员为CA内核开资源的ID以及开资源产生的句柄;设置结构体数组4及结构体数组5分别保存PMT表和CAT表。During specific implementation, the CA middleware can open up resources for each program by opening up a structure array to save important information of the application, the CA middleware, the CA kernel, and the underlying driver. For example, five structure arrays can be opened up for each of the plurality of programs: structure array 1, structure array 2, structure array 3, structure array 4, and structure array 5; Body array 1 is used to save the corresponding relationship between the application and CA middleware and the underlying data channel. It is the flag in use, player handle, enumerated data source type, CA error code, audio status, and video status; set the structure array 3 to save the program message correspondence between the CA core and the CA middleware , the members are the ID of the resource opened by the CA core and the handle generated by the open resource; set the structure array 4 and the structure array 5 to save the PMT table and the CAT table respectively.
进一步的,所述步骤S200具体包括:Further, the step S200 specifically includes:
步骤S210、CA中间件接收到所述条件接收表、节目映射表以及所述对应关系后,分别判断所述多个节目各自的底层数据通道ID和数据源句柄是否已保存在CA中间件的数组元素中;具体实施时,CA中间件接收到所述底层数据通道ID、数据源句柄时,分别判断所述多个节目各自对应的所述底层数据通道ID、数据源句柄是否已保存在CA中间件的数组元素中,也即是分别判断是否针对所述多个节目中的每个节目对应的底层数据通道ID和数据源句柄开辟过资源。Step S210, after the CA middleware receives the conditional access table, the program mapping table and the corresponding relationship, it judges respectively whether the respective underlying data channel IDs and data source handles of the multiple programs have been stored in the array of the CA middleware In the element; during specific implementation, when the CA middleware receives the bottom data channel ID and the data source handle, it judges respectively whether the corresponding bottom data channel ID and data source handle of the multiple programs have been stored in the middle of the CA In the array element of the program, it is judged respectively whether resources have been allocated for the underlying data channel ID and data source handle corresponding to each of the multiple programs.
步骤S220、当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系都分别关联对应的所述索引。具体实施时,当所述多个节目中的某一节目对应的底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,则说明之前没有针对所述底层数据通道ID、数据源句柄开辟过资源;此时,CA中间件在结构体数组1中遍历寻找未使用的数组元素,将应用通知的数据源句柄、底层数据通道ID保存在未使用的数组元素中,并且将该数组元素的下标变量作为索引返回;当所述底层数据通道ID、数据源句柄在CA中间件的数组元素中已经存在时,则说明之前已经针对所述底层数据通道ID、数据源句柄开辟过资源,此时,只需直接返回数组的下标变量作为索引。Step S220, when the respective underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware, set the respective underlying data channel IDs and data source handles of the multiple programs to The handles are respectively stored in unused array elements, and then the subscript variable of the array elements is used as an index, and the conditional access table, program mapping table and the corresponding relationship corresponding to the plurality of programs are respectively associated corresponding to the index. During specific implementation, when the underlying data channel ID and data source handle corresponding to a certain program in the plurality of programs do not exist in the array elements of the CA middleware, it means that there is no previous response to the underlying data channel ID and data source handle. The source handle has opened up resources; at this time, the CA middleware traverses in the structure array 1 to find unused array elements, saves the data source handle and underlying data channel ID notified by the application in the unused array elements, and puts the The subscript variable of the array element is returned as an index; when the underlying data channel ID and data source handle already exist in the array element of the CA middleware, it means that the underlying data channel ID and data source handle have been opened before. Resources, at this point, only need to directly return the subscript variable of the array as the index.
进一步的,所述步骤S220具体包括:Further, the step S220 specifically includes:
步骤S221、当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引。具体实施时,例如,当用户开启的节目是一直播,当该直播的底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,则说明之前没有针对所述底层数据通道ID、数据源句柄开辟过资源;此时,CA中间件在结构体数组1中遍历寻找未使用的数组元素,将应用通知的该直播的数据源句柄以及底层数据通道ID保存在未使用的数组元素中,并且将该数组元素的下标变量作为索引返回。Step S221, when the respective underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware, set the respective underlying data channel IDs and data source handles of the multiple programs to The handles are stored in unused array elements respectively, and then the subscript variables of said array elements are used as indexes. During specific implementation, for example, when the program opened by the user is a live broadcast, when the underlying data channel ID and data source handle of the live broadcast do not exist in the array elements of the CA middleware, it means that the underlying data channel ID has not been targeted before. , The data source handle has opened up resources; at this time, the CA middleware traverses the structure array 1 to find unused array elements, and saves the data source handle and the underlying data channel ID notified by the application in the unused array elements , and return the subscript variable of the array element as the index.
步骤S222、将所述索引作为保存应用发送给CA中间件的数据源类型、播放器句柄以及设置正在使用的标识的数组的下标变量;具体实施时,将所述索引作为结构体数组2的下标变量来保存应用发送给CA中间件的数据源类型、播放器句柄以及设置正在使用的标识。Step S222, use the index as the subscript variable of the array that saves the data source type sent to the CA middleware by the application, the player handle, and the array that is being used; The subscript variable is used to save the data source type sent by the application to the CA middleware, the player handle, and the flag being used.
步骤S223、将所述索引作为保存所述条件接收表、节目映射表的数组的下标变量;具体实施时,将所述索引作为结构体数组4、结构体数组5的下标变量来分别保存应用发送给CA中间件的PMT表和CAT表。Step S223, use the index as a subscript variable of the arrays storing the conditional access table and the program mapping table; during specific implementation, use the index as the subscript variable of the structure array 4 and the structure array 5 to store respectively The PMT table and CAT table sent by the application to the CA middleware.
在步骤S300中,CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核(对应于图2中的步骤③),并将所述多个节目的节目句柄分别关联对应的所述索引;所述步骤S300主要是开辟CA内核资源并通过所述索引关联内核资源。In step S300, the CA middleware uses the index as the parameter of calling the CA kernel open resource interface, opens the kernel resource, and obtains the program handle of the plurality of programs created by the CA kernel; simultaneously the conditional access table, the program mapping table Send the CA kernel (corresponding to step ③ in Figure 2), and associate the program handles of the multiple programs with the corresponding indexes; the step S300 is mainly to open up CA kernel resources and associate kernel resources through the indexes .
具体实施时,CA中间件将所述索引作为调用CA开资源接口的参数,开启内核资源,获取CA内核创建的节目句柄,然后将所述节目句柄保存在结构体数组3中且设置结构体数组3的下标变量为所述索引,同时CA中间件将PMT表和CAT表以及表数据对应的节目句柄传给CA内核。During specific implementation, the CA middleware uses the index as a parameter for calling the CA resource opening interface, opens the kernel resource, obtains the program handle created by the CA kernel, then stores the program handle in the structure array 3 and sets the structure array The subscript variable of 3 is the index, and the CA middleware transmits the PMT table, the CAT table and the program handle corresponding to the table data to the CA kernel.
进一步的,所述步骤S300具体包括:Further, the step S300 specifically includes:
步骤S310、CA中间件分别判断所述多个节目对应的索引关联的条件接收表、节目映射表是否与上次接收到的条件接收表、节目映射表相同;具体实施时,CA中间件判断所述索引关联的PMT表和CAT表是否与上次接收到的PMT表和CAT表相同,以此判断当前CA内核中是否存在与所述索引关联的PMT表和CAT表对应的节目的资源,从而决定是否需要新开启内核资源。Step S310, the CA middleware determines whether the conditional access table and program mapping table associated with the index corresponding to the plurality of programs are the same as the conditional access table and program mapping table received last time; during specific implementation, the CA middleware judges whether the Whether the PMT table associated with the index and the CAT table are the same as the PMT table and the CAT table received last time, so as to judge whether there is a resource of the program corresponding to the PMT table associated with the index and the CAT table in the current CA kernel, thereby Decide whether you need to newly open kernel resources.
步骤S320、当所述多个节目对应的所述索引关联的条件接收表、节目映射表与上次接收到的条件接收表表、节目映射表不同时,CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引。具体实施时,当所述索引关联的条件接收表、节目映射表与上次接收到的条件接收表、节目映射表不同时,则说明当前CA内核中不存在与所述索引关联的PMT表和CAT表对应的节目的资源,此时需要进一步的开启内核资源,创建相应的节目句柄;当所述索引关联的条件接收表表、节目映射表与上次接收到的条件接收表表、节目映射表相同时,则说明当前CA内核中开启过与所述索引关联的PMT表和CAT表对应的节目资源,此时不做任何处理即可。Step S320, when the conditional access table and program mapping table associated with the index corresponding to the multiple programs are different from the conditional access table and program mapping table received last time, the CA middleware uses the index as the calling CA Kernel opens the parameter of resource interface, opens kernel resource, obtains the program handle of described multiple programs that CA core creates; Simultaneously described conditional access table, program mapping table are sent CA core, and the program handle of described multiple programs is respectively Associate the corresponding index. During specific implementation, when the conditional access table and program mapping table associated with the index are different from the conditional access table and program mapping table received last time, it means that there is no PMT table and PMT table associated with the index in the current CA core. The resource of the program corresponding to the CAT table needs to further open the kernel resource at this time, and create a corresponding program handle; If the tables are the same, it means that the program resource corresponding to the PMT table and the CAT table associated with the index has been enabled in the current CA core, and no processing is needed at this time.
在所述步骤S400中,CA内核处理所述条件接收表和节目映射表的数据,通知CA中间件开解扰所需的接收授权管理信息(Entitlement Management Message,EMM)和授权控制信息(Entitlement Control Message,ECM)的数据通道;CA中间件根据所述多个节目各自对应的索引找到对应的底层数据通道ID,在对应的底层数据通道上开辟所述多个节目各自解扰所需的接收授权管理信息和授权控制信息的数据通道(openchanel)、以及设置音视频控制字(setCW)的解扰通道;具体实施时,CA内核处理PMT表和CAT表的数据,通知CA中间件开接收EMM和ECM数据的通道(对应于图2中的步骤④和⑤);CA中间件会根据CA内核提供的节目句柄或者ID,通过结构体数组3的对应关系找到索引,再根据索引去结构体数组1中找到对应的底层数据通道,然后在对应的底层数据通道上开解扰所需的接收ECM和EMM的数据通道以及设置音视频控制字CW的解扰通道;更具体的,通过索引找到对应的数据分配器(dmux),在数据分配器上开辟数据通道和解扰通道。In the step S400, the CA core processes the data of the conditional access table and the program mapping table, and notifies the CA middleware of receiving Entitlement Management Message (EMM) and Entitlement Control Message (Entitlement Control Message) required for descrambling. , ECM) data channel; the CA middleware finds the corresponding underlying data channel ID according to the corresponding indexes of the multiple programs, and opens up the receiving authorization management required for the respective descrambling of the multiple programs on the corresponding underlying data channel The data channel (openchanel) for information and authorization control information, and the descrambling channel for setting the audio and video control word (setCW); during specific implementation, the CA core processes the data of the PMT table and the CAT table, and notifies the CA middleware to open and receive EMM and ECM The data channel (corresponding to steps ④ and ⑤ in Figure 2); the CA middleware will find the index through the corresponding relationship of the structure array 3 according to the program handle or ID provided by the CA core, and then go to the structure array 1 according to the index Find the corresponding underlying data channel, and then open the data channel for receiving ECM and EMM required for descrambling on the corresponding underlying data channel and set the descrambling channel for the audio and video control word CW; more specifically, find the corresponding data allocation through the index The device (dmux) opens up data channels and descrambling channels on the data distributor.
在所述步骤S500中,CA内核根据所述条件接收表和节目映射表的数据,通过所述接收授权管理信息和授权控制信息的数据通道,,从底层驱动处获取授权管理信息和授权控制信息(对应于图2中的步骤⑥和⑦),并通过所述多个节目各自的解扰通道分别对所述多个节目进行解扰后,通知CA中间件所述多个节目的状态(对应于图2中的步骤⑧和⑨);CA中间件根据所述索引通知应用做出相应的状态处理(对应于图2中的步骤⑩)。具体实施时,CA内核接收到EMM和ECM数据,通知CA中间件节目的状态,CA中间件根据结构体数组3的对应关系找到索引,并通知给CA的应用,应用将节目的状态保存到对应索引的结构体数组2中并调用上层应用的接口做出状态处理,如A/V(Audio/Video,音频或视频)的开关控制或者错误码的显示。In the step S500, the CA core obtains the authorization management information and the authorization control information from the underlying driver through the data channel for receiving the authorization management information and the authorization control information according to the data in the conditional access table and the program mapping table (corresponding to steps ⑥ and ⑦ in Figure 2), and after descrambling the multiple programs through their respective descrambling channels, notify the CA middleware of the status of the multiple programs (corresponding to Steps ⑧ and ⑨ in Figure 2); the CA middleware notifies the application to make corresponding status processing according to the index (corresponding to step ⑩ in Figure 2). During specific implementation, the CA core receives the EMM and ECM data, and notifies the CA middleware of the program status. The CA middleware finds the index according to the corresponding relationship of the structure array 3, and notifies the CA application, and the application saves the program status to the corresponding Index structure array 2 and call the interface of the upper layer application for status processing, such as A/V (Audio/Video, audio or video) switch control or error code display.
需要说明的是,开启解扰通道后的解扰过程为现有技术,不是本发明的发明点,此处不再赘述。It should be noted that the descrambling process after the descrambling channel is enabled is a prior art, not an inventive point of the present invention, and will not be repeated here.
本发明所述支持多个节目同时解扰的方法,能够实现CA中间件支持多个节目同时解扰以及多个节目消息同时控制管理,从而能够使现有的CA不再限制应用的扩展,能同时处理多个节目及多个节目消息同时管理,可以应用于多种场景,如PIP,FCC,PVR等。The method for supporting simultaneous descrambling of multiple programs described in the present invention can realize that the CA middleware supports simultaneous descrambling of multiple programs and simultaneous control and management of multiple program messages, so that the existing CA no longer restricts the expansion of applications, and can Simultaneous processing of multiple programs and simultaneous management of multiple program messages can be applied to various scenarios, such as PIP, FCC, PVR, etc.
本发明还提供了一种支持多个节目同时解扰的方法具体应用实施例,如图3所示,本发明具体应用实施例的支持多个节目同时解扰的方法包括:The present invention also provides a specific application embodiment of a method for supporting simultaneous descrambling of multiple programs. As shown in FIG. 3 , the method for supporting simultaneous descrambling of multiple programs in the specific application embodiment of the present invention includes:
步骤S10、观看节目或用户启动某一功能;Step S10, watching a program or starting a certain function by the user;
步骤S11、应用通知包括该节目的多个节目的表数据以及相关的底层数据通道ID、数据源句柄给CA中间件,之后进入步骤S12;Step S11, the application notifies the table data of multiple programs including the program and the relevant underlying data channel ID and data source handle to the CA middleware, and then enters step S12;
步骤S12、判断是否针对各节目对应的底层数据通道ID、数据源句柄开辟过资源;当否时,则进入步骤S13,当是时,则进入步骤S14;Step S12, judging whether resources have been opened up for the underlying data channel ID and data source handle corresponding to each program; if not, then enter step S13, and when yes, then enter step S14;
步骤S13、CA中间件开辟内部资源管理,获取索引并记录播放器句柄和数据源类型,之后进入步骤S14;Step S13, the CA middleware opens up internal resource management, obtains the index and records the player handle and data source type, and then enters step S14;
步骤S14、CA中间件根据索引保存PMT表和CAT表及相关内容,之后进入步骤S15;Step S14, the CA middleware saves the PMT table and the CAT table and related content according to the index, and then enters the step S15;
步骤S15、判断索引对应的PMT表和CAT表是否与上次接收到的相同,当是时,则进入步骤S16,当否时,则进入步骤S17;Step S15, judging whether the PMT table and CAT table corresponding to the index are the same as those received last time, when yes, then enter step S16, and when no, then enter step S17;
步骤S16、不做处理;Step S16, do not process;
步骤S17、通知CA内核表数据,开启CA内核资源,之后进入步骤S18;Step S17, notify the CA core table data, open the CA core resource, and then enter step S18;
步骤S18、通过索引关联CA内核资源以及CA中间件开辟的资源,之后进入步骤S19;Step S18, correlating the CA kernel resources and the resources developed by the CA middleware through the index, and then entering step S19;
步骤S19、通过索引找到对应数据分配器,在数据分配器上开辟数据通道和解扰通道,并通知应用相关通道的状态,之后进入步骤S20;Step S19, find the corresponding data distributor through the index, open up a data channel and a descrambling channel on the data distributor, and notify the application of the state of the relevant channel, and then enter step S20;
步骤S20、应用针对通道获取播放器处理对应的状态。Step S20, the application obtains the status corresponding to the player processing for the channel.
本发明还提供了一种支持多个节目同时解扰的系统,如图4所示,包括:数据获取模块100、索引关联模块200、内核资源开启模块300、通道开辟模块400、解扰模块500,其中,The present invention also provides a system that supports simultaneous descrambling of multiple programs, as shown in FIG. ,in,
数据获取模块100,用于当用户开启一节目时,通过底层数据通道同时从底层驱动处获取包括该节目及其他节目的多个节目分别对应的条件接收表和节目映射表以及与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系,并通知给CA中间件;其中,所述对应关系包括底层数据通道ID、数据源句柄;具体如上所述。The data obtaining module 100 is used to obtain the conditional access table and program mapping table corresponding to multiple programs including the program and other programs from the bottom drive at the same time through the bottom data channel when the user starts a program, as well as the corresponding The corresponding relationship between the application, CA middleware, and underlying data channel related to the program is notified to the CA middleware; wherein, the corresponding relationship includes the underlying data channel ID and data source handle; the details are as described above.
索引关联模块200,用于CA中间件开辟资源保存接收到的所述条件接收表、节目映射表以及所述对应关系,将所述多个节目各自的底层数据通道ID和数据源句柄分别保存在对应的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系分别都关联对应的所述索引;具体如上所述。The index association module 200 is used for the CA middleware to open up resources and save the received conditional access table, program mapping table and the corresponding relationship, and store the respective underlying data channel IDs and data source handles of the multiple programs in the In the corresponding array element, the subscript variable of the array element is then used as an index, and the conditional access table, the program mapping table and the corresponding relationship corresponding to the plurality of programs are respectively associated with the corresponding index ; specifically as described above.
内核资源开启模块300,用于CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引;具体如上所述。The core resource opening module 300 is used for the CA middleware to use the index as the parameter of calling the CA core open resource interface, open the core resource, and obtain the program handle of the plurality of programs created by the CA core; simultaneously the conditional access table, The program mapping table sends the CA core, and associates the program handles of the multiple programs with the corresponding indexes; the details are as described above.
通道开辟模块400,用于CA内核处理所述条件接收表和节目映射表的数据,通知CA中间件开解扰所需的接收授权管理信息和授权控制信息的数据通道;CA中间件根据所述多个节目各自对应的索引找到对应的底层数据通道ID,在对应的底层数据通道上开辟所述多个节目各自解扰所需的接收授权管理信息和授权控制信息的数据通道、以及设置音视频控制字的解扰通道;具体如上所述。The channel opening module 400 is used for the CA core to process the data of the conditional access table and the program mapping table, and notify the CA middleware to open the data channel for receiving authorization management information and authorization control information required for descrambling; Each corresponding index of each program finds the corresponding underlying data channel ID, opens up the data channel for receiving authorized management information and authorized control information required for the respective descrambling of the plurality of programs on the corresponding underlying data channel, and sets the audio and video control Word descrambling channel; specifically as described above.
解扰模块500,用于CA内核根据所述条件接收表和节目映射表的数据,通过所述接收授权管理信息和授权控制信息的数据通道,从底层驱动处获取授权管理信息和授权控制信息,并通过所述多个节目各自的所述解扰通道分别对所述多个节目进行解扰后,通知CA中间件所述多个节目的状态;CA中间件根据所述索引通知应用做出相应的状态处理;具体如上所述。The descrambling module 500 is used for the CA core to obtain the authorization management information and authorization control information from the underlying driver through the data channel for receiving the authorization management information and authorization control information according to the data in the conditional access table and the program mapping table, After descrambling the multiple programs through the respective descrambling channels of the multiple programs, notify the CA middleware of the states of the multiple programs; the CA middleware notifies the application according to the index to make a corresponding The state handling of the ; as described above.
进一步的,所述与所述多个节目分别相关的应用、CA中间件、底层数据通道之间的对应关系包括:Further, the corresponding relationship among the applications, CA middleware, and underlying data channels respectively related to the multiple programs includes:
应用与CA中间以及底层数据通道的对应关系,成员为数据源句柄、底层数据通道ID、正在使用的标识;The corresponding relationship between the application and the CA intermediate and underlying data channel, the members are the data source handle, the underlying data channel ID, and the identifier being used;
CA中间件与应用的对应关系,成员为正在使用的标识、播放器句柄、数据源类型、错误码、音频状态、视频状态。The corresponding relationship between CA middleware and applications, the members are the identifier in use, player handle, data source type, error code, audio status, and video status.
进一步的,所述索引关联模块200具体包括:Further, the index association module 200 specifically includes:
第一判断单元,用于CA中间件接收到所述条件接收表、节目映射表以及所述对应关系后,分别判断所述多个节目各自的底层数据通道ID和数据源句柄是否已保存在CA中间件的数组元素中;具体如上所述。The first judging unit is used for CA middleware to judge respectively whether the underlying data channel IDs and data source handles of the multiple programs have been stored in the CA after receiving the conditional access table, the program mapping table and the corresponding relationship. in the middleware array element; as described above.
索引关联单元,用于当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引,并将所述多个节目对应的所述条件接收表、节目映射表以及所述对应关系都分别关联对应的所述索引;具体如上所述。An index associating unit, configured to associate the respective underlying data channel IDs of the multiple programs when the respective underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware , data source handles are respectively stored in unused array elements, and then the subscript variable of the array element is used as an index, and the conditional access table, program mapping table and the corresponding relationship corresponding to the plurality of programs are stored are respectively associated with the corresponding indexes; the details are as described above.
进一步的,所述索引关联单元具体包括:Further, the index association unit specifically includes:
索引生成单元,用于当所述多个节目各自的所述底层数据通道ID、数据源句柄没有在CA中间件的数组元素中存在时,将所述多个节目各自的所述底层数据通道ID、数据源句柄分别保存在未使用的数组元素中,然后将所述数组元素的下标变量作为索引;具体如上所述。An index generating unit, configured to use the respective underlying data channel IDs of the multiple programs when the respective underlying data channel IDs and data source handles of the multiple programs do not exist in the array elements of the CA middleware , and the data source handle are respectively stored in unused array elements, and then the subscript variable of the array element is used as an index; the details are as described above.
第一关联单元,用于将所述索引作为保存应用发送给CA中间件的数据源类型、播放器句柄以及设置正在使用的标识的数组的下标变量;具体如上所述。The first associating unit is configured to use the index as a subscript variable of an array that saves the data source type sent to the CA middleware by the application, the player handle, and the array that is being used; specifically as described above.
第二关联单元,用于将所述索引作为保存所述条件接收表、节目映射表的数组的下标变量;具体如上所述。The second associating unit is configured to use the index as a subscript variable of an array storing the conditional access table and the program mapping table; details are as described above.
进一步的,所述内核资源开启模块300具体包括:Further, the kernel resource opening module 300 specifically includes:
第二判断单元,用于CA中间件分别判断所述多个节目对应的索引关联的条件接收表、节目映射表是否与上次接收到的条件接收表、节目映射表相同;具体如上所述。The second judging unit is used for the CA middleware to respectively judge whether the conditional access table and program mapping table associated with the indexes corresponding to the multiple programs are the same as the conditional access table and program mapping table received last time; the details are as described above.
内核资源开启单元,用于当所述多个节目对应的所述索引关联的条件接收表、节目映射表与上次接收到的条件接收表表、节目映射表不同时,CA中间件将所述索引作为调用CA内核开资源接口的参数,开启内核资源,获取CA内核创建所述多个节目的节目句柄;同时将所述条件接收表、节目映射表发送CA内核,并将所述多个节目的节目句柄分别关联对应的所述索引;具体如上所述。The kernel resource opening unit is used for when the conditional access table and program mapping table associated with the index corresponding to the plurality of programs are different from the conditional access table and program mapping table received last time, the CA middleware will The index is used as the parameter of calling the CA kernel to open the resource interface, and the kernel resource is opened to obtain the program handle of the plurality of programs created by the CA kernel; simultaneously, the conditional access table and the program mapping table are sent to the CA kernel, and the plurality of programs are sent to the CA kernel. The program handles of are respectively associated with the corresponding indexes; the details are as described above.
综上所述,本发明提供了一种支持多个节目同时解扰的方法及系统,本发明所述支持多个节目同时解扰的方法,能够使CA更好的支持应用扩展,且应用扩展时对CA中间件部分的修改影响很小,能够更迅速的集成涉及到多路数据处理的功能,兼容性更强;本发明可以使现有的CA不再限制应用的扩展,能同时处理多个节目及多个节目消息同时管理,可以应用于多种场景。To sum up, the present invention provides a method and system for supporting simultaneous descrambling of multiple programs. The method for supporting simultaneous descrambling of multiple programs in the present invention can enable CA to better support application expansion, and application expansion The modification of the CA middleware part has little influence at the time, and it can more quickly integrate the functions related to multi-channel data processing, and the compatibility is stronger; One program and multiple program messages can be managed at the same time, which can be applied to various scenarios.
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that the application of the present invention is not limited to the above examples, and those skilled in the art can make improvements or transformations according to the above descriptions, and all these improvements and transformations should belong to the protection scope of the appended claims of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710090542.6A CN106803979B (en) | 2017-02-20 | 2017-02-20 | A method and system supporting simultaneous descrambling of multiple programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710090542.6A CN106803979B (en) | 2017-02-20 | 2017-02-20 | A method and system supporting simultaneous descrambling of multiple programs |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106803979A CN106803979A (en) | 2017-06-06 |
CN106803979B true CN106803979B (en) | 2019-10-11 |
Family
ID=58988456
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710090542.6A Active CN106803979B (en) | 2017-02-20 | 2017-02-20 | A method and system supporting simultaneous descrambling of multiple programs |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106803979B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107592558B (en) * | 2017-06-09 | 2020-08-04 | 青岛海信宽带多媒体技术有限公司 | Interaction method and device for CA middleware in set top box |
CN107566886A (en) * | 2017-09-21 | 2018-01-09 | 成都德芯数字科技股份有限公司 | Program de-scrambling method and device |
CN108616580B (en) * | 2018-04-10 | 2021-03-26 | 广州新科佳都科技有限公司 | Distributed system based on ICE message middleware and data transmission method thereof |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1804508B1 (en) * | 2006-01-03 | 2009-12-09 | Irdeto Access B.V. | Method of descrambling a scrambled content data object |
CN100571371C (en) * | 2007-03-12 | 2009-12-16 | 青岛海信电器股份有限公司 | A set-top box dual-channel descrambling method and a set-top box using the method |
CN101087376A (en) * | 2007-06-27 | 2007-12-12 | 北京海尔集成电路设计有限公司 | One-to-two digital TV receiving system |
CN105791954B (en) * | 2014-12-23 | 2019-02-01 | 深圳Tcl新技术有限公司 | Digital TV terminal condition receiving method, terminal and system |
-
2017
- 2017-02-20 CN CN201710090542.6A patent/CN106803979B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106803979A (en) | 2017-06-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100848131B1 (en) | Method for managing audiovisual broadcast recordings and associated devices | |
US12177498B2 (en) | Systems and methods for facilitating seamless flow content splicing | |
JP4755768B2 (en) | Method and receiver for displaying broadcast transmission information and recorded transmission information having common characteristics | |
US8234668B2 (en) | Content access | |
US20030009757A1 (en) | Method for displaying channel listings in an electronic program guide and an electronic program guide implementing the method | |
CN100521750C (en) | Digital TV and channel setting method | |
CN101536520A (en) | Management of profiles for interactive media guidance applications | |
CN106803979B (en) | A method and system supporting simultaneous descrambling of multiple programs | |
CN102047679A (en) | Device for recording and playing contents, server for managing content location information, information recording medium, method for managing content information | |
US20070203714A1 (en) | Purchasable Token Bandwidth Portioning | |
CN103945232A (en) | Television resource scheduling method and device | |
CN109474839A (en) | The method and device of EPG user interface is shown when broadcasting program broadcast | |
JP2006042366A (en) | Methods and systems for constructing and editing electronic program guide lineups | |
US10129588B2 (en) | Digital broadcasting receiver, method for controlling digital broadcasting receiver, server, method for controlling server, and computer-readable medium | |
WO2007024107A1 (en) | Method and apparatus for managing tuners for broadcasting service in home network | |
CN107426616B (en) | Intelligent digital television system data processing method and processing device | |
JP6278529B2 (en) | System, method, and computer-readable medium for local content storage in a media network | |
EP1961233B1 (en) | Enhanced parental control | |
WO2015096626A1 (en) | Smart television 3d setting information processing method and device | |
EP1703733A1 (en) | System for processing of television data streams and method for processing of television data streams | |
CN109040831B (en) | Playing method and device for multi-scene channel searching and computer readable storage medium | |
WO2009114005A1 (en) | Media source selection based on source quality | |
TWI528796B (en) | A scene sowing system, method, and recording medium applied to a plurality of media channels | |
CN110958407A (en) | Control method and device for television wall scene | |
CN1125561C (en) | Method and device for service data management in television system |
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 |