Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of modeling method of equipment, device and cloud platforms, to solve
The problem of extension function of equipment can not be instantiated by cloud platform in the prior art.
In order to solve the above technical problems, the present invention solves by the following technical programs.
The present invention provides a kind of modeling methods of equipment, comprising: the extension functional information of receiving device;Wherein, in institute
Stating in extension functional information includes: the equipment essential information of the equipment and the extension Function Identification of the extension function;Root
According to the equipment essential information, the corresponding ontology model of the equipment is generated or searched;According to the extension Function Identification, obtain
The corresponding command information of the extension function;By the corresponding command information of the extension function and the extension Function Identification, deposit
Storage is in the ontology model, to generate the instantiation file of the equipment.
Wherein, according to the extension Function Identification, the corresponding command information of the extension function is obtained, comprising: according to institute
Extension Function Identification is stated, from local terminal instruction set or third-party server, obtains the corresponding command information of the extension function.
Wherein, the corresponding command information of the extension function includes: the corresponding instruction of the extension function and/or the finger
The storage location of order.
Wherein, in the extension functional information further include: corresponding first storage location of the extension Function Identification;Its
In, first storage location is storage location of the corresponding instruction of the extension function in third-party server.
Wherein, according to the extension Function Identification, the corresponding command information of the extension function is obtained, comprising: according to institute
Extension Function Identification is stated, from the extension functional information, obtains corresponding first storage location of the extension Function Identification, with
Using first storage location as the corresponding command information of the extension function.
Wherein, the corresponding instruction letter of the extension function is obtained from third-party server according to the extension Function Identification
Breath, comprising: according to the extension Function Identification, from the extension functional information, it is corresponding to obtain the extension Function Identification
First storage location;It obtains first storage location from the third-party server according to first storage location and is directed toward
Instruction, using described instruction as the corresponding command information of the extension function.
Wherein, the corresponding instruction letter of the extension function is being obtained from local terminal instruction set according to the extension Function Identification
Before breath, the method also includes: according to the extension Function Identification, obtains corresponding with the extension Function Identification first and deposit
Storage space is set;The finger that first storage location is directed toward is obtained from the third-party server according to first storage location
It enables;The described instruction that will acquire is stored in the local terminal instruction set, by storage of the described instruction in local terminal instruction set
Position is as the corresponding command information of the extension function.
Wherein, the method also includes the standard feature information of receiving device;Wherein, in the standard feature information
It include: the standard feature mark of the standard feature;It is identified according to the standard feature, obtains the corresponding finger of the standard feature
Enable information;It is stored in the ontology model, the corresponding command information of the extension function with the example for generating the equipment
Change file, comprising: by the corresponding command information of the extension function and the extension Function Identification and the standard feature pair
The command information answered and standard feature mark, are stored in the ontology model, to generate the instantiation text of the equipment
Part.
Wherein, the corresponding command information of the standard feature, comprising: the corresponding instruction of the standard feature;And/or third
Storage location;The third storage location is storage location of the corresponding instruction of the standard feature in local terminal instruction set.
Wherein, after equipment modeling completion, the method also includes: the function control received for the equipment is asked
It asks;If the function control request is used to request to control the extension function of the equipment, according to the instantiation of the equipment
The corresponding command information of the extension function that includes in file or according to the expansion carried in function control request
The corresponding command information of function is opened up, the corresponding instruction of the extension function is obtained;The extension function pair is sent to the equipment
The instruction answered controls the extension function of the equipment by executing described instruction in the equipment end.
Wherein, the corresponding command information of the extension function carried in the function control request, comprising: the first storage
Position;First storage location is storage location of the corresponding instruction of the extension function in third-party server;With/
Or, the second storage location;Second storage location is storage of the corresponding instruction of the extension function in local terminal instruction set
Position;And/or the corresponding instruction of the extension function.
Wherein, according to the corresponding command information of the extension function that carries in function control request, described in acquisition
Extend the corresponding instruction of function, comprising: if only carrying the extension function corresponding first in function control request
Storage location, from the third-party server, obtains what first storage location was directed toward then according to first storage location
Instruction;If corresponding second storage location of the extension function is only carried in function control request, according to
Second storage location obtains the instruction that second storage location is directed toward from the local terminal instruction set.
Wherein, the method also includes: if function control request is for requesting to control the standard function of the equipment
Can, then according to the corresponding command information of the standard feature for including in the instantiation file of the equipment, obtain the standard
The corresponding instruction of function;The corresponding instruction of the standard feature is sent to the equipment, described in executing in the equipment end
Instruction, controls the standard feature of the equipment.
The present invention also provides a kind of model building devices of equipment, comprising: the first receiving module, the extension for receiving device
Functional information;Wherein, the equipment essential information in functional information including: the equipment and the extension function are extended described
The extension Function Identification of energy;Generation and searching module, for generating or searching the equipment pair according to the equipment essential information
The ontology model answered;First obtains module, for obtaining the corresponding instruction of the extension function according to the extension Function Identification
Information;Module is instantiated, it is described for being stored in the corresponding command information of the extension function and the extension Function Identification
In ontology model, to generate the instantiation file of the equipment.
Wherein, the first acquisition module is used for: according to the extension Function Identification, being taken from local terminal instruction set or third party
Business device obtains the corresponding command information of the extension function.
Wherein, the corresponding command information of the extension function includes: the corresponding instruction of the extension function and/or the finger
The storage location of order.
Wherein, in the extension functional information further include: corresponding first storage location of the extension Function Identification;Its
In, first storage location is storage location of the corresponding instruction of the extension function in third-party server.
Wherein, the first acquisition module is specifically used for: according to the extension Function Identification, from the extension functional information
In, corresponding first storage location of the extension Function Identification is obtained, using first storage location as the extension function
It can corresponding command information.
Wherein, the first acquisition module is specifically used for: according to the extension Function Identification, from the extension functional information
In, obtain corresponding first storage location of the extension Function Identification;According to first storage location, taken from the third party
Business device obtains the instruction that first storage location is directed toward, and believes described instruction as the corresponding instruction of the extension function
Breath.
Wherein, the first acquisition module is also used to: being obtained according to the extension Function Identification from local terminal instruction set
Before the corresponding command information of the extension function, according to the extension Function Identification, obtain and the extension Function Identification pair
The first storage location answered;First storage location is obtained from the third-party server according to first storage location
The instruction of direction;The described instruction that will acquire is stored in the local terminal instruction set, by described instruction in local terminal instruction set
In storage location as the corresponding command information of the extension function.
Wherein, first receiving module is also used to: the standard feature information of receiving device;Wherein, in the standard function
It include: the standard feature mark of the standard feature in energy information;The first acquisition module is also used to: according to the standard function
It can identify, obtain the corresponding command information of the standard feature;The instantiation module is used for: the extension function is corresponding
Command information and the extension Function Identification and the corresponding command information of the standard feature, are stored in the ontology model
In, to generate the instantiation file of the equipment.
Wherein, the corresponding command information of the standard feature, comprising: the corresponding instruction of the standard feature;And/or the
Three storage locations;The third storage location is storage location of the corresponding instruction of the standard feature in local terminal instruction set.
Wherein, described device further include: the second receiving module, for receiving for described after equipment modeling completion
The function control of equipment is requested;Second obtains module, if controlling the equipment for requesting for function control request
Extension function, then according to the corresponding command information of the extension function for including in the instantiation file of the equipment or
According to the corresponding command information of the extension function carried in function control request, it is corresponding to obtain the extension function
Instruction;Sending module, for sending the corresponding instruction of the extension function to the equipment, by executing institute in the equipment end
Instruction is stated, the extension function of the equipment is controlled.
Wherein, the corresponding command information of the extension function carried in the function control request, comprising: the first storage
Position;First storage location is storage location of the corresponding instruction of the extension function in third-party server;With/
Or, the second storage location;Second storage location is storage of the corresponding instruction of the extension function in local terminal instruction set
Position;And/or the corresponding instruction of the extension function.
Wherein, the second acquisition module is specifically used for: if only carrying the extension in function control request
Corresponding first storage location of function then obtains described first from the third-party server according to first storage location
The instruction that storage location is directed toward;If only carrying the extension function corresponding second storage position in function control request
It sets, then the instruction that second storage location is directed toward is obtained from the local terminal instruction set according to second storage location.
Wherein, described second module is obtained, controls the equipment for requesting if being also used to the function control request
Standard feature obtained then according to the corresponding command information of the standard feature for including in the instantiation file of the equipment
The corresponding instruction of the standard feature;The sending module is also used to send the corresponding finger of the standard feature to the equipment
It enables, by executing described instruction in the equipment end, controls the standard feature of the equipment.
The present invention also provides a kind of cloud platform, model building device of the cloud platform based on the equipment is extended to having
The equipment modeling of function, and the expansion after modeling completion, according to the instantiation file that the modeling obtains, to equipment
Exhibition function is controlled.
The present invention has the beneficial effect that:
It is corresponding that the present invention obtains extension function after receiving the extension functional information of equipment, according to extension functional information
Command information, and then generate include the corresponding command information of device extension function instantiation file.To realize cloud
Modeling of the platform to the equipment with extension function.
The present invention is directed to the extension function of equipment, according to function control request in the command information that carries, or in equipment
Instantiation file in obtain the corresponding command information of extension function, obtain the corresponding instruction of extension function, sent to equipment
The instruction, to realize control of the cloud platform to device extension function.
Specific embodiment
Main thought of the present invention is, increases the calling channel of extension function in the access frame of cloud platform, and in intelligence
The instruction that extension function increase URI, the URI direction includes the corresponding instruction of extension function can be directed in the description file of equipment
Server is being accessed by cloud platform or before controlling the extension function, and it is corresponding that cloud platform according to URI downloads the extension function
Instruction.To solve the problems, such as not accessing or control the extension function of smart machine by cloud platform.
Below in conjunction with attached drawing and embodiment, the present invention will be described in further detail.It should be appreciated that described herein
Specific embodiment be only used to explain the present invention, limit the present invention.
First embodiment
A kind of modeling method of equipment is present embodiments provided, as shown in Fig. 2, being setting according to first embodiment of the invention
The flow chart of standby modeling method.The present embodiment is executed in cloud platform side.
Step S210, the extension functional information of receiving device.
Extending functional information includes the equipment essential information of extension function corresponding device and the extension function of extension function
Mark.
It may include that one or more extends Function Identification, and each extension Function Identification pair in extension functional information
Answer/represent an extension function.
Equipment essential information includes: device type, model and device id.Device type is, for example: refrigerator class, TV-like,
Air-conditioning class etc..Device id is the coding for being in advance equipment setting, which can embody the letter such as the type of equipment, model
Breath.
Extending functional information is sent from equipment to cloud platform, and transmission opportunity includes: equipment hair in cloud platform registration
It send, or the interior transmission of preset time period after registration is complete.It will be appreciated by those skilled in the art that equipment essential information can
It, can also be independently of extension functional information to be included among extension functional information.
Based on the extension functional information, the equipment is instantiated, includes the device extension function pair to generate
The instantiation file for the command information answered.
Step S220 generates or searches the corresponding ontology model of the equipment according to equipment essential information.
Specifically, presetting storage in cloud platform, there are many ontology model libraries of ontology model;For the ease of using,
Predefine device type belonging to each ontology model and/or ID;Cloud platform is according in the extension functional information received
Equipment essential information can be searched in ontology model library, if it is possible to find matched ontology model, then it can be straight
It connects using the ontology model and generates instantiation file, if failing to find matched ontology model, can temporarily generate
The corresponding ontology model of equipment.
Step S230 obtains the corresponding command information of extension function according to extension Function Identification.
The command information of extension function includes: the storage address of the corresponding instruction of extension function and/or instruction.The instruction is used
In the function in equipment side control equipment.The storage address can be URI, and further, storage address can be unified resource
Finger URL (Uniform Resource Locator, abbreviation URL).
Specifically, from local terminal instruction set or third-party server, obtaining extension function pair according to the extension Function Identification
The command information answered.Specifically please refer to second embodiment and 3rd embodiment.
Step S240 will extend the extension Function Identification of the corresponding command information of function He extension function, be stored in life
At or in the ontology model that finds, the instantiation file of generating device.
Second embodiment
Present embodiments provide a kind of modeling method of more detailed equipment.In the present embodiment, for have sent mark
The equipment of quasi- functional information and extension functional information is set described in instantiation based on the standard feature information and extension functional information
It is standby, so as to the instantiation file of generating device;Include the corresponding command information of extension function and standard in instantiation file
The corresponding command information of function.
As shown in figure 3, Fig. 3 is the flow chart of the modeling method of equipment according to a second embodiment of the present invention.
Step S310, the device description file of receiving device.
It include: equipment essential information, standard feature information and extension functional information in device description file.
Equipment essential information includes: device type and device id.
Standard feature information includes: one or more standard feature marks.
Extension functional information includes: one or more extension Function Identifications, alternatively, further including each extension Function Identification pair
The first storage location answered.First storage location is the storage location for extending the corresponding instruction of function in third-party server.
Third-party server is the commander server that the extension function that device manufacturer is equipment specially provides.
Standard feature is identified as the coding being correspondingly arranged in advance for standard feature, as shown in figure 1 the id in Function node
, extension Function Identification be in advance be coding that extension function is correspondingly arranged.Standard feature mark and extension Function Identification use
Coding mode can be different, so that cloud platform can distinguish standard feature and extension function.
Step S320 is set in preset ontology model library according to the equipment essential information in device description file
Standby corresponding ontology model.
According to the device type and/or device id in equipment essential information, inquiry and device type in ontology model library
And/or the matched ontology model of device id.In general, as long as equipment has standard feature, so that it may in ontology model library,
Find the corresponding ontology model of equipment.
Cloud platform in addition to distinguishing standard feature and extension function using identifying by standard feature and extend Function Identification,
Standard feature and extension function can also be distinguished by ontology model, i.e., in ontology model there are the function of node be standard
Function is extension function there is no the function of node.
Step S330, based on the extension functional information in device description file, from local terminal instruction set or third party's service
Device obtains the corresponding command information of extension function.
Local terminal instruction set, for storing the corresponding instruction of standard feature instruction corresponding with extension function.
It should be noted that cloud platform only stores the corresponding command information of standard feature originally, extension function may be not present
It can corresponding instruction.And in the present embodiment, local terminal instruction set both can store the corresponding instruction of standard feature or can store
The corresponding instruction of function is extended, still, cloud platform local terminal instructs the centrally stored command information corresponding with extension function to be
By the subsequent offer of third-party server.
If being just stored with the corresponding instruction of extension function when receiving extension functional information in local terminal instruction set, then may be used
To be device manufacturer after the completion of device extension Functional Design, by third server, by the corresponding instruction of extension function
With extension Function Identification be sent to cloud platform, be responsible for being stored in local terminal instruction set by cloud platform, wait need in use, directly from
It is obtained in local terminal instruction set.
Step S330 is more specifically described, and please refers to 3rd embodiment.
Step S340 from local terminal instruction set, obtains standard feature based on the standard feature information in device description file
Corresponding command information.
The corresponding instruction of the standard feature for including in every kind of ontology model is stored in advance in local terminal instruction set, and this refers to
Enable storage corresponding with standard feature mark.So being identified according to the standard feature in standard feature information, so that it may refer to from local terminal
It enables and concentrating, obtain the corresponding instruction of the standard feature and its storage location.
Step S350, according to equipment essential information, the corresponding command information of standard feature, extension Function Identification, extension function
The corresponding command information of energy and ontology model, carry out instantiation processing, the instantiation file of generating device to equipment.
It is the position that equipment essential information provides by equipment essential information storage to ontology model;Standard feature is corresponding
It is the position that standard feature provides that command information, which is stored in ontology model,;It is according to preset insertion rule, extension function is corresponding
Command information and extension Function Identification be inserted into and be stored in ontology model.Wherein, ontology model is what standard feature provided
It include that standard feature identifies in position, then without separately storing.
Ontology model is that equipment essential information and standard feature both provide storage location, therefore, directly that equipment is basic
Information is placed into corresponding position, as shown in figure 1 DeviceInfo;It is identified according to standard feature, standard is found in ontology model
The node location of function, by the corresponding command information storage of standard feature to the parameter position of standard feature node, as shown in figure 1
Function.The process is the prior art, and therefore not to repeat here.
It does not include the node of device extension function in ontology model, therefore, it is necessary to preset, will to extend function corresponding
Command information is placed into the method in ontology model, i.e. insertion rule.Insertion rule includes: by extension Function Identification and extension
The corresponding instruction of function is inserted between beginning, tail end and the two neighboring standard feature node of ontology model.
By equipment essential information, the corresponding command information of standard feature, the corresponding command information storage of extension function to originally
After body Model, it converts ontology model to the form of file, that is, generates instantiation file.If ontology model Plays function
The quantity of node is greater than the quantity of standard feature information Plays function, then during generating instantiation file, ignores mark
The standard feature being not directed in quasi- functional information.
3rd embodiment
Command information includes: the corresponding instruction of function and/or the storage location of the instruction.
The command information of extension function includes: the corresponding instruction of extension function, and/or the first storage location and/or second
Storage location.Wherein, the first storage location is storage location of the corresponding instruction of the extension function in third-party server;The
Two storage locations are storage location of the corresponding instruction of the extension function in local terminal instruction set.
The command information of standard feature includes: the corresponding instruction of standard feature, and/or third storage location.Third storage
Position is storage location of the corresponding instruction of the standard feature in local terminal instruction set.
For extending function, equipment, can in extension functional information when sending extension functional information to cloud platform
To carry the first storage location of the corresponding instruction of extension function, and/or instruction.It can also be from third-party server actively to cloud
First storage location of the platform push corresponding instruction of extension function, and/or the instruction.
In extension functional information, the first storage location is corresponding with extension Function Identification.If wrapped in extension functional information
Corresponding first storage location of extension Function Identification is included, then the method for obtaining the corresponding command information of extension function includes: following
The combination of any one or more mode in three kinds of modes and following three kinds of modes:
First way, from extension functional information in extract extension Function Identification after, according to extension Function Identification,
From extension functional information, corresponding first storage location of the extension Function Identification is obtained;Using the first storage location as described in
Extend the corresponding command information of function.
The second way further, according to the first storage location, takes on the basis of first way from third party
Business device obtains the instruction of first storage location direction;Using described instruction as the corresponding command information of the extension function.
The third mode, on the basis of the second way, further, the corresponding finger of extension function that will acquire
It enables and the extension Function Identification correspondence of extension function is stored in local terminal instruction set, by described instruction in local terminal instruction set
Storage location is as the second storage location;By the second storage location, as the corresponding command information of extension function.
The opportunity for the instruction that the first storage location is directed toward is obtained from third-party server, comprising: receiving extension function
After information, instantiation processing during, instantiation processing complete after.Further, extension function is being received
The instruction that the first storage location is directed toward is obtained after information, then in instantiation file, the corresponding command information of extension function can
To include: instruction, and/or the first storage location, and/or the second storage location.First is obtained during instantiation processing
The instruction that storage location is directed toward, then in instantiation file, the corresponding command information of extension function may include: instruction, and/or
First storage location, and/or the second storage location.The finger of the first storage location direction is obtained after instantiation processing is completed
It enables, then in instantiation file, the corresponding command information of extension function only includes: the first storage location.
Fourth embodiment
On the basis of the modeling method of equipment provided by the invention, the function control to equipment can also be realized.This reality
It applies example and proposes a kind of function control method of equipment, as shown in figure 4, for according to the function of the equipment of fourth embodiment of the invention
The flow chart of control method.
Step S410, after equipment modeling completion, the function control received for equipment is requested.
Function control request is for requesting the extension function or standard feature of cloud platform control equipment.It is requested in function control
In comprising equipment essential information, request control extension function extension Function Identification, request control standard feature standard
Function Identification.
Function control request can be issued by terminal.The terminal is, for example, mobile phone, computer, tablet computer etc..At the end
The application program (Application, abbreviation APP) of device manufacturer's offer is installed, it includes equipment which, which provides, in end
Functional (extension function and standard feature) control interface, user triggers the function of a certain function by the control interface
The transmission of request is controlled, and then the function is called by cloud platform.
Step S420, whether arbitration functions control request is for requesting the extension function of control equipment.If so, executing step
Rapid S430;If it is not, thening follow the steps S450.
Step S430, arbitration functions control in request whether carry the corresponding command information of extension function.If so, executing
Step S440, if it is not, thening follow the steps S450.
The corresponding command information of extension function include: extension function it is corresponding instruct, and/or the first storage location and/or
Second storage location.Further, the corresponding instruction of extension function and its first storage location, can have third server for eventually
End provides;Second storage location can be provided by cloud platform for terminal.
Step S440, according to function control request in the corresponding command information of extension function that carries, obtain extension function
Corresponding instruction.Step S480 is executed after executing step S440.
If only carrying corresponding first storage location of extension function in function control request, according to first storage
Position obtains the instruction of first storage location direction from third-party server.
If only carrying corresponding second storage location of extension function in function control request, according to second storage
Position obtains the instruction of second storage location direction from local terminal instruction set.
Step S450, according to function control request in equipment essential information, obtain the instantiation file of equipment.
Step S460, according to function control request in extension Function Identification, instantiation file in obtain extension function
Corresponding command information;According to function control request in standard feature mark, instantiation file in obtain standard feature pair
The command information answered.
The corresponding command information of standard feature includes: the corresponding instruction of standard feature, and/or third storage location.
Step S470 obtains the corresponding instruction of extension function according to the corresponding command information of extension function;According to standard function
The corresponding command information of energy obtains the corresponding instruction of standard feature.
If the corresponding command information of standard feature is that third storage location refers to according to third storage location from local terminal
Collection is enabled, the instruction of third storage location direction is obtained.
Step S480 sends the corresponding instruction of extension function and the corresponding instruction of standard feature to equipment, and passes through
It is executed instruction in equipment end, to control the corresponding function of equipment.
The corresponding instruction of extension function, which is sent, to equipment controls the extension of equipment by executing the instruction in equipment end
Function.The corresponding instruction of standard feature, which is sent, to equipment controls the standard function of equipment by executing the instruction in equipment end
Energy.
Extension function control parameter and standard feature control parameter can also be included in function control request.It is being instructed
It afterwards, will be in these parameter write instructions.Such as: it instructs to reduce temperature, parameter is 20 DEG C, then is ultimately sent to the instruction of equipment
To reduce temperature to 20 DEG C.
5th embodiment
The model building device for present embodiments providing a kind of equipment is illustrated in figure 5 the equipment of fifth embodiment of the invention
The structure chart of model building device.
The device includes:
First receiving module 510, the extension functional information for receiving device.
Extension functional information in include: the extension function corresponding device equipment essential information and the extension
The extension Function Identification of function.The corresponding command information of extension function, which includes: that the extension function is corresponding, to be instructed and/or described
The storage location of instruction.
Generation and searching module 520, for generating or searching the equipment corresponding according to the equipment essential information
Body Model.
First obtains module 530, for obtaining the corresponding instruction letter of the extension function according to the extension Function Identification
Breath.
Module 540 is instantiated, for storing the corresponding command information of the extension function and the extension Function Identification
In the ontology model, to generate the instantiation file of the equipment.
Further, first module 530 is obtained, be used for according to the extension Function Identification, from local terminal instruction set or third
Square server obtains the corresponding command information of the extension function.
In extension functional information further include: corresponding first storage location of the extension Function Identification;Wherein, described
One storage location is storage location of the corresponding instruction of the extension function in third-party server.
In one embodiment, the first acquisition module 530 is specifically used for: according to the extension Function Identification, from the expansion
Open up in functional information, obtain corresponding first storage location of the extension Function Identification, using first storage location as
The corresponding command information of the extension function.
In another embodiment, the first acquisition submodule 530 is specifically used for: according to the extension Function Identification, from described
It extends in functional information, obtains corresponding first storage location of the extension Function Identification;According to first storage location, from
The third-party server obtains the instruction that first storage location is directed toward, using described instruction as the extension function
Corresponding command information.
In another embodiment, the first acquisition submodule 530 is also used to: according to the extension Function Identification, from local terminal
Instruction set before obtaining the corresponding command information of the extension function, according to the extension Function Identification, obtains and the extension
Corresponding first storage location of Function Identification;According to first storage location, from the third-party server, described the is obtained
The instruction that one storage location is directed toward;The described instruction that will acquire is stored in the local terminal instruction set, by described instruction at this
Hold the storage location in instruction set as the corresponding command information of the extension function.
In another embodiment, the first receiving module 510 is also used to the standard feature information of receiving device;Wherein, in institute
State include: in standard feature information the standard feature standard feature mark;First acquisition module 530 is also used to: according to institute
Standard feature mark is stated, the corresponding command information of the standard feature is obtained;Module 540 is instantiated, for being based on the standard
Functional information and the extension functional information and the corresponding command information of the standard feature, are stored in the ontology model
In, to generate the instantiation file of the equipment.
The corresponding command information of the standard feature, comprising: the corresponding instruction of the standard feature;And/or third storage
Position;The third storage location is storage location of the corresponding instruction of the standard feature in local terminal instruction set.
The function of device described in the present embodiment is shown in first embodiment, second embodiment and the 3rd embodiment
It is described in embodiment of the method, therefore not detailed place in the description of the present embodiment, it may refer to the phase in previous embodiment
It speaks on somebody's behalf bright, this will not be repeated here.
Sixth embodiment
As shown in fig. 6, for according to the structure chart of the model building device of the equipment of sixth embodiment of the invention.The present embodiment in order to
Realize the function control function to equipment.
The model building device of equipment includes:
Second receiving module 610, for after equipment modeling completion, the function control received for the equipment to be asked
It asks.
Second obtains module 620, if being used to request to control the extension function of the equipment for function control request
Can, then according to the corresponding command information of the extension function for including in the instantiation file of the equipment or according to described
The corresponding command information of the extension function carried in function control request obtains the corresponding instruction of the extension function.
Sending module 630, for sending the corresponding instruction of the extension function to the equipment, by the equipment end
Described instruction is executed, the extension function of the equipment is controlled.
The extension function for including in the corresponding command information of extension function and instantiation file carried in function control request
The corresponding command information of energy is identical, the two command informations all include: the first storage location;First storage location is described
Extend storage location of the corresponding instruction of function in third-party server;And/or second storage location;Second storage
Position is storage location of the corresponding instruction of the extension function in local terminal instruction set;And/or the extension function is corresponding
Instruction.
Second obtains module 620, is specifically used for: if only carrying the extension function pair in function control request
The first storage location answered then obtains first storage position from the third-party server according to first storage location
Set the instruction of direction;If only carrying corresponding second storage location of the extension function in function control request,
The instruction that second storage location is directed toward is obtained from the local terminal instruction set according to second storage location.
In one embodiment, the second acquisition module 620 is also used to: if function control request is for requesting control
The standard feature of the equipment is then believed according to the corresponding instruction of the standard feature for including in the instantiation file of the equipment
Breath, obtains the corresponding instruction of the standard feature;Sending module 630 is also used to: Xiang Suoshu equipment sends the standard feature pair
The instruction answered controls the standard feature of the equipment by executing described instruction in the equipment end.
The corresponding command information of standard feature includes: the corresponding instruction of the standard feature;And/or third storage location;
The third storage location is storage location of the corresponding instruction of the standard feature in local terminal instruction set.
The function of device described in the present embodiment is described in the embodiment of the method shown in fourth embodiment,
Therefore not detailed place in the description of the present embodiment, it may refer to the related description in previous embodiment, this will not be repeated here.
7th embodiment
The present invention proposes a kind of cloud platform, which includes the model building device of above equipment and the function control dress of equipment
It sets, cloud platform model building device based on equipment is to the equipment modeling with extension function, and function control based on equipment fills
The extension function to equipment is set to control.
Enumerate a specific application example below, come further explain present device modeling method and apparatus
Function control method.As shown in fig. 7, for according to the structure chart of the cloud platform system of seventh embodiment of the invention.
The system includes: equipment, the cloud platform controlled for equipment modeling and functions of the equipments and for triggering cloud platform
Carry out the terminal of functions of the equipments control.
Cloud platform includes application service module, cloud platform access frame, ontology model library, instantiation module, instantiation text
Part library, instruction set, third-party server are to connection module, registration module and device management module.
Registration module is equivalent to the first receiving module 510 and generates the combination with searching module 520, and instantiation module is suitable
Module 530 is obtained in first and instantiates the combination of module 540, and application service module is equivalent to the second receiving module 610, Yun Ping
Platform access frame is equivalent to the second acquisition module 620, and device management module is equivalent to sending module 630.
It is illustrated below for process of the cloud platform to equipment modeling:
Equipment describes file to cloud platform sending device, realizes the registration in cloud platform.Include in device description file
Equipment essential information, extension functional information and standard feature information.Known according to the record of device description file: equipment is believed substantially
Breath includes that device type is air-conditioning class, device id 001;Equipment supports 4 functions, wherein 3 functions are standard feature, 1
Function is extension function;The standard feature mark of 3 standard features is respectively F1, F2, F3, the extension function of 1 extension function
Marker F4;There are a corresponding URI by F4.The URI is that third-party server is provided previously.
Registration module receives the device description file from equipment.Registration module is according to equipment essential information, in ontology mould
The corresponding ontology model of equipment is obtained in type library, and the device description file of the equipment and its corresponding ontology model are all passed to
Instantiate module.
The data in module ontology model based on equipment and device description file are instantiated, the equipment is instantiated, it is raw
The instantiation file of forming apparatus, and the instantiation file is stored in instantiation library.Further, described in the instantiation
During equipment, instantiation module judges F1, F2 and F3 according to ontology model for standard feature mark, and F4 is extension function
Mark;Instantiation module obtains the corresponding instruction of F1, F2 and F3 from instruction set;According to the ontology model of equipment, equipment
Essential information, the corresponding instruction of F1, F2, F3, and F4 and its corresponding URI in functional information is extended, equipment is carried out
Instantiation processing, the instantiation file of generating device.
In one embodiment, for F4, according to the corresponding URI of F4, third-party server can be requested by instantiating module
Connection module is downloaded from third-party server and is instructed from the URI.Third-party server executes downloading movement to connection module, and will knot
Fruit returns to third-party server to connection module.The corresponding instruction of F4 is obtained to connection module from third-party server in instantiation module
Afterwards, by instruction storage into instruction set.
It is illustrated below for function control process of the cloud platform to equipment:
APP in user's using terminal controls request R1 and R4, R1 request call (control) F1 to cloud platform sending function
Corresponding standard feature, the corresponding extension function of R4 request call F4.Portable device essential information and F1 in R1;R4 Portable device
Essential information, the corresponding URI of F4, F4.The corresponding URI of F4 is that third-party server provides.
Application server module receives R1 and R4, determines the interface of the function of R1 and R4 request call respectively.Wherein,
Cloud platform accesses frame and provides corresponding standard interface for standard feature.F1 corresponds to CLOUD_F1 interface, F2 corresponds to CLOUD_F2
Interface, F3 correspond to CLOUD_F3 interface.In order to handle the relevant request of extension function, cloud platform access frame increases expansion
Interface EXT_Fun is opened up, F4 can consider corresponding with EXT_Fun interface.
Application server module calls CLOUD_F1 interface to handle R1, and EXT_Fun interface is called to handle R4.
Cloud platform accesses frame and parses R1 by CLOUD_F1 interface, in instantiation library, the example that finds equipment
Change file, the corresponding instruction of F1 is obtained in instantiation file.
Cloud platform accesses frame and parses R4 by EXT_Fun interface, and the URI of the corresponding instruction of F4 is obtained in R4, alternatively,
In instantiation file, the instantiation file of equipment is found, the corresponding URI of F4 is obtained in instantiation file.Cloud platform access
The URI is passed to third-party server to connection module by frame;Third-party server is responsible for from third-party server connection module
Download the instruction of URI direction, the i.e. corresponding instruction of F4.
Cloud platform accesses frame and the corresponding instruction of F1 instruction corresponding with F4 is sent to device management module, by equipment pipe
The corresponding instruction of F1 instruction corresponding with F4 is sent to equipment by reason module, is controlled respectively the function of equipment.
It will be appreciated by those skilled in the art that this implementation is intended merely to more clearly describe the present invention, it is not used to limit
The system present invention, principle according to the present invention can be modified and change to the present embodiment.
Structure based on above system, can provide a semantic engine, which includes: ontology model library, reality
Exampleization module and instantiation library, as shown in the dotted line frame in Fig. 7.
After equipment modeling and device instance, carries out intelligently reasoning and mix poly-.
Reasoning mainly carries out intelligentized reasoning according to ontology model.Such as: when user inputs speech message to terminal
" too hot ".After so cloud platform receives the speech message, which is converted into specific instruction.It will " too hot "
This user input resolves to " reduce temperature ", reasoning become a Buddhist monk or nun in have which equipment that there is refrigerating function, after finding relevant device,
The cooling instruction issued to these equipment.
It is mixed poly-, multiple abstract equipment are formed into a new virtual unit.Such as: there are 3 air-conditionings in family, is located at sleeping
Room and parlor, if user requires the temperature in family to be reduced to 25 DEG C, any one air-conditioning can not be completed individually
This function, it is therefore desirable to 3 air-conditioning equipments be formed into a new virtual unit, the function of the virtual unit is exactly control room
Interior mean temperature is to 25 DEG C.
Although for illustrative purposes, the preferred embodiment of the present invention has been disclosed, those skilled in the art will recognize
It is various improve, increase and replace be also it is possible, therefore, the scope of the present invention should be not limited to the above embodiments.