Disclosure of Invention
The embodiment of the invention discloses an intelligent home control method, an intelligent home control device and an intelligent home control system, which can avoid confusion of intelligent home equipment control, realize hierarchical management of a user terminal on intelligent home equipment and improve user experience.
The invention provides an intelligent home control method, which comprises the following steps:
receiving a first operation instruction sent by a first terminal; the first operation instruction comprises an identification code of the first terminal and an identification code of an operation object and is used for indicating to execute a first operation on the operation object;
acquiring the authority level of the first terminal corresponding to the operation object according to the corresponding relation between the terminal identification code in the database and the authority level of each operation object;
judging time T1To time T0Whether a second operation instruction sent by a second terminal is received and responded is judged, and the second operation instruction is used for indicating to execute a second operation on the operation object; the T is0For the current time, T1Is said T0Front distance of said T0Presetting the time of duration;
if so, comparing the permission level of the first terminal corresponding to the operation object with the acquired permission level of the second terminal corresponding to the operation object;
and responding to the first operation instruction if the permission level of the first terminal corresponding to the operation object is higher than the acquired permission level of the second terminal corresponding to the operation object.
Optionally, if the permission level of the first terminal corresponding to the operation object is lower than the acquired permission level of the second terminal corresponding to the operation object, the first operation instruction is not responded.
Optionally, if the permission level of the first terminal corresponding to the operation object is equal to the acquired permission level of the second terminal corresponding to the operation object,
responding to the first operation instruction; or, acquiring distance information from the first terminal and the second terminal to the operation object respectively, and responding to the first operation instruction when the distance from the first terminal to the operation object is smaller than the distance from the second terminal to the operation object.
Optionally, when the determination result is negative, responding to the first operation instruction.
Optionally, after receiving the first operation instruction sent by the first terminal, the determination time T is determined1To time T0Before receiving and responding to the second operation instruction sent by the second terminal, the method further comprises:
acquiring the authority range corresponding to the first terminal according to the corresponding relation between the terminal identification code and the authority range in the database;
checking whether the first operation instruction is in the authority range corresponding to the first terminal;
when the checking result is yes, executing the judgment time T1To time T0Whether to receive and respond to the second operation instruction sent by the second terminal.
Optionally, the permission range further includes a time permission, and checking whether the first operation instruction is within the permission range corresponding to the first terminal includes:
checking whether the current time is within the range allowed by the time authority and whether the first operation instruction is within the authority range corresponding to the first terminal; if all are, then execute the programThe judgment time T1To time T0And whether to receive and respond to the second operation instruction sent by the second terminal.
The invention also provides an intelligent home control device, which comprises:
the receiving unit is used for receiving a first operation instruction sent by a first terminal; the first operation instruction comprises an identification code of the first terminal and an identification code of an operation object and is used for indicating to execute a first operation on the operation object;
the acquisition unit is used for acquiring the authority level of the first terminal corresponding to the operation object according to the corresponding relation between the terminal identification code in the database and the authority level of each operation object;
a judging unit for judging the time T1To time T0Whether a second operation instruction sent by a second terminal is received and responded is judged, and the second operation instruction is used for indicating to execute a second operation on the operation object; the T is0For the current time, T1Is said T0Front distance of said T0Presetting the time of duration;
the comparison unit is used for comparing the permission level of the first terminal corresponding to the operation object with the acquired permission level of the second terminal corresponding to the operation object when the judgment result is yes;
and the execution unit is used for responding to the first operation instruction if the permission level of the first terminal corresponding to the operation object is higher than the acquired permission level of the second terminal corresponding to the operation object.
Optionally, the execution unit is further configured to not respond to the first operation instruction if the permission level of the first terminal corresponding to the operation object is lower than the acquired permission level of the second terminal corresponding to the operation object.
Optionally, the executing unit is specifically configured to, if the permission level of the first terminal corresponding to the operation object is equal to the acquired permission level of the second terminal corresponding to the operation object,
responding to the first operation instruction; or, acquiring distance information from the first terminal and the second terminal to the operation object respectively, and responding to the first operation instruction when the distance from the first terminal to the operation object is smaller than the distance from the second terminal to the operation object.
Optionally, the execution unit is further configured to respond to the first operation instruction when the determination result is negative.
Optionally, the obtaining unit is further configured to determine the time T after receiving the first operation instruction sent by the first terminal1To time T0Whether a second operation instruction sent by a second terminal is received and responded is judged, and a permission range corresponding to the first terminal is obtained according to the corresponding relation between the terminal identification code and the permission range in the database;
the device further comprises:
the checking unit is used for checking whether the first operation instruction is in the authority range corresponding to the first terminal;
the execution unit is further used for executing the judgment time T when the checking result is yes1To time T0Whether to receive and respond to the second operation instruction sent by the second terminal.
Optionally, the permission range further includes a time permission, and the viewing unit is specifically configured to:
checking whether the current time is within the range allowed by the time authority and whether the first operation instruction is within the authority range corresponding to the first terminal; the execution unit is further configured to execute the determination time T if the checking results are all yes1To time T0And whether to receive and respond to the second operation instruction sent by the second terminal.
The invention also provides an intelligent home control system which comprises at least one terminal, at least one operation object and a server, wherein the server comprises the intelligent home control device.
In the invention, the server receives a first operation instruction which is sent by the first terminal and used for indicating to execute a first operation on an operation object, acquires the authority level of the first terminal to the operation object according to the corresponding relation between the terminal identification code in the database and the authority level of each operation object, judges whether a second operation instruction which is sent by the second terminal and used for indicating to execute a second operation on the same operation object is received and responded before the current moment, and compares the authority level of the operation object corresponding to the first terminal with the acquired authority level of the operation object corresponding to the second terminal when the judgment result is yes; and responding to the first operation instruction if the authority level of the first terminal corresponding to the operation object is higher. By the method, the control confusion of the intelligent household equipment can be avoided, the hierarchical management of the user terminal on the intelligent household equipment is realized, and the user experience is improved.
In addition, the server can also acquire the authority range corresponding to the first terminal according to the corresponding relation between the terminal identification code and the authority range in the database, check whether the first operation instruction is in the authority range corresponding to the first terminal, and manage the authority of each user terminal; and the authority range also comprises time authority, the effective use time of each user terminal is further limited, and the management of the server on the user terminals in the smart home is optimized.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
It is to be understood that the terminology used in the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a flowchart illustrating an embodiment of an intelligent home control method according to the present invention. The invention discloses an intelligent home control method which is applied to a server and can be applied to the field of intelligent home, and the method comprises the following steps:
step S101: and receiving a first operation instruction sent by a first terminal.
The user terminal, such as the first terminal, may send an authentication message to the server through a telephone, a short message, a web page, or the like, where the authentication message is used to detect whether the login server is legal or not, and the server verifies the correctness of the authentication information of the first terminal, and if the authentication information is correct, the terminal logs in the server. It should be noted that the terminal and the server may specify a specific implementation manner that the terminal communicates with the server through a telephone, a short message, a web page, and the like through a communication protocol. It should be further noted that the authentication message may further include an identification code of the first terminal, the identification codes of all trusted terminals may be prestored in a database of the server, after receiving the authentication information sent by the first terminal, the server determines whether the identification code of the first terminal is the identification code of the trusted terminal according to the identification code of the first terminal, and if so, determines whether the authentication information is correct, and when the determination results are all yes, the terminal may log in the server. It should be further noted that the trusted terminal may be divided into a super terminal and a normal terminal, the super terminal may be set to have a right to modify information in the database, the right to modify information in the database includes deleting, adding or modifying the smart home device, deleting or adding the user terminal, modifying a right range of the user terminal, and the super terminal may also grant the normal terminal a part or all of the right to modify information in the database by modifying the right range of the user terminal.
Specifically, the server receives a first operation instruction sent by the first terminal through a telephone, a short message, a webpage and the like, where the first operation instruction is used to instruct an operation object to perform a first operation, for example, if the first operation instruction is an instruction for the first terminal to control the television to be turned off, the operation object is the television, and the first operation is to turn off the television. The first operation instruction comprises an identification code of the first terminal and an identification code of an operation object, wherein the identification code of the first terminal is used for identifying the first terminal, the identification code of the first terminal can be an ID number of the first terminal, and when the first terminal is a mobile phone, the identification code of the first terminal can also be a mobile phone number; the identification code of the operation object is used for identifying an execution object of the first operation, and the identification code of the operation object can be an ID number of the intelligent home equipment and also can be an address of the server; the operation object may be the smart home device or the server, for example, the instruction that the operation object is the smart home device may be an instruction that the first terminal controls the television to be turned off, and the instruction that the operation object is the server may be an instruction that the smart home device is added or deleted in the database, or an instruction that the user terminal is added or deleted and the authority range of the user terminal is modified.
Step S102: and acquiring the authority level of the operation object corresponding to the first terminal according to the corresponding relation between the terminal identification code in the database and the authority level of each operation object.
Specifically, the database of the server may store in advance a correspondence between the terminal identification code and the authority level of each operation object, for example, the authority level may be set to be divided into 5 levels, which are 1 level, 2 level, 3 level, 4 level and 5 level, assuming that the authority level of the television corresponding to the first terminal is 3 level and the authority level of the television corresponding to the second terminal is 2 level, the authority level of the television corresponding to the first terminal is higher than the authority level of the television corresponding to the second terminal, and when the first terminal and the second terminal simultaneously send a control instruction for controlling the television, the server responds to the terminal with the higher authority level, that is, the control instruction for controlling the television sent by the first terminal.
It should be noted that, the permission levels of the same terminal corresponding to different smart home devices may be different, for example, the permission level of the first terminal corresponding to the television is level 3, and the permission level of the corresponding refrigerator is level 2. And the corresponding relation between the terminal and the intelligent household equipment is stored in a database of the server.
It should be further noted that, the corresponding relationship between the terminal identification code and the authority range may be pre-stored in the database of the server, where the authority range may include the authority for operating each operation object, and after step S101, the method may further include: and the server acquires the authority range corresponding to the first terminal according to the identification code of the first terminal and the corresponding relation between the terminal identification code and the authority range in the database. For example, the authority range of the first terminal includes authority to operate a set top box, an intelligent curtain, an intelligent air conditioner, each intelligent lock in a home, an intelligent lamp, and the like, and specific authority to operate each intelligent household device by the first terminal may also be set, for example, the first terminal may only operate the set top box to watch a part of a television program, may only control an on/off state of the air conditioner, and may not adjust a temperature of the air conditioner, and may encode an operation indicated by an operation instruction sent by the user terminal using numbers and/or letters, for example, a01 indicates that the television is turned on, a02 indicates that the television is turned off, B01 indicates that the curtain is turned on, and the authority range corresponding to the identification code of the first terminal: a01, A02 and B01, the first terminal can send a control instruction containing A01 to the server through telephone, short message or network, the control instruction also carries the identification code of the first terminal, the server obtains the authority range corresponding to the first terminal according to the identification code of the first terminal and the corresponding relation between the terminal identification code and the authority range in the database, and then whether A01 is in the authority range corresponding to the first terminal is checked. After the server acquires the authority range corresponding to the first terminal, checking whether the first operation instruction is in the authority range corresponding to the first terminal, and if so, executing the step S103; otherwise, the first terminal does not have the authority to indicate the first operation of the operation object, and the server performs step S106.
It should be further noted that the authority range may further include a time authority, the time authority may define a valid response time of the first operation instruction, and after step S101, the method further includes: checking whether the current time is within the range allowed by the time authority and whether the first operation instruction is within the authority range corresponding to the first terminal; if both are yes, step S103 is executed. For example, the first terminal only has the right to turn on the television between 18 o ' clock and 22 o ' clock, when the first operation instruction sent by the first terminal indicates that the television is turned on, if the current time is between 18 o ' clock and 22 o ' clock, for example, 19 o ' clock, the current time is within the allowed range of the time right, and then the instruction sent by the first terminal to turn on the television is determined to be within the corresponding right range of the first terminal, when the determination results are all yes, step S103 is executed, otherwise, the server executes step S106.
It should be further noted that the time authority in the database may have a corresponding relationship with the identification code of each terminal, for example, the time authority of all the operation instructions of the first terminal is from 11/15/2015 to 11/2015/16/2015; the time authority in the database may also have a corresponding relationship with the operation instruction of each terminal, for example, the time authority of the operation instruction of the second terminal to turn on the television is 19 to 21 points, and the time authority of the operation instruction to turn off the television is 1 to 24 points.
Step S103: judging time T1To time T0Whether to receive and respond to the second operation instruction sent by the second terminal.
In particular, the server may be at some time T before1To the current time T0Has responded to a second operation instruction sent by other terminals, such as a second terminal, the second operation instruction being used for instructing to execute a second operation on the operation object, wherein the operation objects of the first operation instruction and the second operation instruction are the same, that is, the first operation instruction and the second operation instruction both contain the same identification code of the operation object. When the judgment result is yes, executing step S104; and if the judgment result is negative, the server responds to the first operation instruction, which indicates that no user terminal controls the operation object at the moment.
It should be noted that the first operation and the second operation may be different, for example, the first operation instruction may indicate that the television is turned off, and the second operation instruction may indicate that the television is turned on. T is0Is the current time, T1Is T0Front distance T0The preset time period may be set to 5 minutes, 8 minutes, 10 minutes, or the like, and the present invention is not limited thereto.
It should be noted that step S102 may also be executed after step S103, or step S102 may be executed simultaneously with step S103.
Step S104: and comparing the permission level of the operation object corresponding to the first terminal with the acquired permission level of the operation object corresponding to the second terminal.
Specifically, when the judgment result of step S103 is yes, that is, at time T1To time T0And the internal server receives and responds to a second operation instruction sent by the second terminal, wherein the second operation instruction comprises an identification code of the second terminal and an identification code of an operation object and is used for indicating to execute a second operation on the operation object, and the operation objects of the first operation instruction and the second operation instruction are the same, namely the first operation instruction and the second operation instruction both contain the same identification code of the operation object. The server acquires the authority level of the operation object corresponding to the second terminal according to the corresponding relation between the terminal identification code and the authority level of each operation object in the database, and then compares the authority level of the operation object corresponding to the first terminal with the authority level of the operation object corresponding to the second terminal. For example, when the second operation command is turning on the television,at this time, the television is in an open state, and if the permission level of the operation object corresponding to the first terminal is 3 and the permission level of the operation object corresponding to the second terminal is 2, the permission level of the operation object corresponding to the first terminal is higher than the permission level of the operation object corresponding to the second terminal. When the authority level of the operation object corresponding to the first terminal is higher than that of the operation object corresponding to the second terminal, executing the step S105; when the authority level of the operation object corresponding to the first terminal is lower than that of the operation object corresponding to the second terminal, executing the step S106; when the permission level of the operation object corresponding to the first terminal is equal to the permission level of the operation object corresponding to the second terminal, the server may be set to execute step S106, or the server may be set to execute step S105, or at this time, the location information of the first terminal, the second terminal, and the operation object is obtained, and the distance between the first terminal and the operation object is calculated according to the location information of the first terminal, the server may be set to execute step S105 when the distance between the first terminal and the operation object is less than or equal to the distance between the second terminal and the operation object, and the server may execute step S106 when the distance between the first terminal and the operation object is not less than the distance between the second terminal and the operation object.
Step S105: responding to the first operation instruction.
Specifically, the server responds to a first operation instruction, and controls an operation object indicated by the first operation instruction to execute a first operation.
Step S106: the first operation instruction is not responded.
Specifically, the server does not respond to the first operation instruction, and the operation object indicated by the first operation instruction is in the original working state.
In this embodiment, the server receives a first operation instruction sent by the first terminal and used for instructing to execute a first operation on an operation object, acquires the authority level of the first terminal on the operation object according to the corresponding relationship between the terminal identification code in the database and the authority level of each operation object, then judges whether a second operation instruction sent by the second terminal and used for instructing to execute a second operation on the same operation object is received and responded before the current time, and if the judgment result is yes, compares the authority level of the operation object corresponding to the first terminal with the acquired authority level of the operation object corresponding to the second terminal; and responding to the first operation instruction if the authority level of the operation object corresponding to the first terminal is higher. By the method, the control confusion of the intelligent household equipment can be avoided, the hierarchical management of the user terminal on the intelligent household equipment is realized, and the user experience is improved.
In addition, the server can also acquire the authority range corresponding to the first terminal according to the corresponding relation between the terminal identification code and the authority range in the database, check whether the first operation instruction is in the authority range corresponding to the first terminal, and manage the authority of each user terminal; and the authority range also comprises time authority, the effective use time of each user terminal is further limited, and the management of the server on the user terminals in the smart home is optimized.
Referring to fig. 2, fig. 2 is a flowchart illustrating another embodiment of a smart home control method according to the present invention. The invention discloses a terminal management method which is applied to a server and can be applied to the field of intelligent home furnishing, and the method comprises the following steps:
step S201: and receiving a first operation instruction sent by a first terminal.
Specifically, the server receives a first operation instruction sent by the first terminal through a telephone, a short message, a webpage and the like, where the first operation instruction is used to instruct an operation object to perform a first operation, for example, if the first operation instruction is an instruction for the first terminal to control the television to be turned off, the operation object is the television, and the first operation is to turn off the television. The first operation instruction comprises an identification code of the first terminal and an identification code of an operation object, wherein the identification code of the first terminal is used for identifying the first terminal, the identification code of the first terminal can be an ID number of the first terminal, and when the first terminal is a mobile phone, the identification code of the first terminal can also be a mobile phone number; the identification code of the operation object is used for identifying an execution object of the first operation, and the identification code of the operation object can be an ID number of the intelligent home equipment and also can be an address of the server; the operation object may be the smart home device or the server, for example, the instruction that the operation object is the smart home device may be an instruction that the first terminal controls the television to be turned off, and the instruction that the operation object is the server may be an instruction that the smart home device is added or deleted in the database, or an instruction that the user terminal is added or deleted and the authority range of the user terminal is modified.
Step S202: and acquiring the authority range corresponding to the first terminal according to the corresponding relation between the terminal identification code and the authority range in the database.
Specifically, the corresponding relationship between the terminal identification code and the authority range may be pre-stored in the database of the server, the authority range may include the authority for operating each operation object, and the server obtains the authority range corresponding to the first terminal according to the identification code of the first terminal and the corresponding relationship between the terminal identification code and the authority range in the database. For example, the authority range of the first terminal includes authority to operate a set top box, an intelligent curtain, an intelligent air conditioner, each intelligent lock in a home, an intelligent lamp, and the like, and specific authority to operate each intelligent household device by the first terminal may also be set, for example, the first terminal may only operate the set top box to watch a part of a television program, may only control an on/off state of the air conditioner, and may not adjust a temperature of the air conditioner, and may encode an operation indicated by an operation instruction sent by the user terminal using numbers and/or letters, for example, a01 indicates that the television is turned on, a02 indicates that the television is turned off, B01 indicates that the curtain is turned on, and the authority range corresponding to the identification code of the first terminal: a01, A02 and B01, the first terminal sends a control instruction containing A01 to the server through telephone, short message or network, the control instruction also carries the identification code of the first terminal, the server obtains the authority range corresponding to the first terminal according to the identification code of the first terminal and the corresponding relation between the terminal identification code and the authority range in the database, and then step S203 is executed to check whether A01 is in the authority range corresponding to the first terminal.
Step S203: and checking whether the first operation instruction is in the corresponding authority range of the first terminal.
Specifically, after the server acquires the authority range corresponding to the first terminal, whether the first operation instruction is within the authority range corresponding to the first terminal is checked, and if yes, step S204 is executed; otherwise, the first terminal does not have the authority to indicate the first operation of the operation object, and the server performs step S208.
It should be noted that the authority range may further include a time authority, where the time authority may define an effective response time of the first operation instruction, and step S203 specifically includes: checking whether the current time is within the range allowed by the time authority and whether the first operation instruction is within the authority range corresponding to the first terminal; if both are yes, step S204 is performed. For example, the first terminal only has the right to turn on the television between 18 o ' clock and 22 o ' clock, when the first operation instruction sent by the first terminal indicates that the television is turned on, if the current time is between 18 o ' clock and 22 o ' clock, for example, 19 o ' clock, the current time is within the allowed range of the time right, and then the instruction sent by the first terminal to turn on the television is determined to be within the corresponding right range of the first terminal, when the determination results are all yes, step S204 is executed, otherwise, the server executes step S208.
It should be noted that the time authority in the database may have a corresponding relationship with the identification code of each terminal, for example, the time authority of all the operation instructions of the first terminal is from 11/15/2015 to 11/2015/16/2015; the time authority in the database may also have a corresponding relationship with the operation instruction of each terminal, for example, the time authority of the operation instruction of the second terminal to turn on the television is 19 to 21 points, and the time authority of the operation instruction to turn off the television is 1 to 24 points.
Step S204: judging time T1To time T0Whether to receive and respond to the second operation instruction sent by the second terminal.
In particular, the server may be at some time T before1To the current time T0Has responded to a second operation instruction sent by other terminals, such as a second terminal, the second operation instruction being used for instructing to execute a second operation on the operation object, wherein the operation objects of the first operation instruction and the second operation instruction are the same, that is, the first operation instruction and the second operation instruction both contain the same identification code of the operation object. When the judgment result is yes, the step is executed205 or step S206; and if the judgment result is negative, the server responds to the first operation instruction, which indicates that no user terminal controls the operation object at the moment.
It should be noted that the first operation and the second operation may be different, for example, the first operation instruction may indicate that the television is turned off, and the second operation instruction may indicate that the television is turned on. T is0Is the current time, T1Is T0Front distance T0The preset time period may be set to 5 minutes, 8 minutes, 10 minutes, or the like, and the present invention is not limited thereto.
Step S205: and acquiring the authority level of the operation object corresponding to the first terminal according to the corresponding relation between the terminal identification code in the database and the authority level of each operation object.
Specifically, the database of the server may store in advance a correspondence between the terminal identification code and the authority level of each operation object, for example, the authority level may be set to be divided into 5 levels, which are 1 level, 2 level, 3 level, 4 level and 5 level, assuming that the authority level of the television corresponding to the first terminal is 3 level and the authority level of the television corresponding to the second terminal is 2 level, the authority level of the television corresponding to the first terminal is higher than the authority level of the television corresponding to the second terminal, and when the first terminal and the second terminal simultaneously send a control instruction for controlling the television, the server responds to the terminal with the higher authority level, that is, the control instruction for controlling the television sent by the first terminal.
It should be noted that, the permission levels of the same terminal corresponding to different smart home devices may be different, for example, the permission level of the first terminal corresponding to the television is level 3, and the permission level of the corresponding refrigerator is level 2. And the corresponding relation between the terminal and the intelligent household equipment is stored in a database of the server.
It should be noted that step S205 may also be executed at any time after step S201 and before step S206.
Step S206: and comparing the permission level of the operation object corresponding to the first terminal with the acquired permission level of the operation object corresponding to the second terminal.
Specifically, when the determination result of step S204 is yes, that is, at time T1To time T0And the internal server receives and responds to a second operation instruction sent by the second terminal, wherein the second operation instruction comprises an identification code of the second terminal and an identification code of an operation object and is used for indicating to execute a second operation on the operation object, and the operation objects of the first operation instruction and the second operation instruction are the same, namely the first operation instruction and the second operation instruction both contain the same identification code of the operation object. The server acquires the authority level of the operation object corresponding to the second terminal according to the corresponding relation between the terminal identification code and the authority level of each operation object in the database, and then compares the authority level of the operation object corresponding to the first terminal with the authority level of the operation object corresponding to the second terminal. For example, when the second operation instruction is that the television is turned on, and the television is in an on state at this time, assuming that the permission level of the operation object corresponding to the first terminal is 3 and the permission level of the operation object corresponding to the second terminal is 2, the permission level of the operation object corresponding to the first terminal is higher than the permission level of the operation object corresponding to the second terminal. When the authority level of the operation object corresponding to the first terminal is higher than the authority level of the operation object corresponding to the second terminal, executing step S207; when the permission level of the operation object corresponding to the first terminal is lower than the acquired permission level of the operation object corresponding to the second terminal, executing step S208; when the authority level of the operation object corresponding to the first terminal is equal to the acquired authority level of the operation object corresponding to the second terminal, step S209 is executed.
Step S207: responding to the first operation instruction.
Specifically, the server responds to a first operation instruction, and controls an operation object indicated by the first operation instruction to execute a first operation.
Step S208: the first operation instruction is not responded.
Specifically, the server does not respond to the first operation instruction, and the operation object indicated by the first operation instruction is in the original working state.
Step S209: and acquiring distance information from the first terminal and the second terminal to the operation object respectively, and comparing whether the distance from the first terminal to the operation object is smaller than the distance from the second terminal to the operation object.
And when the authority level of the operation object corresponding to the first terminal is equal to the authority level of the operation object corresponding to the second terminal, acquiring the position information of the first terminal, the second terminal and the operation object, and calculating the distance between the first terminal, the second terminal and the operation object according to the position information of the first terminal, the second terminal and the operation object. When the distance from the first terminal to the operation object is less than the distance from the second terminal to the operation object, step S207 is executed; when the distance between the first terminal and the manipulation object is not less than the distance between the second terminal and the manipulation object, step S208 is executed.
In this embodiment, the server receives a first operation instruction sent by the first terminal for instructing to execute a first operation on an operation object, acquires a right range corresponding to the first terminal according to a corresponding relationship between a terminal identification code and the right range in the database, checks whether the first operation instruction is within the right range corresponding to the first terminal, if so, judges whether a second operation instruction sent by the second terminal for instructing to execute a second operation on the same operation object is received and responded before the current time, and when the judgment result is yes, acquires a right level of the first terminal for the operation object according to a corresponding relationship between the terminal identification code and the right levels of the operation objects in the database, compares the right level of the operation object corresponding to the first terminal with the right level of the operation object corresponding to the second terminal, and if the right level of the operation object corresponding to the first terminal is higher, responding to the first operation instruction; if the first operation instruction is lower, the first operation instruction is not responded; and if the distance between the first terminal and the operation object is equal to the distance between the second terminal and the operation object, further comparing whether the distance between the first terminal and the operation object is smaller than the distance between the second terminal and the operation object, responding to the first operation instruction when the distance between the first terminal and the operation object is smaller, and otherwise, not responding to the first operation instruction. By the method, the control confusion of the intelligent household equipment can be avoided, the hierarchical management of the user terminal on the intelligent household equipment is realized, and the user experience is improved.
And the authority range also comprises time authority, the effective use time of each user terminal is further limited, and the management of the server on the user terminals in the smart home is optimized.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an embodiment of an intelligent home control device according to the present invention. The invention relates to a terminal management device, which is applied to a server and can be applied to the field of intelligent home furnishing, wherein the terminal management device 30 comprises: a receiving unit 301, an obtaining unit 302, a determining unit 303, a comparing unit 304 and an executing unit 305, wherein,
a receiving unit 301, configured to receive a first operation instruction sent by a first terminal; the first operation instruction comprises an identification code of the first terminal and an identification code of an operation object and is used for indicating to execute a first operation on the operation object;
an obtaining unit 302, configured to obtain, according to a correspondence between a terminal identifier and a permission level of each operation object in a database, a permission level of the operation object corresponding to the first terminal;
a judging unit 303 for judging the time T1To time T0Whether a second operation instruction sent by a second terminal is received and responded is judged, and the second operation instruction is used for indicating to execute a second operation on the operation object; the T is0For the current time, T1Is said T0Front distance of said T0Presetting the time of duration;
a comparing unit 304, configured to, if the determination result is yes, compare the permission level of the operation object corresponding to the first terminal with the acquired permission level of the operation object corresponding to the second terminal;
an executing unit 305, configured to respond to the first operation instruction if the permission level of the first terminal corresponding to the operation object is higher than the acquired permission level of the second terminal corresponding to the operation object.
Optionally, the executing unit 305 is further configured to not respond to the first operation instruction if the permission level of the first terminal corresponding to the operation object is lower than the acquired permission level of the second terminal corresponding to the operation object.
Optionally, the executing unit 305 is specifically configured to, if the permission level of the first terminal corresponding to the operation object is equal to the acquired permission level of the second terminal corresponding to the operation object,
responding to the first operation instruction; or, acquiring distance information from the first terminal and the second terminal to the operation object respectively, and responding to the first operation instruction when the distance from the first terminal to the operation object is smaller than the distance from the second terminal to the operation object.
Optionally, the execution unit 305 is further configured to respond to the first operation instruction when the determination result is negative.
It should be noted that, in the terminal management apparatus in the embodiment of the present invention, the functions of the receiving unit 301, the obtaining unit 302, the determining unit 303, the comparing unit 304, and the executing unit 305 may be specifically implemented according to the method in the foregoing method embodiment, and a specific implementation process of the method may refer to related descriptions of the foregoing method embodiment, which is not described herein again.
Referring to fig. 4, fig. 4 is a schematic structural diagram of another embodiment of an intelligent home control device according to the present invention. The invention relates to an intelligent home control device, which is applied to a server and can be applied to the field of intelligent home, wherein the intelligent home control device 30 further comprises: a receiving unit 301, an obtaining unit 302, a judging unit 303, a comparing unit 304, an executing unit 305, and a viewing unit 306, wherein,
the functions of the receiving unit 301, the obtaining unit 302, the judging unit 303, the comparing unit 304 and the executing unit 305 can be referred to the relevant description in fig. 3.
Optionally, the obtaining unit 302 is further configured to determine the time T after the receiving of the first operation instruction sent by the first terminal1To time T0Whether a second operation instruction sent by a second terminal is received and responded is judged, and a permission range corresponding to the first terminal is obtained according to the corresponding relation between the terminal identification code and the permission range in the database;
this intelligent house controlling means 30 still includes:
a checking unit 306, configured to check whether the first operation instruction is within a corresponding authority range of the first terminal;
the executing unit 305 is further configured to execute the determining time T when the checking result is yes1To time T0Whether to receive and respond to the second operation instruction sent by the second terminal.
Optionally, the authority range further includes a time authority, and the viewing unit 306 is specifically configured to:
checking whether the current time is within the range allowed by the time authority and whether the first operation instruction is within the authority range corresponding to the first terminal; the execution unit 305 is further configured to execute the determination time T if the checking results are all yes1To time T0And whether to receive and respond to the second operation instruction sent by the second terminal.
It should be noted that, in the smart home control apparatus in the embodiment of the present invention, functions of the receiving unit 301, the obtaining unit 302, the determining unit 303, the comparing unit 304, the executing unit 305, and the checking unit 306 may be specifically implemented according to the method in the foregoing method embodiment, and a specific implementation process of the method may refer to related descriptions of the foregoing method embodiment, which is not described herein again.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of an intelligent home control system according to the present invention. The smart home control system comprises at least one terminal 51, at least one operation object 52 and a server 53, wherein the server 53 comprises the smart home control device 30 shown in fig. 4 and 5, the terminal may be a mobile phone, a tablet computer and the like, and the operation object may be the server 53 or a smart home device, such as a television, a refrigerator, a washing machine, a smart curtain, a water heater, a smart lamp and the like.
It should be noted that, in the intelligent home control system in the embodiment of the present invention, the functions of the terminal 51, the operation object 52, and the server 53 may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
In summary, the server receives a first operation instruction sent by the first terminal for instructing to execute a first operation on an operation object, acquires the authority level of the first terminal for the operation object according to the corresponding relationship between the terminal identification code in the database and the authority level of each operation object, then determines whether a second operation instruction sent by the second terminal for instructing to execute a second operation on the same operation object is received and responded before the current time, and if the determination result is yes, the authority level of the operation object corresponding to the first terminal is compared with the acquired authority level of the operation object corresponding to the second terminal; and responding to the first operation instruction if the authority level of the first terminal corresponding to the operation object is higher. By the method, the control confusion of the intelligent household equipment can be avoided, the hierarchical management of the user terminal on the intelligent household equipment is realized, and the user experience is improved.
In addition, the server can also acquire the authority range corresponding to the first terminal according to the corresponding relation between the terminal identification code and the authority range in the database, check whether the first operation instruction is in the authority range corresponding to the first terminal, and manage the authority of each user terminal; and the authority range also comprises time authority, the effective use time of each user terminal is further limited, and the management of the server on the user terminals in the smart home is optimized.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.