The home gateway access method and system dynamically changed in smart home
Technical field
The present invention relates to Smart Home technical field, the home gateway dynamically changed in more particularly to a kind of smart home is visited
Ask method and system.
Background technology
One mobile phone remote multiple household electrical appliances, this is the scene that smart home is described.Smart home need to usually be equipped with long-range control
The equipment such as terminal processed, home network set-top box, Domestic central controller, intelligent appliance.Although smart home device is life band
It facilitates, but after connect internet, they also become the target of attack of hacker, smart home safety problem should as it
Bottleneck.Existing smart home security protection mainly includes:WiFi password protectings, visitor authenticate protection, network account
Password protecting, Router Security protection etc., in the present invention referred to as security protection " in routing ".Security protection in routing
Measure is responsible for that hacker is prevented to invade home network set-top box.However, once hacker invades home network set-top box, intelligent family
Electricity will be attacked.
In view of safety protection technique in routing there is security risk, can increase in routing beyond safety prevention measure
Add " routing is outer " safety prevention measure.In this way, even if hacker invades home network set-top box, the safety protection technique outside routing
Also hacker can be prevented to control Domestic central controller, this will further improve the security protection ability of smart home.
Come the various operations of management and control, security permission, and home gateway often through a central server in the prior art
Safe class can not be adjusted so that can not be adaptive according to specific environment is used to carry out, flexibility is not high.
The content of the invention
In view of this, the present invention proposes the home gateway access method and system that are dynamically changed in a kind of smart home.
The home gateway access method dynamically changed in a kind of smart home, includes the following steps:
S0, the protocol format that the intercommunication of various smart home devices in smart home is set;
S1, the communication network between each smart home device in smart home is set;Each smart home device is according to communication
Network periodically carries out other smart homes in communication network online information confirmation according to default communication conditions periodic table and obtains
Obtain confirmation message;Step S2 is jumped to when confirmation message is verified, otherwise jumps to step S8;
S2, an independent information storage region is divided in the network interface card of smart home, the independent information storage region is used for
Encrypt the classification information for storing each smart home device, run time block information, smart home device and mobile terminal
Control correspondence relationship information, the unique identifier of mobile terminal;And it is corresponding with proof strength to establish run time block information
Relation;
S3, network interface card receive the home gateway accessing request information that mobile terminal is initiated, and the accessing request information includes
The smart home device information that the corresponding unique identifier of mobile terminal and needs access;
Whether S4, network interface card judge the unique identifier of the mobile terminal in independent information by independent information storage region
In storage region, when in independent information storage region, step S5 is jumped to;Otherwise step S8 is jumped to;
S5, network interface card judge that whether the smart home that mobile terminal is accessed is set in fortune by independent information storage region
In row time interval information, when belonging in run time area information section, step S6 is jumped to;Otherwise step is jumped to
S8;
S6, network interface card are believed by independent information storage region according to the control correspondence of smart home device and mobile terminal
Whether breath judges mobile terminal with to the control authority of the smart home device, with when jump to step S7;Otherwise jump
Go to step S8;
S7, network interface card judge the intelligence man by independent information storage region according to the classification information of each smart home device
It occupies whether equipment belongs to controlled smart home device, when belonging to controlled smart home device, jumps to step S9;Otherwise redirect
To step S8;
S8, into exception handler, and judge abnormal type, and respective handling carried out according to abnormal type;
S9, the correspondence dynamic adjustment home gateway according to the run time block information and proof strength pre-established
Security level.
In the home gateway access method dynamically changed in smart home of the present invention,
The step S8 includes:
S81, abnormal type is judged;
S82, confirmation message verification not by when, by the information of unreceived smart home device be sent to gateway carry out
It preserves;When the unique identifier of the mobile terminal of home gateway is accessed in request not in independent information storage region, it will ask
It accesses the unique identifier of the mobile terminal of home gateway, access time, the smart home device information of request access is asked to be deposited
It stores up in network interface card;When being not belonging to run time area information section, will ask access home gateway mobile terminal it is unique
The smart home device information that identifier, request access time, request access is stored into network interface card and by the unique of mobile terminal
Identifier is sent to other mobile terminals, obtains the request confirmation message of other mobile terminals, when being identified through, jumps to step
Rapid S9;When mobile terminal does not have the control authority to the smart home device, the mobile end of access home gateway will be asked
The unique identifier at end asks access time, asks the smart home device information accessed storage into network interface card and movement is whole
The unique identifier at end is sent to other mobile terminals, obtains the request confirmation message of other mobile terminals, when being identified through,
Jump to step S9;
The exception information stored in network interface card is sent to independent information memory block by S83, network interface card according to default sending cycle
On the mobile terminal stored in domain.
The present invention also provides the home gateways dynamically changed in a kind of smart home to access system, including such as lower unit:
Protocol format dispensing unit, for setting the agreement of the intercommunication of various smart home devices in smart home
Form;
Confirmation information unit, for setting the communication network in smart home between each smart home device;Each intelligence man
Equipment is occupied periodically to carry out other smart homes in communication network according to default communication conditions periodic table according to communication network
Online information, which confirms, obtains confirmation message;Information memory cell is jumped to when confirmation message is verified, is otherwise jumped to different
Normal processing unit;
Information memory cell, for dividing an independent information storage region, the independent letter in the network interface card of smart home
Breath storage region sets for encrypting the classification information for storing each smart home device, run time block information, smart home
Standby control correspondence relationship information with mobile terminal, the unique identifier of mobile terminal;And establish run time block information with
The correspondence of proof strength;
Solicited message judging unit, for receiving the home gateway accessing request information of mobile terminal initiation by network interface card,
The accessing request information includes the smart home device information that the corresponding unique identifier of mobile terminal and needs access;
Identifier judging unit judges unique knowledge of the mobile terminal for passing through network interface card by independent information storage region
Whether alias is in independent information storage region, when in independent information storage region, jumps to time interval judgement
Unit;Otherwise exception processing unit is jumped to;
Time interval judging unit judges what mobile terminal was accessed for passing through network interface card by independent information storage region
Whether smart home is set in run time block information, when belonging in run time area information section, is jumped to
Weights permission judging unit;Otherwise exception processing unit is jumped to;
Weights permission judging unit, for passing through network interface card by independent information storage region according to smart home device and shifting
Whether the control correspondence relationship information of dynamic terminal judges mobile terminal with the control authority to the smart home device, with
When jump to controlled plant judging unit;Otherwise exception processing unit is jumped to;
Controlled plant judging unit, for passing through network interface card by independent information storage region according to each smart home device
Classification information judge whether the smart home device belongs to controlled smart home device, belonging to controlled smart home device
When, jump to security level adjustment unit;Otherwise exception processing unit is jumped to;
Exception processing unit for entering exception handler, and judges abnormal type, and according to abnormal type into
Row respective handling;
Security level adjustment unit, for being closed according to the run time block information pre-established is corresponding with proof strength
System's dynamic adjusts the security level of home gateway.
In the home gateway access system dynamically changed in smart home of the present invention,
The exception processing unit includes:
Type interpretation subelement, for judging abnormal type;
Abnormality processing subelement, for confirmation message verification not by when, by the letter of unreceived smart home device
Breath is sent to gateway and is preserved;The unique identifier that the mobile terminal of home gateway is accessed in request does not store in independent information
When in region, it will ask to access the unique identifier of the mobile terminal of home gateway, request access time, the intelligence of request access
Home equipment information is stored into network interface card;When being not belonging to run time area information section, will ask to access home gateway
The smart home device information that the unique identifier of mobile terminal, request access time, request access stores into network interface card and will
The unique identifier of mobile terminal is sent to other mobile terminals, obtains the request confirmation message of other mobile terminals, is confirming
By when, jump to security level adjustment unit;It, will when mobile terminal does not have the control authority to the smart home device
Request accesses unique identifier, request access time, the smart home device letter of request access of the mobile terminal of home gateway
Breath storage is sent to other mobile terminals into network interface card and by the unique identifier of mobile terminal, obtains asking for other mobile terminals
Confirmation message is sought, when being identified through, jumps to security level adjustment unit;
Exception information transmission sub-unit believes the exception stored in network interface card according to default sending cycle for passing through network interface card
Breath is sent on the mobile terminal stored in independent information storage region.
The home gateway access method and system dynamically changed in smart home provided by the invention, compared with existing skill
Art can be realized and distinguish the network connection state that verification home gateway accesses, according to different network connection states to access
Intelligent terminal legitimacy verified, and can be according to a variety of service conditions to the correspondence dynamic of proof strength
Adjust the security level of home gateway so that safe coefficient higher, it is more flexible.
Description of the drawings
Fig. 1 is that the home gateway dynamically changed in the smart home of the embodiment of the present invention accesses system architecture diagram.
Specific embodiment
The home gateway access method dynamically changed in a kind of smart home of the embodiment of the present invention, includes the following steps:
S0, the protocol format that the intercommunication of various smart home devices in smart home is set;It is various by setting
The protocol format of the intercommunication of smart home device, such as protocol format can be as follows:Ask the field (8 of sending device
Position)+sending time stamp information (8)+HASH values verifying field (16)+controlled smart machine information field (4)+address letter
Cease field (16).The security of communication interaction can be improved.
S1, the communication network between each smart home device in smart home is set;Each smart home device is according to communication
Network periodically carries out other smart homes in communication network online information confirmation according to default communication conditions periodic table and obtains
Obtain confirmation message;Step S2 is jumped to when confirmation message is verified, otherwise jumps to step S8;By implementing this step,
The smart home device to break down can be monitored in real time.
S2, an independent information storage region is divided in the network interface card of smart home, the independent information storage region is used for
Encrypt the classification information for storing each smart home device, run time block information, smart home device and mobile terminal
Control correspondence relationship information, the unique identifier of mobile terminal;And it is corresponding with proof strength to establish run time block information
Relation;It is alternatively possible in the case of suspension, independent information storage region information is updated.
S3, network interface card receive the home gateway accessing request information that mobile terminal is initiated, and the accessing request information includes
The smart home device information that the corresponding unique identifier of mobile terminal and needs access;
Whether S4, network interface card judge the unique identifier of the mobile terminal in independent information by independent information storage region
In storage region, when in independent information storage region, step S5 is jumped to;Otherwise step S8 is jumped to;
S5, network interface card judge that whether the smart home that mobile terminal is accessed is set in fortune by independent information storage region
In row time interval information, when belonging in run time area information section, step S6 is jumped to;Otherwise step is jumped to
S8;
S6, network interface card are believed by independent information storage region according to the control correspondence of smart home device and mobile terminal
Whether breath judges mobile terminal with to the control authority of the smart home device, with when jump to step S7;Otherwise jump
Go to step S8;
S7, network interface card judge the intelligence man by independent information storage region according to the classification information of each smart home device
It occupies whether equipment belongs to controlled smart home device, when belonging to controlled smart home device, jumps to step S9;Otherwise redirect
To step S8;
S8, into exception handler, and judge abnormal type, and respective handling carried out according to abnormal type;
S9, the correspondence dynamic adjustment home gateway according to the run time block information and proof strength pre-established
Security level.
In the home gateway access method dynamically changed in smart home of the present invention,
The step S8 includes:
S81, abnormal type is judged;
S82, confirmation message verification not by when, by the information of unreceived smart home device be sent to gateway carry out
It preserves;When the unique identifier of the mobile terminal of home gateway is accessed in request not in independent information storage region, it will ask
It accesses the unique identifier of the mobile terminal of home gateway, access time, the smart home device information of request access is asked to be deposited
It stores up in network interface card;When being not belonging to run time area information section, will ask access home gateway mobile terminal it is unique
The smart home device information that identifier, request access time, request access is stored into network interface card and by the unique of mobile terminal
Identifier is sent to other mobile terminals, obtains the request confirmation message of other mobile terminals, when being identified through, jumps to step
Rapid S9;When mobile terminal does not have the control authority to the smart home device, the mobile end of access home gateway will be asked
The unique identifier at end asks access time, asks the smart home device information accessed storage into network interface card and movement is whole
The unique identifier at end is sent to other mobile terminals, obtains the request confirmation message of other mobile terminals, when being identified through,
Jump to step S9;
The exception information stored in network interface card is sent to independent information memory block by S83, network interface card according to default sending cycle
On the mobile terminal stored in domain.
As shown in Figure 1, the embodiment of the present invention, which also provides the home gateway dynamically changed in a kind of smart home, accesses system,
Camber line in attached drawing 1 represents that lines are non-intersect.It includes such as lower unit:
Protocol format dispensing unit, for setting the agreement of the intercommunication of various smart home devices in smart home
Form;
Confirmation information unit, for setting the communication network in smart home between each smart home device;Each intelligence man
Equipment is occupied periodically to carry out other smart homes in communication network according to default communication conditions periodic table according to communication network
Online information, which confirms, obtains confirmation message;Information memory cell is jumped to when confirmation message is verified, is otherwise jumped to different
Normal processing unit;
Information memory cell, for dividing an independent information storage region, the independent letter in the network interface card of smart home
Breath storage region sets for encrypting the classification information for storing each smart home device, run time block information, smart home
Standby control correspondence relationship information with mobile terminal, the unique identifier of mobile terminal;And establish run time block information with
The correspondence of proof strength;
Solicited message judging unit, for receiving the home gateway accessing request information of mobile terminal initiation by network interface card,
The accessing request information includes the smart home device information that the corresponding unique identifier of mobile terminal and needs access;
Identifier judging unit judges unique knowledge of the mobile terminal for passing through network interface card by independent information storage region
Whether alias is in independent information storage region, when in independent information storage region, jumps to time interval judgement
Unit;Otherwise exception processing unit is jumped to;
Time interval judging unit judges what mobile terminal was accessed for passing through network interface card by independent information storage region
Whether smart home is set in run time block information, when belonging in run time area information section, is jumped to
Weights permission judging unit;Otherwise exception processing unit is jumped to;
Weights permission judging unit, for passing through network interface card by independent information storage region according to smart home device and shifting
Whether the control correspondence relationship information of dynamic terminal judges mobile terminal with the control authority to the smart home device, with
When jump to controlled plant judging unit;Otherwise exception processing unit is jumped to;
Controlled plant judging unit, for passing through network interface card by independent information storage region according to each smart home device
Classification information judge whether the smart home device belongs to controlled smart home device, belonging to controlled smart home device
When, jump to security level adjustment unit;Otherwise exception processing unit is jumped to;
Exception processing unit for entering exception handler, and judges abnormal type, and according to abnormal type into
Row respective handling;
Security level adjustment unit, for being closed according to the run time block information pre-established is corresponding with proof strength
System's dynamic adjusts the security level of home gateway.
In the home gateway access system dynamically changed in smart home of the present invention,
The exception processing unit includes:
Type interpretation subelement, for judging abnormal type;
Abnormality processing subelement, for confirmation message verification not by when, by the letter of unreceived smart home device
Breath is sent to gateway and is preserved;The unique identifier that the mobile terminal of home gateway is accessed in request does not store in independent information
When in region, it will ask to access the unique identifier of the mobile terminal of home gateway, request access time, the intelligence of request access
Home equipment information is stored into network interface card;When being not belonging to run time area information section, will ask to access home gateway
The smart home device information that the unique identifier of mobile terminal, request access time, request access stores into network interface card and will
The unique identifier of mobile terminal is sent to other mobile terminals, obtains the request confirmation message of other mobile terminals, is confirming
By when, jump to security level adjustment unit;It, will when mobile terminal does not have the control authority to the smart home device
Request accesses unique identifier, request access time, the smart home device letter of request access of the mobile terminal of home gateway
Breath storage is sent to other mobile terminals into network interface card and by the unique identifier of mobile terminal, obtains asking for other mobile terminals
Confirmation message is sought, when being identified through, jumps to security level adjustment unit;
Exception information transmission sub-unit believes the exception stored in network interface card according to default sending cycle for passing through network interface card
Breath is sent on the mobile terminal stored in independent information storage region.
The home gateway access method and system dynamically changed in smart home provided by the invention, compared with existing skill
Art can be realized and distinguish the network connection state that verification home gateway accesses, according to different network connection states to access
Intelligent terminal legitimacy verified, and can be according to a variety of service conditions to the correspondence dynamic of proof strength
Adjust the security level of home gateway so that safe coefficient higher, it is more flexible.
With reference to the method or algorithm that the embodiments described herein describes hardware, processor can directly be used to perform
The combination of software module or the two is implemented.Software module can be placed in random access memory, memory, read-only memory, electricity can
Well known in programming ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
In the storage medium of arbitrary other forms.
It is understood that for those of ordinary skill in the art, it can be conceived with the technique according to the invention and done
Go out other various corresponding changes and deformation, and all these changes and deformation should all belong to the protection model of the claims in the present invention
It encloses.