Detailed Description
In order to solve the problems in the prior art, the present invention provides a method, a device calling method, a device, a server, and a storage medium for creating a home service framework, and the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The use of prefixes such as "first," "second," etc. to distinguish between elements is merely intended to facilitate the description of the invention and has no particular meaning in and of themselves.
Example one
An embodiment of the present invention provides a method for creating a home service framework, and as shown in fig. 1, the method includes:
s101, establishing a first association between the obtained equipment service and a preset home attribute, wherein the home attribute is used for identifying a home service type;
s102, establishing a home service framework according to the equipment service, the home attribute and the first association.
The home service framework in the embodiment of the invention can also be called an intelligent home service framework.
The home attribute Aspect in the embodiment of the invention indicates a home service, which may be a common parameter in an intelligent home scene, such as indoor temperature, indoor air quality, security mode, and the like.
The equipment service in the embodiment of the invention refers to the equipment service provided by specific equipment; for example, an air conditioner provides a heating service acwarming service and an electric heater provides a heating service heaterService.
The Home Service in the embodiment of the invention refers to a general Service, which can be divided into multiple Service types, namely, ServiceType, and can include device services provided by one or more types of devices.
Each service type includes device services provided by the device. For example, taking home appliances as an example, the room heating service roomwavemingservice includes a heating service acWarmingService provided by an air conditioner and a heating service heaterService provided by an electric heater.
Each specific equipment service comprises a plurality of service attributes Parameter, and the target value targetValue of each service attribute describes the fixed value of the equipment attribute in the service process. For example, when the air conditioner provides a heating service acWarmingService, the value of the running mode is fixed to warming, i.e., targetValue is warming; when a certain attribute has no fixed value in the service process, the attribute can be set as default; for query class services, targetValue null.
According to the embodiment of the invention, the home service framework is established through the equipment service, the home attributes and the association, so that when a user needs to call a certain intelligent home service in the calling process of the home appliance equipment, the target home appliance equipment and the specific functions of the target home appliance equipment can be directly inquired through the home service framework, the calling is completed, and the complexity and uncertainty of equipment calling are effectively reduced.
On the basis of the above embodiment, a modification of the above embodiment is further proposed.
In this embodiment of the present invention, optionally, establishing an association between the obtained device service and a preset home attribute includes:
setting a home service type and home attributes;
configuring one or more device services in the home service type;
and associating the home service type with the home attribute so as to establish a first association between each equipment service and the home attribute.
In this embodiment of the present invention, optionally, establishing a first association between the obtained device service and a preset home attribute includes:
setting a home service type and home attributes;
configuring one or more device services in the home service type;
and associating the home service type with the home attribute so as to establish a first association between each equipment service and the home attribute.
In the embodiment of the present invention, optionally, setting a home service type and a home attribute includes:
setting a service branch and an attribute branch;
setting one or more service types in a service branch;
and setting one or more household attributes in the attribute branch.
In the embodiment of the present invention, optionally, setting the service branch and the attribute branch includes:
setting one or more home service sets according to preset home services;
and setting a service branch and an attribute branch in each home service set. .
According to the embodiment of the invention, the intelligent home service framework can be divided into a plurality of service sets, such as Environment, Security and the like, according to the specific field related to the service.
In the embodiment of the present invention, optionally, associating the home service type with the home attribute includes:
setting a target home attribute in each home service type;
and establishing a third association between the target home attribute and one home attribute in the attribute branch.
In this embodiment of the present invention, optionally, establishing a first association between the obtained device service and a preset home attribute further includes:
service attributes are set for each device service.
The final home service framework is schematically shown in fig. 2.
Example two
An embodiment of the present invention provides a device calling method, and as shown in fig. 3, the method includes:
s201, receiving a service request, wherein the service request carries requirement information of home service;
s202, determining target equipment service in a pre-established home service framework according to the demand information; the home service framework comprises a first association between the device service and a home attribute; the home attribute is used for identifying a home service type;
s203, determining a target equipment model corresponding to the target equipment service according to a second association between the pre-established equipment service and the equipment model; and sending a control instruction corresponding to the target equipment service to the target equipment providing the target equipment service through the target equipment model.
The method in the embodiment of the invention is executed on the server side, such as a cloud platform/server.
The demand information in the embodiment of the invention corresponds to the home service; the home service includes a heating service, a query service, and the like.
The household appliance in the embodiment of the invention can also be called as home equipment and intelligent home equipment, and can also be called as equipment for short.
According to the embodiment of the invention, through the home service framework and the association relationship (the first association and the second association), the target household appliance equipment and the specific functions thereof can be directly inquired according to the service request of the user, so that the calling is completed, the inference analysis efficiency of the cloud platform is effectively improved, confusion caused by certain expression similar functions can be effectively avoided, the decision-making accuracy is improved, and the uncertainty in the equipment calling process is effectively solved; and the calling is completed only through the incidence relation, thereby effectively reducing the complexity of the service logic; meanwhile, target household appliance information and specific function information do not need to be set in the service request, the complexity of equipment calling is further effectively reduced, and the user experience is further improved.
In the embodiment of the present invention, optionally, before determining the target device service in the pre-created home service framework according to the demand information of the home service, the method includes:
establishing a first association between the obtained equipment service and a preset home attribute;
and creating a home service framework according to the equipment service, the home attribute and the first association.
In this embodiment of the present invention, optionally, establishing a first association between the obtained device service and a preset home attribute includes:
setting a home service type and home attributes;
configuring one or more device services in the home service type;
and associating the home service type with the home attribute so as to establish a first association between each equipment service and the home attribute.
In the embodiment of the present invention, optionally, setting a home service type and a home attribute includes:
setting a service branch and an attribute branch;
setting one or more service types in a service branch;
and setting one or more household attributes in the attribute branch.
In the embodiment of the present invention, optionally, setting the service branch and the attribute branch includes:
setting one or more home service sets according to preset home services;
and setting a service branch and an attribute branch in each home service set.
In the embodiment of the present invention, optionally, associating the home service type with the home attribute includes:
setting a target home attribute in each home service type;
and establishing a third association between the target home attribute and one home attribute in the attribute branch.
For example, the created home service framework is as shown in fig. 2:
according to the specific field of Home Service, the intelligent Home Service framework is divided into a plurality of Service sets, such as Environment, Security and the like.
Each Category comprises:
home attribute Aspect: common parameters in a smart home scene, such as indoor temperature, indoor air quality, security mode, etc.
Service branch Service: common services in an intelligent home scene.
The service branch can be further divided into a plurality of service types, such as room heating service roomwaveningservice, air purification service airPurificationService, etc.;
each service type includes specific device services provided by the household appliance, for example, a room heating service roomwaveningservice includes a heating service acwaringservice provided by an air conditioner and a heating service heatersservice provided by an electric heater;
each specific equipment service comprises a plurality of service attributes Parameter, and the target value targetValue of each attribute describes the fixed value of the equipment attribute in the service process. For example, when the air conditioner provides a heating service acWarmingService, the value of the running mode is fixed to warming, i.e., targetValue is warming; when a certain attribute has no fixed value in the service process, the attribute can be set as default; for query class services, targetValue null.
The service type ServiceType establishes association with Aspect of the service role through the targetActiect field.
In the embodiment of the present invention, optionally, determining a target device service in a pre-created home service framework according to the demand information of the home service includes:
determining a corresponding home service type in the home service framework according to the requirement information and the third association;
and when the determined home service type comprises a plurality of equipment services, determining the target equipment service from the plurality of equipment services according to the equipment attribute and/or the equipment state of the equipment corresponding to the target equipment model.
In the embodiment of the present invention, optionally, determining, according to the demand information of the home service and the third association, a corresponding home service type in the home service framework includes:
determining a target home attribute corresponding to the demand information;
determining the home attributes in the attribute branches according to the determined target home attributes and the third association;
and determining a corresponding home service type in the home service framework according to the determined home attribute and the first association.
In this embodiment of the present invention, optionally, establishing a first association between the obtained device service and a preset home attribute further includes:
service attributes are set for each device service.
In this embodiment of the present invention, optionally, sending a control instruction corresponding to the target device service to a target device model providing the target device service, further includes:
the control command carries device attribute information.
In this embodiment of the present invention, optionally, before the second association between the device service and the device model is established in advance, the method includes:
the device object is created from the device model.
For example, after the smart home service framework is constructed, the service attributes in the framework can be associated with the attributes included in the equipment model. The relationship between the smart home service framework, the device model, and the home devices is shown in fig. 4.
An association exists between equipment services (e.g., service 1, service 2, service n) contained in the smart home service framework and equipment models; one equipment model can correspond to a plurality of services in the intelligent home service framework according to the functions of the equipment model;
after the household appliance is accessed to the network, generating an appliance object according to the appliance model; and the equipment object establishes mapping with the service in the intelligent home service framework through the equipment model.
By defining the intelligent home service framework and the incidence relation between the intelligent home service framework and the equipment model, the intelligent home service and the household appliances providing the service can be managed; based on the framework and the association between the framework and the device model, the cloud platform can accurately position specific services required by the user, specific household appliances capable of providing the services, and device attributes related to the services, so as to generate a device control instruction.
EXAMPLE III
The embodiment of the invention provides a device calling method, and particularly describes an intelligent home service framework and a household appliance calling method provided by the embodiment of the invention by inquiring a specific application scene of the current room temperature.
In the embodiment of the invention, the existing air conditioner and refrigerator equipment in a user house are assumed to have room temperature sensing functions, the data precision step of the current temperature currentTemperature attribute of the air conditioner is 0.5 ℃, and the data precision of the environment temperature envTemperature attribute of the refrigerator is 1 ℃; the data precision of the attribute of the water temperature of the water heater, namely the current temperature, is 1 ℃. The current air conditioner is in a standby state; after that, a new intelligent thermometer (not existing in the current intelligent home service framework) is added in the home, and the data precision of the temperature attribute is 0.1 ℃.
Based on the application scenario, the association relationship between the home appliance device and the smart home service framework is shown in fig. 5, and based on fig. 5, a selectable device calling method is provided, as shown in fig. 6, the method includes:
step 1: the cloud platform creates an intelligent home service framework and associates the intelligent home service framework with the household appliance model.
Step 2: the existing air conditioner, refrigerator and electric water heater equipment in a user family sends an online notification to the cloud platform and registers to the cloud platform.
And step 3: and after receiving the on-line notice of the household appliance, the cloud platform creates an appliance object according to the appliance model and associates the appliance object with the intelligent home service framework.
And 4, step 4: the user sends a service request to the cloud platform, and the service request carries the requirement information of the home service: and inquiring the current room temperature.
And 5: after receiving a user instruction, the cloud platform inquires the service type of 'inquiring room temperature getIndorTemperature' of the intelligent home service framework to obtain an air conditioner and a refrigerator which can provide room temperature inquiry service; although the electric water heater can also report the attribute of the current temperature, the intelligent home service framework can determine that the electric water heater reports the room temperature, so that the electric water heater reports the room temperature, and the electric water heater reports the room temperature.
Step 6: the cloud platform carries out equipment optimization according to the equipment attribute or state, the room temperature data accuracy step of the air conditioner and the refrigerator is respectively 0.5 ℃ and 1 ℃, namely the room temperature sensed by the air conditioner is more accurate; on the other hand, the current air conditioner is in a standby state and cannot respond to the query instruction. Thus, the cloud platform determines to query the "ambient temperature" attribute of the refrigerator.
And 7: the cloud platform sends an 'ambient temperature' query instruction to the refrigerator.
And 8: and reporting the ambient temperature data by the refrigerator.
And step 9: and the cloud platform feeds back the room temperature query result to the user.
Step 10: and the newly added intelligent thermometer sends an online notification to the cloud platform and registers the online notification to the cloud platform.
Step 11: and after receiving the on-line notice of the intelligent thermometer, the cloud platform creates an equipment object according to the equipment model.
Step 12: the cloud platform queries and queries the intelligent home service framework, does not find the association relationship with the thermometer equipment model, automatically creates a 'thmGetIndorTemp' thermometer under the getIndorTemperature service type of the intelligent home service framework to acquire temperature service, and associates the thermometer equipment model with the thermometer equipment model.
Step 13: and the user sends a service request to the cloud platform and queries the current room temperature.
Step 14: after receiving a user instruction, the cloud platform inquires an intelligent home service framework to obtain an air conditioner, a refrigerator and a thermometer which can provide room temperature inquiry service; since the temperature attribute of the thermometer is most accurate, the "temperature" attribute of the query thermometer is determined.
Step 15: the cloud platform sends a "temperature" query instruction to the thermometer.
Step 16: and reporting the temperature data by the thermometer.
And step 17: and the cloud platform feeds back the room temperature query result to the user.
The intelligent home service framework provided by the embodiment of the invention can realize the management of intelligent home service and household appliances providing the service; the cloud platform can quickly and accurately determine the target household appliance equipment meeting the user requirements and specific functions based on the framework, automatically generate an equipment control instruction, improve the inference analysis efficiency of the cloud platform, effectively avoid confusion caused by certain expression similar functions, improve the decision-making accuracy and improve the user experience.
Example four
An embodiment of the present invention provides a device for creating a home service framework, as shown in fig. 7, the device includes a memory (1)70 and a processor (1) 72; the memory stores a computer program for creating a home service framework, and the processor executes the computer program to implement the steps of the method according to any one of the embodiments.
When the embodiment of the invention is specifically implemented, reference can be made to the first embodiment or the second embodiment, and a corresponding technical effect is achieved.
EXAMPLE five
An embodiment of the present invention provides a server, as shown in fig. 8, the server includes a memory 80(2) and a processor (2) 82; the memory stores a device calling computer program, and the processor executes the computer program to implement the steps of the method according to any one of the second embodiment.
In the embodiment of the present invention, reference may be made to the second embodiment or the third embodiment, so that a corresponding technical effect is achieved.
EXAMPLE six
An embodiment of the present invention provides a device for creating a home service framework, and as shown in fig. 9, the device for creating a home service framework includes:
the association establishing module 90 is configured to establish a first association between the obtained device service and a preset home attribute, where the home attribute is used to identify a home service type;
and the frame creating module 92 is used for creating a home service frame according to the equipment service, the home attributes and the association.
In the embodiment of the present invention, optionally, the association establishing module 90 is specifically configured to set a home service type and a home attribute;
configuring one or more device services in the home service type;
and associating the home service type with the home attribute so as to establish a first association between each equipment service and the home attribute.
In the embodiment of the present invention, optionally, setting a home service type and a home attribute includes:
setting a service branch and an attribute branch;
setting one or more service types in a service branch;
and setting one or more household attributes in the attribute branch.
In the embodiment of the present invention, optionally, setting the service branch and the attribute branch includes:
setting one or more home service sets according to preset home services;
and setting a service branch and an attribute branch in each home service set.
In the embodiment of the present invention, optionally, associating the home service type with the home attribute includes:
setting a target home attribute in each home service type;
and establishing a third association between the target home attribute and one home attribute in the attribute branch.
In this embodiment of the present invention, optionally, the association establishing module 90 is further configured to set a service attribute for each device service.
The embodiment of the invention corresponds to the first embodiment, and in concrete implementation, reference can be made to the first embodiment, so that the invention has corresponding technical effects.
EXAMPLE seven
An embodiment of the present invention provides a server, as shown in fig. 10, where the server includes:
the service receiving module 1010 is configured to receive a service request, where the service request carries requirement information of a home service;
a service determination module 1012, configured to determine, according to the demand information, a target device service in a pre-created home service framework; the home service framework comprises a first association between the device service and a home attribute; the home attribute is used for identifying a home service type;
a function calling module 1014, configured to determine, according to a second association between a pre-established device service and a device model, a target device model corresponding to the target device service; and sending a control instruction corresponding to the target equipment service to the target equipment providing the target equipment service through the target equipment model.
In the embodiment of the present invention, optionally, the server further includes a frame creation module, configured to establish a first association between the obtained device service and a preset home attribute;
and creating a home service framework according to the equipment service, the home attribute and the first association.
In this embodiment of the present invention, optionally, establishing a first association between the obtained device service and a preset home attribute includes:
setting a home service type and home attributes;
configuring one or more device services in the home service type;
and associating the home service type with the home attribute so as to establish a first association between each equipment service and the home attribute.
In the embodiment of the present invention, optionally, setting a home service type and a home attribute includes:
setting a service branch and an attribute branch;
setting one or more service types in a service branch;
and setting one or more household attributes in the attribute branch.
In the embodiment of the present invention, optionally, setting the service branch and the attribute branch includes:
setting one or more home service sets according to preset home services;
and setting a service branch and an attribute branch in each home service set.
In the embodiment of the present invention, optionally, associating the home service type with the home attribute includes:
setting a target home attribute in each home service type;
and establishing a third association between the target home attribute and one home attribute in the attribute branch.
In this embodiment of the present invention, optionally, the service determining module 1012 is specifically configured to determine, according to the requirement information and the third association, a corresponding home service type in the home service framework;
and when the determined home service type comprises a plurality of equipment services, determining the target equipment service from the plurality of equipment services according to the equipment attribute and/or the equipment state of the equipment corresponding to the target equipment model.
In the embodiment of the present invention, optionally, determining, according to the demand information of the home service and the third association, a corresponding home service type in the home service framework includes:
determining a target home attribute corresponding to the demand information;
determining the home attributes in the attribute branches according to the determined target home attributes and the third association;
and determining a corresponding home service type in the home service framework according to the determined home attribute and the first association.
In this embodiment of the present invention, optionally, establishing a first association between the obtained device service and a preset home attribute further includes:
service attributes are set for each device service.
In this embodiment of the present invention, optionally, sending a control instruction corresponding to the target device service to a target device model providing the target device service, further includes:
the control command carries device attribute information.
In this embodiment of the present invention, optionally, before the second association between the device service and the device model is established in advance, the method includes:
a device object is created according to the device model.
The embodiment of the invention corresponds to the second embodiment, and in concrete implementation, reference can be made to the second embodiment, so that the invention has corresponding technical effects.
Example eight
The embodiment of the invention provides a computer-readable storage medium, which stores a creation computer program and/or a device call computer program of a home service framework;
the creation computer program of the home service framework, when executed by at least one processor, is configured to implement the steps of the method as in any one of the embodiments.
When the device calls the computer program to be executed by at least one processor, to implement the steps of the method as in any of the second embodiments.
Computer-readable storage media in embodiments of the invention may be RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art. A storage medium may be coupled to the processor such that the processor can read information from, and write information to, the storage medium; or the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.