Invention content
The purpose of the embodiment of the present invention is to provide a kind of Internet of Things communication control method and device, gateway, machine readable deposits
Storage media, the Internet of Things communication control method and device, gateway, machine readable storage medium can make a variety of communication modules mutual
It is noiseless in coexisting in Internet of Things, to ensure communication stability and reliability.
To achieve the goals above, the embodiment of the present invention provides a kind of Internet of Things communication control method, which passes through
Multiple communication modules are communicated, and this method includes:Communication request signal is received, communication request signal request passes through described more
One of a communication module carries out service communication;Determine the respective ongoing service communication of the multiple communication module, and really
The fixed requested service communication of the communication request signal ongoing business respective compared to the multiple communication module
The priority of communication;And the requested service communication of the communication request signal respectively compared to the multiple communication module
Ongoing service communication have higher priority in the case of, block the ongoing service communication, and execute institute
State the requested service communication of communication request signal.
Wherein, this method further includes:When confirming, not deposit the respective ongoing business of the multiple communication module logical
When letter, then the requested service communication of the communication request signal is executed;When there are the multiple communication module is in progress
Service communication, and the requested service communication of the communication request signal is respective compared to the multiple communication module just
When the service communication of progress has lower priority, the requested service communication of the request signal is not executed.
Wherein, described blocking ongoing service communication, and execute the requested business of the communication request signal
Communication includes:Send out disabling signal to the communication module for carrying out the ongoing service communication, with described in blocking into
Capable service communication.
Wherein, the communication module includes at least one of WiFi module and following the two:Zigbee module, bluetooth
Module.
Wherein, the priority orders of the service communication can be preferably from low to high:Common bluetooth service, common WiFi
Business, advanced bluetooth service, advanced WiFi business;And/or common Zigbee business, common WiFi business, advanced Zigbee industry
Business, advanced WiFi business.
Internet of Things communication control unit also a kind of according to another aspect of the present invention, the device include:Receiving module receives
Communication request signal, communication request signal request carry out service communication by one of the multiple communication module;Control module,
For determining the respective ongoing service communication of the multiple communication module, and determine that the communication request signal is asked
Service communication ongoing service communication respective compared to the multiple communication module priority, and described logical
The letter requested service communication of request signal ongoing service communication respective compared to the multiple communication module has
In the case of higher priority, the ongoing service communication is blocked, and executes the requested industry of the communication request signal
Business communication
Wherein, control module is additionally operable to:The respective ongoing business of the multiple communication module is not deposited when confirming
When communication, then the requested service communication of the communication request signal is executed;When there are the multiple communication modules to carry out
In service communication, and the requested service communication of the communication request signal is respective compared to the multiple communication module
When ongoing service communication has lower priority, the requested service communication of the request signal is not executed.
Wherein, control module can be also used for:Resistance is sent out to the communication module for carrying out the ongoing service communication
Break signal, to block the ongoing service communication.
Wherein, the communication module may include at least one of WiFi module and following the two:Zigbee module,
Bluetooth module.
Wherein, the priority orders of the service communication can be preferably from low to high:Common bluetooth service, common WiFi
Business, advanced bluetooth service, advanced WiFi business;And/or common Zigbee business, common WiFi business, advanced Zigbee industry
Business, advanced WiFi business.
According to another aspect of the present invention, a kind of gateway is also provided, which includes Internet of Things Network Communication control described above
Device processed.
In accordance with a further aspect of the present invention, a kind of machine readable storage medium is also provided, on the machine readable storage medium
It is stored with controller instruction, controller instruction is for so that the controller executes Internet of Things communication control side described above
Method.
Through the above technical solutions, the communication in Internet of Things between simultaneous a variety of communication modules can be avoided effectively
Interference improves communication success rate, to improve product reliability of operation and stability so that a variety of communication modules can be in object
In networking and deposit.And technical solution through the invention as a result, is more advantageous to the future development of Internet of Things Network Communication.
The other feature and advantage of the embodiment of the present invention will be described in detail in subsequent specific implementation environment division.
Equipment is embodied
The specific implementation equipment of the embodiment of the present invention is described in detail below in conjunction with attached drawing.It should be understood that this
The described specific implementation equipment in place is merely to illustrate and explain the present invention embodiment, is not intended to restrict the invention embodiment.
Fig. 1 is the structural schematic diagram of gateway according to an embodiment of the invention.As shown in Figure 1, gateway 100 includes processor
110, WiFi module 120, bluetooth module 130, Zigbee module 140, WiFi module 120, bluetooth module 130, Zigbee module
140 connect (not shown) by bus with processor 110.Wherein, processor 110 and WiFi module can for example be selected certainly
Arm processor with WiFi function, but the present invention is not limited thereto, and those skilled in the art can also need to select according to practice
The processor of control function and independent WiFi module can be realized with other.
As shown in Figure 1, hardware connection can be established between processor 110 and bluetooth module by three condition lines, respectively
It is BT_ACTIVE, BT_STATUS, WL_DENY.Wherein, bluetooth module 130 can be defeated to processor 110 by BT_ACTIVE
Go out an electric signal, indicates that bluetooth module 130 just in transmission data or reception data, that is, is carrying out service communication, the electric signal
Such as can be high level signal or low level signal;Bluetooth module 130 can be exported by BT_STATUS to processor 110
One communication request signal indicates that the request of bluetooth module 130 carries out service communication;Processor 110 is blocked by WL_DENY outputs one
Signal is to bluetooth module 130, to block service communication of the bluetooth module in positive row.
Hardware connection can also be established between processor 110 and Zigbee module by three condition lines, is ZB_ respectively
ACTIVE,ZB_STATUS,WL_DENY.Wherein, Zigbee module 140 can export one by ZB_ACTIVE to processor 110
Electric signal indicates that Zigbee module 140 just in transmission data or reception data, that is, is carrying out service communication, the electric signal example
Such as can be high level signal or low level signal;Zigbee module 140 can export communication request letter by ZB_STATUS
Number, indicate that the request of Zigbee module 140 carries out service communication;Processor 110 can export a disabling signal by WL_DENY and arrive
Zigbee module 140, to block service communication of the Zigbee module in positive row.
Communication request signal and disabling signal described above for example can be a high level signal or low level signal.But
The present invention is not limited thereto, and communication request signal can also send or receive by other means, such as can be by bus to place
Reason device sends or receives communication request signal.
In view of in intelligent domestic, WiFi is normally occupied leading position, therefore, in the present embodiment can preferably by
The service communication of WiFi module is set as high priority, and when WiFi module needs to carry out service communication, and processor passes through
BT_ACTIVE or ZB_ACTIVE confirms bluetooth module 130 or when Zigbee module 140 is carrying out service communication, processor
110 can export a disabling signal respectively by WL_DENY to bluetooth module 130 or Zigbee module 140, to block bluetooth module
130 or 140 ongoing service communication of Zigbee module, the service communication of WiFi module is then executed,.When WiFi module needs
When carrying out service communication, and processor confirmed there is no bluetooth module 130 by BT_ACTIVE and ZB_ACTIVE or
When 140 ongoing service communication of Zigbee module, then the service communication of WiFi module can be directly executed.It can avoid as a result,
When WiFi module 120 carries out service communication, interfered by other communication modules.Although but should be noted that in Fig. 1 not
It shows, but WiFi module 120 can also be connect by condition line as described above with processor.
When bluetooth module 130 or Zigbee module 140 need carry out service communication when, can respectively by BT_STATUS,
ZB_STATUS sends out a communication request signal to processor, at this point, if WiFi module handles idle state, can perform indigo plant
140 requested service communication of tooth module 130 or Zigbee module.
Preferably, the priority of bluetooth service, Zigbee business and WiFi business can also be divided.For example, can be with
Bluetooth module, Zigbee module, the respective business of WiFi module (inquiry, paging, monitoring, broadcast, scanning etc.) are divided into general
Logical bluetooth service and advanced bluetooth service, common Zigbee business and advanced Zigbee business, common WiFi business and advanced
WiFi business.And division priority is carried out to the service communication of all kinds of business of the above modules, when there is no be carrying out
In high priority service communication when, can perform low priority service communication.The service communication of low priority is carrying out,
But when needing to execute the service communication of high priority, the service communication of low priority can be blocked.
Fig. 2 is the flow chart of Internet of Things communication control method according to an embodiment of the invention.As shown in Fig. 2, this method
Include the following steps:
In step S210, communication request signal is received, communication request signal request passes through the multiple communication module
One of carry out service communication.For example, the communication request signal can be from the bottom of above-mentioned bluetooth module, Zigbee module, WiFi moulds
Block.
In step S220, the respective ongoing service communication of the multiple communication module is determined.
In step S230, determine the requested service communication of the communication request signal compared to the multiple communication mould
The priority of the respective ongoing service communication of block.
In step S240, determine the requested industry power communication of the communication request signal compared to the multiple communication mould
Whether the respective ongoing service communication of block has higher priority.
In step s 250, in the requested service communication of the communication request signal compared to the multiple communication module
In the case that respective ongoing service communication has higher priority, the ongoing service communication is blocked.
In step S260, the requested service communication of the communication request signal is executed.
Fig. 3 is the flow chart of Internet of Things communication control method according to an embodiment of the invention.As shown in figure 3, this method
Include the following steps:
In step S310, communication request signal is received, communication request signal request passes through the multiple communication module
One of carry out service communication.
In step s 320, it is determined whether there are the respective ongoing service communication of the multiple communication module, when
It confirms when not depositing the respective ongoing service communication of the multiple communication module, thens follow the steps S380.
In step S330, when there are the multiple communication module service communication in progress, determine described logical
Believe the excellent of the requested service communication of request signal ongoing service communication respective compared to the multiple communication module
First grade.
In step S340, determine the requested industry power communication of the communication request signal compared to the multiple communication mould
Whether the respective ongoing service communication of block has higher priority.
In step S350, in the requested service communication of the communication request signal compared to the multiple communication module
In the case that respective ongoing service communication has higher priority, the ongoing service communication is blocked.
In step S360, determine the requested industry power communication of the communication request signal compared to the multiple communication mould
Whether the respective ongoing service communication of block has lower priority.
In step S370, the requested service communication of communication request signal is each compared to the multiple communication module
From ongoing service communication have lower priority when, do not execute the requested service communication of the request signal.
In step S380, the requested service communication of the communication request signal is executed.
It is being carried out when the requested industry service communication of the communication request signal is respective compared to multiple communication modules
Service communication priority having the same when, step S380 can also be executed, that is, execute the communication request signal and asked
Service communication.
For example, when Zigbee module and weaker bluetooth module signal, the interference between two kinds of communication modules may
Seldom, communication stability is not interfered with, therefore, the priority of Zigbee business and bluetooth service can be set to similarity priority
Grade, when bluetooth module sends out communication request signal, if only having the ongoing service communication of Zigbee module at this time,
Zigbee service communications in progress need not be blocked, it is logical can directly to allow to execute the requested business of the communication request signal
Letter.
Wherein, described blocking ongoing service communication, and execute the requested business of the communication request signal
Communication includes:Send out disabling signal to the communication module for carrying out the ongoing service communication, with described in blocking into
Capable service communication.
Wherein, the communication module may include at least one of WiFi module and following the two:Zigbee module,
Bluetooth module.
Wherein, the priority orders of the service communication are preferably from low to high:Common bluetooth service, common WiFi industry
Business, advanced bluetooth service, advanced WiFi business;And/or common Zigbee business, common WiFi business, advanced Zigbee industry
Business, advanced WiFi business.
Fig. 4 is the structure diagram of Internet of Things communication control unit according to an embodiment of the invention.As shown in figure 4, the dress
Set including:Receiving module 410, receive communication request signal, the communication request signal request by the multiple communication module it
One carries out service communication;Control module 420, for determining the respective ongoing service communication of the multiple communication module,
And determine that the requested service communication of communication request signal is respective compared to the multiple communication module ongoing
The priority of service communication, and in the requested service communication of the communication request signal compared to the multiple communication module
In the case that respective ongoing service communication has higher priority, the ongoing service communication is blocked, and hold
The row requested service communication of communication request signal.Control module 420 for example can be processor 110 as shown in Figure 1,
It can be any control device that can realize function of the present invention such as microcontroller, FPGA, PLC.
Wherein, control module 420 is additionally operable to:The respective ongoing industry of the multiple communication module is not deposited when confirming
When business communication, then the requested service communication of the communication request signal is executed;When there are the multiple communication module into
Service communication in row, and the requested service communication of the communication request signal is respectively compared to the multiple communication module
Ongoing service communication have lower priority when, do not execute the requested service communication of the request signal.
Wherein, control module 420 is additionally operable to:Blocking is sent out to the communication module for carrying out the ongoing service communication
Signal, to block the ongoing service communication.
Wherein, the communication module includes at least one of WiFi module and following the two:Zigbee module, bluetooth
Module.
Wherein, the priority orders of the service communication are preferably from low to high:Common bluetooth service, common WiFi industry
Business, advanced bluetooth service, advanced WiFi business;And/or common Zigbee business, common WiFi business, advanced Zigbee industry
Business, advanced WiFi business.
According to another embodiment of the present invention, a kind of machine readable storage medium is also provided, the machine readable storage medium
On be stored with controller instruction, the controller instruction for so that the controller execute Internet of Things communication control described above
Method.
The optional facilities and equipments of example of the present invention are described in detail above in association with attached drawing, still, the embodiment of the present invention is simultaneously unlimited
Detail in above-mentioned facilities and equipments can be to the embodiment of the present invention in the range of the technology design of the embodiment of the present invention
Technical solution carry out a variety of simple variants, these simple variants belong to the protection domain of the embodiment of the present invention.
It is further to note that each particular technique feature described in above-mentioned specific implementation equipment, in not lance
In the case of shield, it can be combined by any suitable equipment.In order to avoid unnecessary repetition, the embodiment of the present invention pair
Various possible unit equipments no longer separately illustrate.
It will be appreciated by those skilled in the art that it is that can pass through to implement the method for the above embodiments
Program is completed to instruct relevant hardware, which is stored in a storage medium, including some instructions are used so that one
A (can be microcontroller, chip etc.) or processor (processor) execute the whole of each embodiment the method for the application
Or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
In addition, arbitrary combination can also be carried out between a variety of different facilities and equipments of the embodiment of the present invention, as long as it is not
The thought of the embodiment of the present invention is violated, disclosure of that of the embodiment of the present invention is equally should be considered as.