The content of the invention
In view of the deficiencies of the prior art, the present invention provides a kind of smart machine, the control method and device of smart machine, leads to
Cross increases the precondition field of any coordination in each property parameters of the smart machine, builds smart machine
Property parameters between logical relation, so as to avoid smart machine control failure situation.
The purpose of the present invention is what is realized using following technical proposals:
In a first aspect, a kind of smart machine control method is present embodiments provided, including:
Establish and connect with the smart machine, smart machine example is created according to the smart machine;
Receive the operation requests that the smart machine is set and parse the operation requests, determine to need the attribute ginseng operated
Numerical value;
The precondition of the property parameters value is obtained, the precondition includes:Limit value and address source;
Described address source is obtained according to the address source of the precondition of the property parameters value and corresponds to property parameters value;
Described address source corresponds to property parameters value compared with the limit value of the precondition, and according to the knot of the comparison
Fruit sends control command to the smart machine.
With reference to first aspect, in the first possible implementation of first aspect, described address source corresponds to attribute ginseng
Numerical value sends control command bag compared with the limit value of the precondition, and according to result of the comparison to the smart machine
Include:If described address source corresponds to property parameters value and is contained in the limit value, direct setting is issued to the smart machine
The order of the property parameters value for needing to operate;If described address source corresponds to property parameters value and is not included in the limit value
In, then first issued to the smart machine and set described address source to correspond to property parameters value order, corresponded to described address source and belong to
Property parameter value be contained in the limit value, then issued to the smart machine and the property parameters value for needing to operate be set
Order.
With reference to first aspect, it is described to be built with the smart machine in second of possible implementation of first aspect
Vertical connection includes:Established and connected by server in LAN and the smart machine;Alternatively, pass through Cloud Server and LAN
Middle server establishes connection, then establishes and connect with the smart machine.
Second aspect, the present embodiment provides a kind of smart machine, including:
Increase n precondition fields in every property parameters of the smart machine, wherein n is natural number;It is described
Precondition includes:Limit value and address source.
With reference to second aspect, in the first possible implementation of first aspect, the model bag of the smart machine
Include:Essential information, attribute and operation.
With reference to second aspect, in second of possible implementation of first aspect, the operation includes at least described
The corresponding operating parameter of property parameters, the operating parameter can set it to correspond to property parameters value.
With reference to second aspect, in the third possible implementation of second aspect, the property parameters value includes:Number
According to type, numerical value, number range, write mark, precondition;And the data type, numerical value, number range, write mark, is preposition
Condition is coordination.
With reference to second aspect, in the 4th kind of possible implementation of second aspect, the operating parameter includes:For
The parameter and return value of numerical value are set.
It is described to be built with the smart machine in the 5th kind of possible implementation of second aspect with reference to second aspect
Vertical connection includes:Established and connected by server in LAN and the smart machine;Alternatively, pass through Cloud Server and LAN
Middle server establishes connection, then establishes and connect with the smart machine.
The third aspect, present embodiments provides a kind of smart machine control device, including:
Link block, connects for being established with the smart machine, and smart machine example is created according to the smart machine;
Receiving module, the operation requests of the smart machine are set for receiving and parse the operation requests, determine to need
The property parameters value to be operated;
First acquisition module, obtains the precondition of the property parameters value, and the precondition includes:Limit value and ground
Location source;
Second acquisition module, the address source for the precondition according to the property parameters value obtain described address source pair
Answer property parameters value;
Analysis module, property parameters value is corresponded to compared with the limit value of the precondition for described address source, and root
According to the result of the comparison control command is sent to the smart machine.
With reference to second aspect, in the first possible implementation of first aspect, the analysis module includes:
First analytic unit, is contained in the limit value if corresponding to property parameters value for described address source, to institute
State smart machine and issue the order that the property parameters value for needing to operate directly is set;
Second analytic unit, is not included in the limit value if corresponding to property parameters value for described address source, first
Being issued to the smart machine sets described address source to correspond to property parameters value order, described address source is corresponded to property parameters value
It is contained in the limit value, then the order that the property parameters value for needing to operate is set is issued to the smart machine.
With reference to second aspect, in second of possible implementation of first aspect, the link block includes:
First connection unit, connects for being established by server in LAN and the smart machine;
Alternatively, the second connection unit, connected for being established by server in Cloud Server and LAN, then with the intelligence
Can equipment foundation connection.
Compared with the immediate prior art, the device have the advantages that:
In actual life, there is logical relation between some property parameters of smart machine, but in the prior art,
There is no logical relation between the property parameters of smart machine;In general, under Intelligent household scene for access network smart machine,
Need control centre to create corresponding device instance according to the device model of smart machine, realize user to intelligence based on device instance
The control of energy equipment, due to not having any logical relation between the property parameters of smart machine, so as to cause to intelligence
Equipment control failure, so as to influence the service quality of Internet of Things.Compared with the immediate prior art, the present invention provides one kind
The control method and device of smart machine, smart machine, can be any by increasing in each property parameters of smart machine
A precondition field including address source and limit value, builds the logical relation between the property parameters of smart machine;Work as intelligence
Can terminal to smart machine send control command when so that smart machine can according to the address source and limit value of precondition,
The corresponding property parameters value of precondition of the corresponding property parameters value of the order is first set, makes the corresponding attribute ginseng of precondition
Numerical value meets the requirement of the precondition, then the corresponding property parameters value of setting command, so as to avoid smart machine because of attribute
The situation that parameter value mutually constrains and causes control to fail, improves the service quality of Internet of Things.
Embodiment
The embodiment of the present invention is described in further detail below in conjunction with the accompanying drawings
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
The all other embodiment obtained without making creative work, belongs to the scope of protection of the invention.
A kind of smart machine control method provided by the invention can be by increasing in each property parameters of smart machine
Add any precondition field including address source and limit value, the logic built between the property parameters of smart machine is closed
System, so as to avoid the situation of smart machine control failure;
Increase n precondition fields in every property parameters of the smart machine, wherein n is natural number;
Wherein, the smart machine model as shown in Figure 1, including:Essential information, attribute and operation;
The operation includes at least the corresponding operating parameter of the property parameters, and the operating parameter can set its correspondence
Property parameters value;
The property parameters value includes:Data type, numerical value, number range, write mark, precondition;And the data
Type, numerical value, number range, write mark, precondition is coordination;
The operating parameter includes:For setting the parameter and return value of numerical value.
Further, the precondition includes:Limit value and address source;Described address source is the address of property parameters,
Described address source can be set according to practical application;
For example, the device model of air-conditioning, as shown in Fig. 2, including:Attribute and operation, wherein attribute include:Target temperature and
Operating mode;Target temperature and operating mode include:Data type, numerical value, number range, write mark and precondition etc.;Together
When, operation includes corresponding with attribute:Target temperature is set and operating mode is set;Target temperature is set and operating mode is set
Include corresponding with attribute setting numerical value and return value etc.;
Fig. 3 is a kind of method flow diagram of smart machine control method provided by the invention, as shown in figure 3, including:
101st, establish and connect with the smart machine, according to the model creation smart machine example of the smart machine;
Wherein, as shown in figure 4,101 further include:
1011st, established and connected by server in LAN and the smart machine;
Alternatively, 1012, by Cloud Server and LAN server establish connection, then with the smart machine establish connect
Connect.
Such as:As shown in figure 5, when mobile equipment and smart television are in same LAN, mobile equipment passes through the office
Intelligent gateway in the net of domain directly controls smart television;When moving equipment and smart television not in same LAN, move
The control command of equipment is first sent to cloud platform, and the control command that mobile equipment is sent then is transmitted to movement by cloud platform
Intelligent gateway where the smart television that equipment needs control in LAN, so as to fulfill control of the mobile equipment to smart television
System.
Specifically, in the present embodiment, after being established a connection using above-mentioned smart machine with mobile equipment, further include as follows
Concrete operations:
102nd, receive and the operation requests of the smart machine are set and parse the operation requests, determine to need the category operated
Property parameter value;
103rd, the precondition of the property parameters value is obtained;
104th, described address source is obtained according to the address source of the precondition of the property parameters value and corresponds to property parameters value;
105th, described address source corresponds to property parameters value compared with the limit value of the precondition, and according to the comparison
Result to the smart machine send control command.
Wherein, as shown in fig. 6,105 further include:
If the 1051, described address source corresponds to property parameters value and is contained in the limit value, under the smart machine
Hair directly sets the order of the property parameters value for needing to operate;
If the 1052, described address source corresponds to property parameters value and is not included in the limit value, first set to the intelligence
Standby issue sets described address source to correspond to property parameters value order, described address source is corresponded to property parameters value and is contained in the limit
In definite value, then the order that the property parameters value for needing to operate is set is issued to the smart machine.
For example, according to air-conditioning model as shown in Figure 2, in practical applications, the premise of air-conditioning equipment adjustment temperature is to set
The operating mode of tune is emptied, only air-conditioning could adjust the temperature of air-conditioning in the operating mode for freezing and heating;The work of air-conditioning
Operation mode includes:Refrigeration, heating and ventilation isotype;Want reduce indoor temperature need ensure air-conditioning equipment operating mode be
Refrigeration;The numerical value 1 of operating mode is refrigeration mode, 2 is heating mode, 3 is ventilation mode in the device instance of air-conditioning;User
Indoor temperature is wanted to set up to be controlled air-conditioning by mobile equipment, the operating mode of room conditioning is 3 ventilation modes at this time,
Specific operation process is as shown in Figure 7;
Step 1:Air-conditioning sends notice of reaching the standard grade to Household intelligent gateway, and is registered to cloud platform.
Step 2:After cloud platform receives the notice message of reaching the standard grade of air-conditioning, according to the device type information included in message, look into
Corresponding apparatus body model is ask, creates device instance as shown in Figure 3.
Step 3:Cloud platform receives the instruction that equipment is moved from user, such as " room is too warm ".
Step 4:Cloud platform parses user instruction, determines that user wishes to reduce room temperature, and then inquiry has adjustment room temperature work(
The equipment of energy, obtains the device instance for the air-conditioning equipment for having the function of to adjust room temperature, while determines to need to call air-conditioning equipment
Target temperature field is set in device instance.
Step 5:Cloud platform, which obtains, sets the corresponding attribute objectives temperature of target temperature, whether full inquires about its precondition
Foot;Inquiry can obtain, and the limit value of the precondition of attribute objectives temperature is " numerical value is 1 or 2 ", and the corresponding address of address source is category
Sex work pattern;And the current value of Attributes pattern is 3, it is unsatisfactory for changing the precondition of target temperature, it is therefore desirable to
First change the numerical value of Attributes pattern.
Step 6:Cloud platform querying attributes operating mode, the attribute is without precondition;Therefore, directly acquire and change attribute work
The operation of operation mode, sets the numerical value of operating mode.
Step 7:Cloud platform issues setting operating mode instruction to air-conditioning.
Step 8:Cloud platform is issued to air-conditioning sets target temperature to instruct.
Step 9:Cloud platform receives the instruction execution result that air-conditioning reports.
Step 10:Cloud platform generation user asks implementing result, is advertised to user.
In actual life, there is logical relation between the property parameters of smart machine, but in the prior art, intelligence
There is no logical relation between the property parameters of equipment;Under usual Intelligent household scene for access network smart machine, it is necessary to
Control centre creates corresponding device instance according to the device model of smart machine, so as to fulfill control of the user to smart machine
System, due to not having any logical relation between the property parameters of smart machine, can cause to control failure to smart machine, so that
Influence the service quality of Internet of Things;Compared with the immediate prior art, the present invention provides a kind of smart machine control method
And can be by increasing any a coordination including address source and limit value in each property parameters of smart machine
Precondition field, builds the logical relation between the property parameters of smart machine;Controlled when intelligent terminal is sent to smart machine
During system order so that smart machine can first set the corresponding attribute ginseng of the order according to the address source and limit value of precondition
The corresponding property parameters value of precondition of numerical value, makes the corresponding property parameters value of precondition meet wanting for the precondition
Ask, then the corresponding property parameters value of setting command, cause to control because mutually constraining property parameters value so as to avoid smart machine
The situation of failure is made, improves the service quality of networking.
The embodiment of the present invention also provides a kind of smart machine control device, as shown in figure 8, including:
Link block, connects for being established with the smart machine, and smart machine example is created according to the smart machine;
Receiving module, the operation requests of the smart machine are set for receiving and parse the operation requests, determine to need
The property parameters value to be operated;
First acquisition module, obtains the precondition of the property parameters value;
Second acquisition module, the address source for the precondition according to the property parameters value obtain described address source pair
Answer property parameters value;
Analysis module, property parameters value is corresponded to compared with the limit value of the precondition for described address source, and root
According to the result of the comparison control command is sent to the smart machine.
The analysis module as shown in figure 9, including:
First analytic unit, is contained in the limit value if corresponding to property parameters value for described address source, to institute
State smart machine and issue the order that the property parameters value for needing to operate directly is set;
Second analytic unit, is not included in the limit value if corresponding to property parameters value for described address source, first
Being issued to the smart machine sets described address source to correspond to property parameters value order, described address source is corresponded to property parameters value
It is contained in the limit value, then the order that the property parameters value for needing to operate is set is issued to the smart machine.
The link block, as shown in Figure 10, including:
First connection unit, connects for being established by server in LAN and the smart machine;
Alternatively, the second connection unit, connected for being established by server in Cloud Server and LAN, then with the intelligence
Can equipment foundation connection.
In actual life, there is logical relation between the property parameters of smart machine, but in the prior art, intelligence
There is no logical relation between the property parameters of equipment;Under usual Intelligent household scene for access network smart machine, it is necessary to
Control centre creates corresponding device instance according to the device model of smart machine, so as to fulfill control of the user to smart machine
System, due to not having any logical relation between the property parameters of smart machine, can cause to control failure to smart machine, so that
Influence the service quality of Internet of Things;Compared with the immediate prior art, the present invention provides a kind of smart machine control device
Before can be by increasing any coordination including address source and limit value in each property parameters of smart machine
Condition field is put, builds the logical relation between the property parameters of smart machine;Controlled when intelligent terminal is sent to smart machine
During order so that smart machine can first set the corresponding property parameters of the order according to the address source and limit value of precondition
The corresponding property parameters value of precondition of value, makes the corresponding property parameters value of precondition meet the requirement of the precondition,
The corresponding property parameters value of setting command again, causes control to be lost so as to avoid smart machine because property parameters value mutually constrains
Situation about losing, improves the service quality of networking.
Finally it should be noted that:The above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof, to the greatest extent
Pipe is described in detail the present invention with reference to above-described embodiment, those of ordinary skills in the art should understand that:Still
Can be to the embodiment technical scheme is modified or replaced equivalently of the present invention, and without departing from any of spirit and scope of the invention
Modification or equivalent substitution, it should all cover within the claims of the present invention.