Summary of the invention
The embodiment of the present invention proposes a kind of set-top box and its communication means, can be optimal communication efficiency, and reduce SIM
Block and the hardware space of set-top box is occupied.
The embodiment of the present invention provides a kind of set-top box, including master chip and the PCIE mould group connecting with the master chip;
The PCIE mould group includes SIM card and virtual card;
The SIM card is used to send communication handover to backstage, and receive the backstage root in set-top box initialization
The virtual card data fed back according to the communication handover;The communication handover includes the set-top box present position can
The optimal network being connected to;
The master chip cuts SIM card communication pattern for saving the virtual card data into the virtual card
It is changed to virtual card communication pattern;
The virtual card is communicated for connecting the optimal network.
Further, the SIM card is also used to attempt to be attached with different operators network, and according to the letter after connection
Number quality obtains the strongest carrier network of signal quality as optimal network.
Further, the master chip is specifically used for saving the virtual card data into the virtual card, and to institute
It states virtual card to be authenticated, if authenticating successfully, SIM card communication pattern is switched to virtual card communication pattern.
Further, the virtual card is also used in set-top-box opening, connects the optimal network, and detection is described most
The signal quality of excellent network, if the signal quality of the optimal network is deteriorated, it tries be connected to the network with different operators, again
Select optimal network.
Further, the set-top box further includes the WIFI mould group connecting with the master chip, infrared remote control port, HDMI
Port;
The master chip is also used to that set top box information is pushed to the PCIE mould group and is infused when set-top box initializes
Volume, and after succeeding in registration, set-top box state flow information is pushed to the PCIE mould group;The set-top box state flow information
Including WIFI connecting detection result, HDMI testing result, infrared detections, orientation traffic statistics and WIFI traffic statistics;
The SIM card is also used to be communicated and authenticated with the backstage.
Correspondingly, the embodiment of the present invention provides a kind of communication means of set-top box, can be applied in above-mentioned set-top box.Institute
Stating set-top box includes master chip and the PCIE mould group connecting with the master chip;The PCIE mould group includes SIM card and virtual
Card;
In set-top box initialization, the SIM card sends communication handover to backstage;The communication handover includes
The optimal network that the set-top box present position is connectable to;
The SIM card receives the virtual card data that the backstage is fed back according to the communication handover;
The master chip saves the virtual card data into the virtual card, and SIM card communication pattern is switched to
Virtual card communication pattern;
The virtual card connects the optimal network and is communicated.
Further, before the SIM card sends communication handover to backstage, further includes:
The SIM card trial is attached with different operators network, and according to the signal quality after connection, obtains signal
The strongest carrier network of quality is as optimal network.
Further, the master chip saves the virtual card data into the virtual card, and SIM card is communicated mould
Formula is switched to virtual card communication pattern, specifically includes:
The master chip saves the virtual card data into the virtual card, and authenticates to the virtual card,
If authenticating successfully, SIM card communication pattern is switched to virtual card communication pattern.
Further, after the virtual card connection optimal network is communicated, further includes:
In set-top-box opening, the virtual card connects the optimal network, and detects the signal matter of the optimal network
Amount, if the signal quality of the optimal network is deteriorated, it tries be connected to the network with different operators, select optimal network again.
Further, the set-top box further includes the WIFI mould group connecting with the master chip, infrared remote control port, HDMI
Port;
Before the SIM card sends communication handover to backstage, further includes:
Set top box information is pushed to the PCIE mould group and registered by the master chip, and after succeeding in registration, to institute
State PCIE mould group push set-top box state flow information;The set-top box state flow information include WIFI connecting detection result,
HDMI testing result, infrared detections, orientation traffic statistics and WIFI traffic statistics;
The SIM card is communicated and is authenticated with the backstage.
The implementation of the embodiments of the present invention has the following beneficial effects:
Set-top box first passes through SIM card and background communication, further according to the signal strength or weakness of current operator network, obtains from backstage
The virtual card data of optimal network, and be switched to respective virtual and be clamped and communicated into optimal network, it is ensured that set-top box has most
Excellent communication efficiency, and reduce SIM card and the hardware space of mobile terminal is occupied.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The structural schematic diagram of one embodiment of set-top box provided by the invention referring to Fig. 1, including master chip 1 and
The PCIE mould group 2 being connect with the master chip 1;The PCIE mould group 2 includes SIM card 21 and virtual card 22;
The SIM card 21 is used to send communication handover to backstage, and receive the backstage in set-top box initialization
The virtual card data fed back according to the communication handover;The communication handover includes set-top box present position energy
The optimal network being enough connected to;
The master chip 1 cuts SIM card communication pattern for saving the virtual card data into the virtual card
It is changed to virtual card communication pattern;
The virtual card 22 is communicated for connecting the optimal network.
It should be noted that SIM card is generally 2G SIM card, virtual card is generally 4G virtual card.Master chip is mainly used for
Realize the functions such as decoding, the UI operation of set-top box, PCIE mould group completes the connection of 4G network in a manner of USB network card and data are led to
Letter.Backstage manages the card of different operators by backstage cloud platform.
Set-top box present position is different, and the signal strength or weakness of operator is different.In set-top box first time opening initialization,
SIM card and background communication are simultaneously authenticated, and after the authentication is passed, are connectable to backstage transmitter top box present position optimal
Network after receiving the optimal network from the background, chooses virtual card data corresponding with the optimal network, generally 4G from card pond
Card data, and feed back to master chip by SIM card, master chip saves virtual card data into local virtual card, and by 2G
SIM card communication pattern is switched to 4G virtual card communication pattern, and virtual card can access optimal network, set-top box is made to pass through virtual card
It is communicated.This implementation column quickly and easily can switch over letter by virtual card according to the signal strength or weakness of local operator
Number, optimal network is accessed, while reducing SIM card and occupying to the hardware space of mobile terminal.
Further, the SIM card is also used to attempt to be attached with different operators network, and according to the letter after connection
Number quality obtains the strongest carrier network of signal quality as optimal network.
It should be noted that SIM card before sending communication handover to backstage, is attempted and different carrier networks
It is attached, detects the signal quality of different operators network, the strongest carrier network of selection signal quality is as optimal net
Network, to guarantee that set-top box has optimal communication effect.
Further, the master chip is specifically used for saving the virtual card data into the virtual card, and to institute
It states virtual card to be authenticated, if authenticating successfully, SIM card communication pattern is switched to virtual card communication pattern.
It should be noted that saving by virtual card data to virtual card, also need to authenticate virtual card, to ensure
Virtual card being capable of normal use.After the authentication has been successful, SIM card communication pattern is switched to virtual card communication pattern, realizes 2G net
Network to 4G network switching, to guarantee the optimal communication effect of set-top box.
Further, the virtual card is also used in set-top-box opening, connects the optimal network, and detection is described most
The signal quality of excellent network, if the signal quality of the optimal network is deteriorated, it tries be connected to the network with different operators, again
Select optimal network.
It should be noted that the optimal network is recorded and is saved, makes set-top box under after master chip chooses optimal network
The optimal network is directly connected to when secondary booting.But if set-top box finds this most during connecting the optimal network next time
The signal of excellent network is deteriorated, then reattempts to connection different operators network and current optimal network is selected to be attached, to protect
Card set-top box is constantly in optimal communication state.
Further, the set-top box further includes the WIFI mould group connecting with the master chip, infrared remote control port, HDMI
Port;
The master chip is also used to that set top box information is pushed to the PCIE mould group and is infused when set-top box initializes
Volume, and after succeeding in registration, set-top box state flow information is pushed to the PCIE mould group;The set-top box state flow information
Including WIFI connecting detection result, HDMI testing result, infrared detections, orientation traffic statistics and WIFI traffic statistics;
The SIM card is also used to be communicated and authenticated with the backstage.
It should be noted that the master chip of set-top box is accessed and is controlled PCIE mould group by http api.In set-top box
When primary booting, master chip push set top box information is registered to PCIE mould group, wherein set top box information include SN, MAC and
IP etc..After succeeding in registration, set-top box pushes set-top box state flow information to PCIE mould group.
It referring to fig. 2, is the software frame schematic diagram of set-top box provided in an embodiment of the present invention.The software frame of set-top box point
For bottom, hardware abstraction layer, Framework layers and application layer.Wherein, bottom includes USB driving, for supporting USB flash disk and 4G mould
Group;WiFi driving, for supporting WiFi mould group;IR driving, for supporting IR remote controller;EMMC driving, for supporting EMMC;
HEMI driving, for supporting HDMI2.0 to export;GPIO driving, powers on for controlling LED and 4G mould group;Serial port drive is used for
Support serial ports debug function;DDR driving, for supporting DDR.In addition, bottom also supports the texts such as EXT2, EXT3, EXT4, NTFS
Part system.Framework layers include Activity Manager, Window Manager, Content Provider,
Package Manager, View System, Wifi Manager, Power Manager etc..Application layer includes
The APK such as TVlauncher, OTA upgrading, Setting.
In set-top box starting, Uboot guides Kernel starting, and then load driver guidance Android starting, to make
Obtain Android starting.In set-top box standby, PhoneWindowManager receives the signal of Power key, sends broadcast
Com.fengzhushou.FZS_POWER_ACTIONS, Launcher receive broadcast pop-up standby interface, standby wide using sending
Broadcasting makes set-top box standby.
In addition, set-top-box system memory is optimised, it is divided into three aspects: internal memory optimization management, mainly management third
Fang Yingyong starting up is obtained the apk packet name and class name of registration self-starting by getPackageReceiver, then passed through
Shell script sh executes order: pm disable self-starting packet name/class name forbids self-starting, so that third-party application be avoided to open
Machine starts committed memory;The adjustment of APK priority guarantees that the priority of desktop is higher than the background service of other tripartites, guarantees to face directly
Normal work;According to the service condition of memory, the background service number of memory is adjusted, guarantees that the memory of foreground application uses.
Set-top box provided by the invention, can set-top box first pass through SIM card and background communication, further according to current operator net
The signal strength or weakness of network, from backstage obtain optimal network virtual card data, and be switched to respective virtual be clamped into optimal network into
Row communication, it is ensured that set-top box has optimal communication effect, and reduces SIM card and occupy to the hardware space of mobile terminal.
Correspondingly, can be applied in above-mentioned set-top box the present invention also provides a kind of communication means of set-top box.
It is the flow diagram of one embodiment of the communication means of set-top box provided by the invention, the machine referring to Fig. 3
Top box includes master chip and the PCIE mould group connecting with the master chip;The PCIE mould group includes SIM card and virtual card;
S1, set-top box initialization when, the SIM card to backstage send communication handover;The communication handover
The optimal network being connectable to including the set-top box present position;
S2, the SIM card receive the virtual card data that the backstage is fed back according to the communication handover;
The virtual card data are saved into the virtual card, and SIM card communication pattern are switched by S3, the master chip
For virtual card communication pattern;
S4, the virtual card connect the optimal network and are communicated.
Further, before the SIM card sends communication handover to backstage, further includes:
The SIM card trial is attached with different operators network, and according to the signal quality after connection, obtains signal
The strongest carrier network of quality is as optimal network.
Further, the master chip saves the virtual card data into the virtual card, and SIM card is communicated mould
Formula is switched to virtual card communication pattern, specifically includes:
The master chip saves the virtual card data into the virtual card, and authenticates to the virtual card,
If authenticating successfully, SIM card communication pattern is switched to virtual card communication pattern.
Further, after the virtual card connection optimal network is communicated, further includes:
In set-top-box opening, the virtual card connects the optimal network, and detects the signal matter of the optimal network
Amount, if the signal quality of the optimal network is deteriorated, it tries be connected to the network with different operators, select optimal network again.
Further, the set-top box further includes the WIFI mould group connecting with the master chip, infrared remote control port, HDMI
Port;
Before the SIM card sends communication handover to backstage, further includes:
Set top box information is pushed to the PCIE mould group and registered by the master chip, and after succeeding in registration, to institute
State PCIE mould group push set-top box state flow information;The set-top box state flow information include WIFI connecting detection result,
HDMI testing result, infrared detections, orientation traffic statistics and WIFI traffic statistics;
The SIM card is communicated and is authenticated with the backstage.
Referring to fig. 4, be set-top box provided by the invention communication means another embodiment flow diagram, packet
It includes:
S41, it authenticates and communicates with rear decometer pond by 2G card.Wherein, 2G card is SIM card.
The information such as S42, the operation 4G network signal quality for uploading selection.
S43, Ka Chi issue 4G card data, are saved in local virtual card.
The certification of S44,4G card, after authenticating successfully, is switched to 4G cartoon letters mode.Wherein, 4G card is virtual card.
The communication means of set-top box provided by the invention, can set-top box first pass through SIM card and background communication, further according to working as
The signal strength or weakness of preceding carrier network, from backstage obtain optimal network virtual card data, and be switched to respective virtual be clamped into
Optimal network is communicated, it is ensured that set-top box has optimal communication effect, and reduces SIM card and account for the hardware space of mobile terminal
With.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art
For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as
Protection scope of the present invention.