WO2018014553A1 - 智能家居***的搭建方法、装置、智能家居***及终端 - Google Patents

智能家居***的搭建方法、装置、智能家居***及终端 Download PDF

Info

Publication number
WO2018014553A1
WO2018014553A1 PCT/CN2017/074369 CN2017074369W WO2018014553A1 WO 2018014553 A1 WO2018014553 A1 WO 2018014553A1 CN 2017074369 W CN2017074369 W CN 2017074369W WO 2018014553 A1 WO2018014553 A1 WO 2018014553A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
information
sub
configuration file
smart home
Prior art date
Application number
PCT/CN2017/074369
Other languages
English (en)
French (fr)
Inventor
梁智将
彭敏
郭明娟
黄卫基
李昌伟
魏辉
罗宏波
Original Assignee
珠海格力电器股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 珠海格力电器股份有限公司 filed Critical 珠海格力电器股份有限公司
Publication of WO2018014553A1 publication Critical patent/WO2018014553A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/283Processing of data at an internetworking point of a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/283Processing of data at an internetworking point of a home automation network
    • H04L12/2836Protocol conversion between an external network and a home network

Definitions

  • the invention belongs to the field of smart home technology, and particularly relates to a method, a device, a smart home system and a terminal for building a smart home system, in particular to a mobile home frame building method and device based on a smart home system, and a smart home having the same The system, and the mobile terminal having the smart home system.
  • Smart home can be based on residential, using integrated wiring technology, network communication technology, security technology, automatic control technology, audio and video technology to integrate home life related facilities, and build efficient residential facilities and family schedule management
  • the system enhances home safety, convenience, comfort, and artistry, and achieves an environmentally friendly and energy-saving living environment.
  • the demand for smart home market is very large, but at the same time, the market is also very chaotic, and there are many smart items.
  • the object of the present invention is to provide a method, a device, a smart home system and a terminal for building a smart home system in order to solve the problem that the prior art cannot respond quickly and achieve the effect of improving the response speed.
  • the invention provides a method for constructing a smart home system, comprising: configuring a device information of a device in the smart home system to obtain a configuration file corresponding to the device; and responding to the configured processing The device triggers the device to parse the configuration file corresponding to the device to implement dynamic loading of the device.
  • configuring the device information of the device in the smart home system including: classifying devices in the smart home system according to a preset device type; and obtaining a classification result according to the classification, Uncertain information other than general information in the device information of each type of equipment Decoupling the undetermined information obtained by the extraction; and determining, in the information that the coupling degree is greater than the preset value, the information to be configured of the device; Information, configured in the form of database tables and / or xml.
  • the configuration file includes: at least one of a device corresponding page path and a device corresponding entity class; and correspondingly, parsing the configuration file of the device to be loaded in the smart home system, including: acquiring The device corresponding to the page path of the device in the configuration file; the device corresponding entity class in the corresponding page path of the device is loaded during the running of the dynamic running mechanism by using a preset dynamic running mechanism.
  • obtaining the device corresponding page path of the device in the configuration file including: querying the configuration file according to the device type of the device in the configuration file; acquiring the device according to the query result obtained by the query The corresponding device corresponds to a page path.
  • extracting the uncertain information other than the general information in the device information of each type of device including: abstracting any sub-information of the uncertain information other than the general information in the device information of each type of device a device object; performing device identification on the device object; setting a device corresponding page path for accessing the device object; and setting a device corresponding entity class for loading the device object by using the device corresponding page path;
  • the device login method for querying the corresponding entity class of the device; correspondingly, the configuration file further includes: at least one of a device object, a device identifier, and a device login method.
  • the device type includes: determining a type according to a preset function of the device in the smart home system, and/or a preset applicable population; and/or the general information, including: In each type of equipment, the business logic whose complexity is not higher than the preset complexity, and/or the degree of uncertainty is not higher than the preset uncertainty; correspondingly, the uncertain information includes: in each type of equipment The business logic having a higher complexity than the preset complexity, and/or the factor of the uncertainty is higher than the predetermined uncertainty; and/or the information to be configured includes: At least one of type, function, protocol, UI, and territory.
  • the method further includes: performing the specific processing on the function, obtaining at least one sub-function, and modifying the sub-function to the device; wherein the sub-function includes: a control process capable of being separately operated And/or device interfaces that can be run separately.
  • the method further includes: after performing the specific processing on the function, performing registration processing on the sub-function in the device corresponding entity class, and/or changing the UI corresponding to the sub-function At And/or, modularizing the UI corresponding to the sub-function and/or the sub-function.
  • the method further includes: after the function is specified, the UI corresponding to the sub-function and/or the sub-function is not changed, and the flag bit and the protocol configuration of the device corresponding to the sub-function are added. At least one, and/or, a specific protocol for populating the sub-function corresponding device.
  • the method further includes: modifying, by using the flag bit, the specific protocol.
  • the method further includes: when the device is to be added in the smart home system, modifying the configuration file according to the device information of the device to be added, to add the device to be added to the smart home system .
  • a device for constructing a smart home system includes: a configuration processing unit configured to perform device configuration processing on device information of the device in the smart home system, a configuration file corresponding to the device, and a dynamic loading unit, configured to parse the configuration file corresponding to the device in response to the triggering request of the device that is configured to perform dynamic loading on the device.
  • the configuration processing unit includes: a classification module, configured to classify devices in the smart home system according to a preset device type; and a extraction module, configured to perform classification results according to the classification, Uncertain information other than the general information in the device information of each type of device is extracted; the determining module is configured to perform decoupling processing on the extracted uncertain information; and the uncertain information is included The part of the coupling is greater than the preset value, and is determined to be the information to be configured of the device.
  • the configuration module is configured to configure the to-be-configured information in the form of a database table and/or an xml.
  • the configuration file includes: at least one of a device corresponding page path and a device corresponding entity class; and correspondingly, the dynamic loading unit includes: a path obtaining module, configured to acquire the device of the device in the configuration file Corresponding page path; the entity class loading module is configured to load, by using a preset dynamic running mechanism, the device corresponding entity class in the corresponding page path of the device during the running of the dynamic running mechanism.
  • the path obtaining module includes: a query sub-module, configured to query the configuration file according to the device type of the device in the configuration file; and obtain a sub-module, configured to obtain a query according to the query result obtained by the query
  • the device corresponding to the device corresponds to a page path.
  • the extraction module includes: an object abstraction sub-module, configured to device information of each type of device Any sub-information other than the general information is abstracted into a device object; an identifier setting sub-module for performing device identification on the device object; and a path setting sub-module configured to be configured to access the a device corresponding to the device path of the device object; the entity class setting submodule, configured to set a device corresponding entity class for loading the device object by using the device corresponding page path; and a method setting submodule, configured to be configured to query the The device corresponding to the device login method of the entity class; correspondingly, the configuration file further includes: at least one of a device object, a device identifier, and a device login method.
  • the device type includes: determining a type according to a preset function of the device in the smart home system, and/or a preset applicable population; and/or the general information, including: In each type of equipment, the business logic whose complexity is not higher than the preset complexity, and/or the degree of uncertainty is not higher than the preset uncertainty; correspondingly, the uncertain information includes: in each type of equipment The business logic having a higher complexity than the preset complexity, and/or the factor of the uncertainty is higher than the predetermined uncertainty; and/or the information to be configured includes: At least one of type, function, protocol, UI, and territory.
  • the method further includes: a function avatar unit, configured to perform the specific processing on the function, obtain at least one sub-function, and make the sub-function customized to the device; wherein the sub-function includes : Control processes that can be run separately, and/or device interfaces that can be run separately.
  • the method further includes: a modular processing unit, configured to perform the registration processing on the sub-function in the corresponding entity class of the device, and/or the sub-function
  • the corresponding UI performs a change process, and/or modularizes the sub-function and/or the UI corresponding to the sub-function.
  • the method further includes: a protocol compatibility unit, configured to: after the function is specified, the UI corresponding to the sub-function and/or the sub-function is not changed, and the device corresponding to the sub-function is added. At least one of a flag bit, a protocol configuration, and/or a specific protocol for populating the sub-function corresponding device.
  • a protocol compatibility unit configured to: after the function is specified, the UI corresponding to the sub-function and/or the sub-function is not changed, and the device corresponding to the sub-function is added. At least one of a flag bit, a protocol configuration, and/or a specific protocol for populating the sub-function corresponding device.
  • the method further includes: the protocol compatibility unit, configured to, by using the flag bit, modify the specific protocol.
  • the device further includes: a device adding unit, when the device is to be added in the smart home system, modifying the configuration file according to the device information of the device to be added, to increase the device to be added To the smart home system.
  • a device adding unit when the device is to be added in the smart home system, modifying the configuration file according to the device information of the device to be added, to increase the device to be added To the smart home system.
  • another aspect of the present invention provides a smart home system, comprising: the above-mentioned smart home system building device.
  • a further aspect of the present invention provides a terminal, comprising: the smart home system described above.
  • the solution of the present invention realizes dynamic loading by parsing the configuration file during operation, and can solve the problem that the system cannot meet the requirements of many models quickly.
  • the solution of the present invention can be compatible with all the single items by continuously improving the function library and function protocol of the smart home, solving the problem of difficulty in team cooperation development, and solving the problem of rapid expansion of the APP size.
  • the solution of the present invention reduces the complexity of the code to a certain extent by configurable uncertain factors, and makes the cooperation development easier, and more developers can focus on the specific implementation of the function;
  • the APP can dynamically load the required functions in a configured way to make the APP more powerful.
  • the solution of the present invention solves the prior art by configuring complex business logic or uncertain factors between devices in the smart home and realizing dynamic loading of the corresponding device by parsing the configuration file at runtime.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for constructing a smart home system according to the present invention
  • FIG. 2 is a schematic flow chart of an embodiment of a configuration process in the method of the present invention.
  • FIG. 3 is a schematic flowchart of an embodiment of an entity class loading process in the method of the present invention.
  • FIG. 4 is a schematic flowchart of an embodiment of a path obtaining process in the method of the present invention.
  • FIG. 5 is a schematic flow chart of an embodiment of a pumping process in the method of the present invention.
  • FIG. 6 is a schematic structural view of an embodiment of a building device of a smart home system according to the present invention.
  • FIG. 7 is a schematic structural view of an embodiment of a pumping module in the device of the present invention.
  • FIG. 8 is a schematic structural diagram of an embodiment of a path obtaining module in the device of the present invention.
  • FIG. 9 is a schematic structural view of an embodiment of a smart home system according to the present invention.
  • FIG. 10 is a schematic structural view of another embodiment of a smart home system according to the present invention.
  • 102-configuration processing unit 1022-classification module; 1024-extraction module; 1026-determination module; 1028-configuration module; 104-dynamic loading unit; 1042-path acquisition module; 1044-entity class loading module; 106-device Add unit; 108-function concrete unit; 110-modular processing unit; 112- protocol compatible unit.
  • FIG. 1 is a schematic flowchart of an embodiment of the method of the present invention.
  • the method for constructing the smart home system may include:
  • the device information of the device in the smart home system is configured to obtain a configuration file corresponding to the device.
  • the configuration and processing of the device information can improve the convenience and reliability of the dynamic loading, and the user experience is good.
  • a schematic diagram further illustrates a specific process of configuring the device information of the device in the smart home system in step S110.
  • Step S210 classify devices in the smart home system according to a preset device type.
  • the device type may include: determining a type according to a preset function of the device in the smart home system, and/or a preset applicable population.
  • determining a type according to a preset function of the device in the smart home system and/or a preset applicable population.
  • Step S220 According to the classification result obtained by the classification, the uncertain information other than the general information in the device information of each type of device is extracted.
  • the extraction may be performed by determining the general information of the device (for example, the device information corresponding to the general function of the device) in the device information of the device of the same type, in addition to the device information of the device.
  • Other information than the general information ie, uncertain information is extracted.
  • the general information may include: a service logic in each type of device whose complexity is not higher than a preset complexity, and/or a factor whose degree of uncertainty is not higher than a preset uncertainty.
  • the uncertain information may include: in each type of device, the business logic having a complexity higher than the preset complexity, and/or the degree of uncertainty is higher than the preset uncertainty the elements of.
  • step S220 a schematic flowchart of an embodiment of the extraction process in the method of the present invention shown in FIG. 5 may be further described, and further, in step S220, the uncertain information other than the general information in the device information of each type of device is extracted. The specific process of departure.
  • Step S510 abstracting any sub-information other than the general information in the device information of each type of device into one device object.
  • the specific xml configuration format can be as follows:
  • Step S520 performing device identification on the device object.
  • the specific xml configuration format can be as follows:
  • Step S530 setting a device corresponding page path for accessing the device object.
  • the specific xml configuration format can be as follows:
  • Step S540 Set a device corresponding entity class for loading the device object by using the device corresponding page path.
  • the specific xml configuration format can be as follows:
  • Step S550 setting a device login method for querying the corresponding entity class of the device.
  • the configuration file may further include at least one of a device object, a device identifier, and a device login method.
  • Step S230 Decoupling the undetermined information obtained by the extraction, and determining a portion of the uncertainty information that is greater than a preset value to be the information to be configured of the device.
  • the coupling also called the degree of coupling
  • the degree of coupling may be a measure of the degree of association between modules (eg, sub-information in the uncertainty information).
  • the decoupling property that is, the association between the module (for example, the sub-information in the uncertainty information), turns the module into a single sub-module (for example, turning the uncertainty information into multiple sub-information), Each sub-module that becomes becomes independent of the other sub-modules in the module.
  • the modification of the sub-information does not affect other sub-information other than the sub-information in the uncertain information.
  • the operation is beneficial to improve the reliability of the operation of the uncertain information; on the other hand, only modifying the sub-information can implement the modification of the uncertain information, which is beneficial to improving the efficiency of the modification.
  • complex business logic or uncertain factors can be configured.
  • a configuration file is configured in the form of xml (ie, an extensible markup language, a markup language used to mark electronic files to have a structure).
  • complex logic can be extracted and decoupled. If it is impossible to decouple, it is something that needs to be written to the configuration file.
  • the to-be-configured information may include at least one of a model, a function, a protocol, a UI, and a region.
  • the APP needs to be configured, including: model uncertainty, functional uncertainty, and protocol uncertainty.
  • UI uncertainty for example: which cloud is not suitable for which type of population
  • geographical uncertainty for example: uncertain Whether the server is compatible with the region
  • the flexibility and versatility of the configuration process can be further improved, thereby improving the user experience.
  • Step S240 configuring the to-be-configured information in the form of a database table and/or an xml.
  • the complex business logic relationship and undetermined factors are stored in the form of database tables or xml, and these complex logical relationships are not reflected in the code.
  • the configuration scheme can be explained by model uncertainty.
  • the configuration file corresponding to the device is parsed to implement dynamic loading of the device.
  • the APP dynamically invokes the configuration file during the running of the program through the reflection mechanism, and accesses the corresponding page path of the device through the configuration file.
  • the configuration file is parsed to implement dynamic loading, which can improve the response speed of the loading, thereby greatly improving the convenience of the user.
  • the configuration file may include: at least one of a device corresponding page path and a device corresponding entity class.
  • the device corresponding page path and device corresponding entity class corresponding to the device type are stored in a configuration file.
  • the convenience and reliability of the analysis can be improved, thereby improving the convenience of the user.
  • step S120 a specific process of parsing the configuration file corresponding to the device in step S120 may be further described in conjunction with the flowchart of an embodiment of the entity class loading process in the method of the present invention shown in FIG.
  • Step S310 obtaining a device corresponding page path of the device in the configuration file.
  • the corresponding device information is read, and the page path corresponding to the device is obtained.
  • step S310 the specific process of obtaining the device corresponding page path of the device in the configuration file in step S310 may be further described in conjunction with the flowchart of an embodiment of the path obtaining process in the method of the present invention shown in FIG.
  • Step S410 Query the configuration file according to the device type of the device in the configuration file.
  • the configuration file is queried according to the type of the device.
  • step S420 the device corresponding page path corresponding to the device is obtained according to the query result obtained by the query.
  • the dynamic loading of the device is implemented by querying the configuration file, and the loading efficiency is high and the accuracy is good.
  • step S320 the device corresponding entity class in the path corresponding to the page of the device is loaded in the running process of the dynamic running mechanism by using a preset dynamic running mechanism.
  • the page entity class under the corresponding path is loaded during the running process, without having to write complex logic in the code to implement.
  • the dynamic loading of the corresponding entity class of the device is implemented by acquiring the path corresponding to the page of the device, and the loading mode is simple and the reliability is high.
  • the method may further include: performing specific processing on the function to obtain At least one sub-function and having the sub-function customized to the device.
  • the sub-functions may include: a control process that can be run separately, and/or a device interface that can be run separately.
  • the function is embodied, independent of the entity, each function can be run separately (for example: the operation, which can include device control, interface UI, etc.), and the device only needs to customize the functions that it needs, and does not directly have any Features.
  • the function customization can be realized, thereby satisfying the requirements of many models, the use is convenient, and the user experience is good.
  • the method further includes: after performing the specific processing on the function, performing registration processing on the sub-function in the device corresponding entity class, and/or corresponding to the sub-function
  • the UI performs a change process, and/or modularizes the sub-function and/or the UI corresponding to the sub-function.
  • the device corresponds to the entity class registration function.
  • the corresponding UI User Interface
  • the function and UI are modularized.
  • the device functions can be generalized and the functions can be modularized.
  • the method further includes: after the function is specified, the UI corresponding to the sub-function and/or the sub-function is not changed, and the identifier of the sub-function corresponding device is added. At least one of a bit, a protocol configuration, and/or a specific protocol that populates the device corresponding to the sub-function.
  • the function and UI interface are not changed, the manufacturer device flag is added, the protocol configuration is increased, and the specific protocol is filled, and the APP uses the specific protocol of the flag change.
  • the method further includes: modifying, by using the flag bit, the specific protocol.
  • protocol compatibility can be achieved by adding a protocol conversion tool.
  • the method further includes: when the device is to be added in the smart home system, modifying the configuration file according to the device information of the device to be added, to add the device to be added to The smart home system.
  • the technical solution of the present embodiment is used to configure complex business logic or uncertain factors, and the dynamic configuration is implemented by parsing the configuration file during operation, which can solve the problem that cannot be quickly responded and meets numerous requirements.
  • the problem of model demand is used to configure complex business logic or uncertain factors, and the dynamic configuration is implemented by parsing the configuration file during operation, which can solve the problem that cannot be quickly responded and meets numerous requirements.
  • a building device for a smart home system corresponding to a building method of a smart home system is also provided.
  • the building device of the smart home system may include: a configuration processing unit 102 and a dynamic loading unit 104.
  • the configuration processing unit 102 can be configured to perform configuration processing on the device information of the device in the smart home system to obtain a configuration file corresponding to the device. For the specific functions and processing of the configuration processing unit 102, refer to step S110.
  • the configuration and processing of the device information can improve the convenience and reliability of the dynamic loading, and the user experience is good.
  • the configuration processing unit 102 may include: a classification module 1022, a extraction module 1024, a determination module 1026, and a configuration module 1028.
  • the classification module 1022 can be configured to classify devices in the smart home system according to a preset device type. For the specific functions and processing of the classification module 1022, refer to step S210.
  • the device type may include: determining a type according to a preset function of the device in the smart home system, and/or a preset applicable population.
  • Device class determined based on user needs Type, versatility and humanity.
  • the extraction module 1024 can be configured to extract the uncertainty information of the device information of each type of device except the general information according to the classification result obtained by the classification. For the specific function and processing of the extraction module 1024, refer to step S220.
  • the extraction may be performed by determining the general information of the device (for example, the device information corresponding to the general function of the device) in the device information of the device of the same type, in addition to the device information of the device.
  • Other information than the general information ie, uncertain information is extracted.
  • the general information may include: a service logic in each type of device whose complexity is not higher than a preset complexity, and/or a factor whose degree of uncertainty is not higher than a preset uncertainty.
  • the uncertain information may include: in each type of device, the business logic having a complexity higher than the preset complexity, and/or the degree of uncertainty is higher than the preset uncertainty the elements of.
  • the extraction module 1024 may include: an object abstraction sub-module 1022, an identifier setting sub-module 10244, a path setting sub-module 10246, and an entity class setting sub-module 10248.
  • the object abstraction sub-module 1042 can be used to abstract any sub-information other than the general information in the device information of each type of device into one device object. For the specific function and processing of the object abstraction sub-module 1042, refer to step S510.
  • the specific xml configuration format can be as follows:
  • the identifier setting sub-module 10244 can be used to perform device identification on the device object.
  • the specific function and processing of the identifier setting sub-module 10244 refer to step S520.
  • the specific xml configuration format can be as follows:
  • the path setting sub-module 10246 can be used to set up for accessing the location.
  • the device corresponding to the device object corresponds to the page path.
  • the object abstraction submodule 1042 For the specific function and processing of the object abstraction submodule 1042, refer to step S530.
  • the specific xml configuration format can be as follows:
  • the entity class setting sub-module 10248 can be configured to set a device corresponding entity class for loading the device object by using the device corresponding page path.
  • the specific functions and processing of the entity class setting submodule 10248 refer to step S540.
  • the specific xml configuration format can be as follows:
  • the method setting sub-module 10250 can be used to set a device login method for querying the corresponding entity class of the device.
  • the specific function and processing of the method setting sub-module 10250 refer to step S550.
  • the configuration file may further include at least one of a device object, a device identifier, and a device login method.
  • the determining module 1026 may be configured to perform decoupling processing on the extracted uncertain information, and determine, in the uncertain information, a portion whose coupling degree is greater than a preset value.
  • the information to be configured of the device For the specific function and processing of the determining module 1026, refer to step S230.
  • the coupling also called the degree of coupling
  • the degree of coupling may be a measure of the degree of association between modules (eg, sub-information in the uncertainty information).
  • the decoupling property that is, the association between the module (for example, the sub-information in the uncertainty information), turns the module into a single sub-module (for example, turning the uncertainty information into multiple sub-information), Each sub-module that becomes becomes independent of the other sub-modules in the module.
  • the sub-information The modification does not affect the operation of the sub-information other than the sub-information in the uncertain information, which is beneficial to improving the reliability of the operation of the uncertain information; on the other hand, only modifying the sub-information can be realized.
  • the modification of the uncertain information is beneficial to improve the efficiency of the modification.
  • complex business logic or uncertain factors can be configured.
  • a configuration file is configured in the form of xml (ie, an extensible markup language, a markup language used to mark electronic files to have a structure).
  • complex logic can be extracted and decoupled. If it is impossible to decouple, it is something that needs to be written to the configuration file.
  • the to-be-configured information may include at least one of a model, a function, a protocol, a UI, and a region.
  • the APP needs to be configured, including: model uncertainty, functional uncertainty, and protocol uncertainty.
  • UI uncertainty for example: which cloud is not suitable for which type of population
  • geographical uncertainty for example: uncertain Whether the server is compatible with the region
  • the flexibility and versatility of the configuration process can be further improved, thereby improving the user experience.
  • the configuration module 1028 can be configured to configure the to-be-configured information in the form of a database table and/or an xml. For the specific functions and processing of the configuration module 1028, refer to step S240.
  • the complex business logic relationship and undetermined factors are stored in the form of database tables or xml, and these complex logical relationships are not reflected in the code.
  • the configuration scheme can be explained by model uncertainty.
  • the dynamic loading unit 104 may be configured to parse the configuration file corresponding to the device in response to a trigger request of the device that is configured by the configuration, to implement the device Dynamic loading. For the specific functions and processing of the dynamic loading unit 104, refer to step S120.
  • the APP dynamically invokes the configuration file during the running of the program through the reflection mechanism, and accesses the corresponding page path of the device through the configuration file.
  • the configuration file obtained by the configuration process is parsed to implement dynamic loading, which can improve the response speed of the loading, thereby greatly improving the convenience of the user.
  • the configuration file may include: at least one of a device corresponding page path and a device corresponding entity class.
  • the device corresponding page path and device corresponding entity class corresponding to the device type are stored in a configuration file.
  • the convenience and reliability of the analysis can be improved, thereby improving the convenience of the user.
  • the dynamic loading unit 104 may include a path obtaining module 1042 and an entity class loading module 1044.
  • the path obtaining module 1042 may be configured to obtain a device corresponding page path of the device in the configuration file. For the specific functions and processing of the path obtaining module 1042, refer to step S310.
  • the corresponding device information is read, and the page path corresponding to the device is obtained.
  • the path obtaining module 1042 may include: a query submodule 10422 and an obtaining submodule 10424.
  • the query sub-module 10422 can be configured to query the configuration file according to the device type of the device in the configuration file. For the specific functions and processing of the query sub-module 10422, refer to step S410.
  • the configuration file is queried according to the type of the device.
  • the acquisition sub-module 10424 can be used for queries based on queries. As a result, the device corresponding page path corresponding to the device is obtained. For the specific function and processing of the obtaining submodule 10424, refer to step S420.
  • the dynamic loading of the device is implemented by querying the configuration file, and the loading efficiency is high and the accuracy is good.
  • the entity class loading module 1044 may be configured to load the device corresponding entity class in the corresponding page path of the device during the running of the dynamic running mechanism by using a preset dynamic running mechanism. For the specific functions and processing of the entity class loading module 1044, refer to step S320.
  • the page entity class under the corresponding path is loaded during the running process, without having to write complex logic in the code to implement.
  • the dynamic loading of the corresponding entity class of the device is implemented by acquiring the path corresponding to the page of the device, and the loading mode is simple and the reliability is high.
  • the function avatar unit 108 may also be included.
  • the function avatar unit 108 can be configured to perform the specific processing on the function, obtain at least one sub-function, and make the sub-function customized to the device.
  • the sub-functions may include: a control process that can be run separately, and/or a device interface that can be run separately.
  • the function is embodied, independent of the entity, each function can be run separately (for example: the operation, which can include device control, interface UI, etc.), and the device only needs to customize the functions that it needs, and does not directly have any Features.
  • the function customization can be realized, thereby satisfying the requirements of many models, the use is convenient, and the user experience is good.
  • the modular processing unit 110 may also be included.
  • the modular processing unit 110 may be configured to perform the registration processing on the sub-function in the corresponding entity class of the device after performing the specific processing on the function, and/or The UI corresponding to the sub-function performs a change process, and/or modularizes the sub-function and/or the UI corresponding to the sub-function.
  • the device corresponds to the entity class registration function.
  • the corresponding UI User Interface
  • the function and UI are modularized.
  • the device functions can be generalized and the functions can be modularized.
  • protocol compatibility unit 112 may also be included.
  • the protocol-compatible unit 112 may be configured to: after the function is implemented, the UI corresponding to the sub-function and/or the sub-function is not changed, and the sub-function is added. At least one of a flag bit of the device, a protocol configuration, and/or a specific protocol for populating the device corresponding to the sub-function.
  • the function and UI interface are not changed, the manufacturer device flag is added, the protocol configuration is increased, and the specific protocol is filled, and the APP uses the specific protocol of the flag change.
  • the protocol compatibility unit 112 is further configured to modify the specific protocol by using the flag bit.
  • protocol compatibility can be achieved by adding a protocol conversion tool.
  • the device adding unit 106 may also be included.
  • the device adding unit 106 may be configured to: when the device is to be added in the smart home system, modify the configuration file according to the device information of the device to be added, to add the device to be added. Equipment is added to the smart home system.
  • the library and functional protocols can be compatible with all single items, solve the problem of difficult team development, and solve the problem of rapid expansion of APP size.
  • a smart home system corresponding to a building device of a smart home system.
  • the smart home system may include: the building device of the smart home system described above.
  • the smart home system can configure complex business logic or uncertain factors.
  • the mobile terminal runs through a dynamic loading mechanism, and complex business logic relationships and uncertain factors are determined.
  • the complex logic relationship is not reflected in the code, and the dynamic loading is realized by parsing the configuration file during operation.
  • the smart home system can specifically describe the foregoing configuration process by using the following aspects.
  • the device is classified by the device type, and the corresponding device path corresponding to the device type and the device corresponding entity class are stored in a configuration file.
  • a configuration file can be added to configure device information.
  • the APP uses the reflection mechanism to dynamically invoke the configuration file when the program is running, and access the device through the configuration file. Page path.
  • each function is embodied, independent of the entity, each function can be run separately (for example: the operation, which can include device control, interface UI, etc.), and the device only needs to customize the functions that it needs, and does not directly have any functions.
  • the device corresponds to the entity class registration function.
  • the corresponding UI User Interface
  • the function and UI are modularized.
  • device functionality can be generalized and functionally modularized.
  • the display and command query and delivery of the interface can be implemented for specific functions without Depending on the specific model, the model page gets the function by registration.
  • the idea of MVP three-layer architecture can be adopted, the Model layer is responsible for data acquisition, the View layer is responsible for interface display, the Presenter layer is responsible for control logic implementation, the specific device corresponds to the page path registration function module, and the functional modules required for dynamically assembling and loading devices are Avoid duplication of development.
  • the function and UI interface are not changed, the manufacturer device flag is added, the protocol configuration is increased, and the specific protocol is filled, and the APP uses the specific protocol of the flag change.
  • protocol compatibility can be achieved by adding protocol conversion tools.
  • the protocol layer and the communication layer are encapsulated, the communication layer is responsible for data transmission and acceptance, the protocol layer is responsible for data processing, and the upper layer acquires data through a specific interface to call, and the upper and lower layers are solved. Coupled, the protocol flag is used to call to select a different protocol or protocol version.
  • the smart home system can extract uncertainties or business logic and perform configurable operations.
  • Step 1 Detach and identify where you need to configure.
  • the APP needs to be configured, including: model uncertainty, functional uncertainty, and protocol uncertainty.
  • the places where the APP needs to be configured include: UI uncertainty (for example: which cloud is not suitable for which kind of population), geographical uncertainty (for example: whether the server is uncertain) Compatible with the region) and so on.
  • Step 2 the configuration file, is configured in the form of xml (ie, an extensible markup language, which is a markup language used to mark electronic files to have a structure).
  • xml ie, an extensible markup language, which is a markup language used to mark electronic files to have a structure.
  • coupling also called coupling degree, is a measure of the degree of association between modules.
  • the configuration scheme can be illustrated by model uncertainty.
  • the format can be as follows:
  • each time the device is loaded the configuration file is queried according to the type of the device, the corresponding device information is read, and the page path corresponding to the device is obtained; and the dynamic running mechanism is used to load the corresponding path in the running process.
  • Page entity classes without having to write complex logic in the code to implement.
  • the APP shows the user a specific function, but it is because of the uncertainty that the APP is playable. Therefore, in order to make the APP more user-friendly and perfect, the uncertain factors can be configured, which reduces the complexity of the code to a certain extent, and makes the cooperation development easier. More developers can focus on the function.
  • the specific implementation, and APP can dynamically load the required functions through configuration, making the APP more powerful.
  • the overall concept of the smart home system is not difficult to understand, in order to realize the intelligentization of the home device, and the current home device system is already perfect, and these devices can be basically classified into multiple categories according to the functions. For example: air conditioning, lighting, security, food, water purification, healthy living, etc. Since the function is known, no matter how the smart items change, as long as the function library and function protocol of the smart home are continuously improved, it can be compatible with all items; and the development and function development of the items do not conflict, and multiple smarts can be developed at the same time. For a single product, you only need to build a system that is stable enough.
  • a terminal corresponding to a smart home system is also provided.
  • the terminal at least includes: the smart home system described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer And Data Communications (AREA)
  • Multimedia (AREA)

Abstract

本发明公开了一种智能家居***的搭建方法、装置、智能家居***及终端,该方法包括:对所述智能家居***中设备的设备信息进行配置化处理,得到与所述设备对应的配置文件;响应对经所述配置化处理的所述设备的触发请求,对该设备对应的所述配置文件进行解析,实现对所述设备的动态加载。本发明的方案,可以克服现有技术中响应速度慢、稳定性弱和可伸缩性差的缺陷,实现响应速度快、稳定性强和可伸缩性好的有益效果。

Description

智能家居***的搭建方法、装置、智能家居***及终端 技术领域
本发明属于智能家居技术领域,具体涉及一种智能家居***的搭建方法、装置、智能家居***及终端,尤其涉及一种基于智能家居***的移动端框架搭建方法、装置、具有该装置的智能家居***、以及具有该智能家居***的移动端。
背景技术
智能家居,可以是以住宅为平台,利用综合布线技术、网络通信技术、安全防范技术、自动控制技术、音视频技术,将家居生活有关的设施集成,构建高效的住宅设施与家庭日程事务的管理***,提升家居安全性、便利性、舒适性、艺术性,并实现环保节能的居住环境。目前智能家居市场需求很大,但是同时市场也很混乱,智能单品很多。
作为移动端APP,在机型配置化方面,若需要兼容尽可能多的设备、而且需要响应快速的迭代开发,就需要一个能够支持快速开发迭代、可伸缩性强、稳定性强的移动端框架。
现有技术中,存在响应速度慢、稳定性弱和可伸缩性差等缺陷。
发明内容
本发明的目的在于,针对上述缺陷,提供一种智能家居***的搭建方法、装置、智能家居***及终端,以解决现有技术中无法快速响应的问题,达到提升响应速度的效果。
本发明提供一种智能家居***的搭建方法,包括:对所述智能家居***中设备的设备信息进行配置化处理,得到与所述设备对应的配置文件;响应对经所述配置化处理的所述设备的触发请求,对该设备对应的所述配置文件进行解析,实现对所述设备的动态加载。
可选地,对所述智能家居***中设备的设备信息进行配置化处理,包括:根据预设的设备类型,对所述智能家居***中的设备进行分类;根据所述分类得到的分类结果,将每类设备的设备信息中除通用信息之外的不确定信息进行抽 离;将抽离得到的所述不确定信息进行解耦合性处理;并将所述不确定信息中耦合程度大于预设值的部分,确定为所述设备的待配置信息;将所述待配置信息,通过数据库表和/或xml的形式进行配置。
可选地,所述配置文件,包括:设备对应页面路径和设备对应实体类的至少之一;相应地,对所述智能家居***中待加载设备的所述配置文件进行解析,包括:获取所述配置文件中该设备的设备对应页面路径;通过预设的动态运行机制,在所述动态运行机制的运行过程中加载所述设备对应页面路径下的所述设备对应实体类。
可选地,获取所述配置文件中该设备的设备对应页面路径,包括:根据所述配置文件中该设备的设备类型,查询所述配置文件;根据查询得到的查询结果,获取与所述设备对应的所述设备对应页面路径。
可选地,将每类设备的设备信息中除通用信息之外的不确定信息进行抽离,包括:将每类设备的设备信息中除通用信息之外的不确定信息中任一子信息抽象成一个设备对象;对所述设备对象进行设备标识;设置用于访问所述设备对象的设备对应页面路径;设置用于通过所述设备对应页面路径加载所述设备对象的设备对应实体类;设置用于查询所述设备对应实体类的设备登录方法;相应地,所述配置文件,还包括:设备对象、设备标识、设备登录方法的至少之一。
可选地,其中,所述设备类型,包括:根据所述智能家居***中设备的预设功能、和/或预设适用人群,确定得到的类型;和/或,所述通用信息,包括:每类设备中,复杂程度不高于预设复杂程度的业务逻辑、和/或不确定程度不高于预设不确定程度的因素;相应地,所述不确定信息,包括:每类设备中,所述复杂程度高于所述预设复杂程度的业务逻辑、和/或所述不确定程度高于所述预设不确定程度的因素;和/或,所述待配置信息,包括:机型、功能、协议、UI、地域的至少之一。
可选地,还包括:对所述功能进行具体化处理,得到至少一个子功能,并使所述子功能被定制于所述设备;其中,所述子功能,包括:能够单独运行的控制过程、和/或能够单独运行的设备界面。
可选地,还包括:对所述功能进行具体化处理后,在所述设备对应实体类中对所述子功能进行注册处理,和/或,对所述子功能对应的所述UI进行更改处 理,和/或,对所述子功能和/或所述子功能对应的UI进行模块化处理。
可选地,还包括:对所述功能进行具体化处理后,保持所述子功能和/或所述子功能对应的UI不被更改,增加所述子功能对应设备的标志位、协议配置的至少之一,和/或,填充所述子功能对应设备的具体协议。
可选地,还包括:通过所述标志位,对所述具体协议进行更改。
可选地,还包括:当所述智能家居***中有待增加设备时,根据所述待增加设备的设备信息对所述配置文件进行更改,以将所述待增加设备增加至所述智能家居***。
与上述方法相匹配,本发明另一方面提供一种智能家居***的搭建装置,包括:配置化处理单元,用于对所述智能家居***中设备的设备信息进行配置化处理,得到与所述设备对应的配置文件;动态加载单元,用于响应对经所述配置化处理的所述设备的触发请求,对该设备对应的所述配置文件进行解析,实现对所述设备的动态加载。
可选地,配置化处理单元,包括:分类模块,用于根据预设的设备类型,对所述智能家居***中的设备进行分类;抽离模块,用于根据所述分类得到的分类结果,将每类设备的设备信息中除通用信息之外的不确定信息进行抽离;确定模块,用于将抽离得到的所述不确定信息进行解耦合性处理;并将所述不确定信息中耦合程度大于预设值的部分,确定为所述设备的待配置信息;配置模块,用于将所述待配置信息,通过数据库表和/或xml的形式进行配置。
可选地,所述配置文件,包括:设备对应页面路径和设备对应实体类的至少之一;相应地,动态加载单元,包括:路径获取模块,用于获取所述配置文件中该设备的设备对应页面路径;实体类加载模块,用于通过预设的动态运行机制,在所述动态运行机制的运行过程中加载所述设备对应页面路径下的所述设备对应实体类。
可选地,路径获取模块,包括:查询子模块,用于根据所述配置文件中该设备的设备类型,查询所述配置文件;获取子模块,用于根据查询得到的查询结果,获取与所述设备对应的所述设备对应页面路径。
可选地,抽离模块,包括:对象抽象子模块,用于将每类设备的设备信息 中除通用信息之外的不确定信息中任一子信息抽象成一个设备对象;标识设置子模块,用于对所述设备对象进行设备标识;路径设置子模块,用于设置用于访问所述设备对象的设备对应页面路径;实体类设置子模块,用于设置用于通过所述设备对应页面路径加载所述设备对象的设备对应实体类;方法设置子模块,用于设置用于查询所述设备对应实体类的设备登录方法;相应地,所述配置文件,还包括:设备对象、设备标识、设备登录方法的至少之一。
可选地,其中,所述设备类型,包括:根据所述智能家居***中设备的预设功能、和/或预设适用人群,确定得到的类型;和/或,所述通用信息,包括:每类设备中,复杂程度不高于预设复杂程度的业务逻辑、和/或不确定程度不高于预设不确定程度的因素;相应地,所述不确定信息,包括:每类设备中,所述复杂程度高于所述预设复杂程度的业务逻辑、和/或所述不确定程度高于所述预设不确定程度的因素;和/或,所述待配置信息,包括:机型、功能、协议、UI、地域的至少之一。
可选地,还包括:功能具体化单元,用于对所述功能进行具体化处理,得到至少一个子功能,并使所述子功能被定制于所述设备;其中,所述子功能,包括:能够单独运行的控制过程、和/或能够单独运行的设备界面。
可选地,还包括:模块化处理单元,用于对所述功能进行具体化处理后,在所述设备对应实体类中对所述子功能进行注册处理,和/或,对所述子功能对应的所述UI进行更改处理,和/或,对所述子功能和/或所述子功能对应的UI进行模块化处理。
可选地,还包括:协议兼容单元,用于对所述功能进行具体化处理后,保持所述子功能和/或所述子功能对应的UI不被更改,增加所述子功能对应设备的标志位、协议配置的至少之一,和/或,填充所述子功能对应设备的具体协议。
可选地,还包括:所述协议兼容单元,还用于通过所述标志位,对所述具体协议进行更改。
可选地,还包括:设备增加单元,用于当所述智能家居***中有待增加设备时,根据所述待增加设备的设备信息对所述配置文件进行更改,以将所述待增加设备增加至所述智能家居***。
与上述装置相匹配,本发明再一方面提供一种智能家居***,包括:以上所述的智能家居***的搭建装置。
与上述***相匹配,本发明又一方面提供一种终端,包括:以上所述的智能家居***。
本发明的方案,通过将复杂的业务逻辑或者不确定的因素进行配置化,运行的时候通过解析配置文件实现动态的加载,可以解决无法快速响应并满足众多的机型需求的问题。
进一步,本发明的方案,通过不断完善智能家居的功能库和功能协议,就可以兼容所有单品,解决团队合作开发困难的问题,解决APP大小急速膨胀的问题。
进一步,本发明的方案,通过搭建足够稳定的***,可以同时开发多个智能单品,使得单品的开发和功能开发不冲突,可以进一步提升智能家居***的响应速度和可伸缩性。
进一步,本发明的方案,通过将不确定的因素可配置化,在一定程度上降低了代码的复杂性,并且让合作开发变得更简单,更多的开发人员可以专注于功能的具体实现;而APP可以通过配置的方式动态去加载需要的功能,让APP更强大。
由此,本发明的方案,通过将智能家居中各设备间的复杂的业务逻辑或者不确定的因素进行配置化,并在运行时通过解析配置文件实现相应设备的动态加载,解决现有技术中无法快速响应的问题,从而,克服现有技术中响应速度慢、稳定性弱和可伸缩性差的缺陷,实现响应速度快、稳定性强和可伸缩性好的有益效果。
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。
下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。
附图说明
图1为本发明的智能家居***的搭建方法的一实施例的流程示意图;
图2为本发明的方法中配置化处理的一实施例的流程示意图;
图3为本发明的方法中实体类加载处理的一实施例的流程示意图;
图4为本发明的方法中路径获取处理的一实施例的流程示意图;
图5为本发明的方法中抽离处理的一实施例的流程示意图;
图6为本发明的智能家居***的搭建装置的一实施例的结构示意图;
图7为本发明的装置中抽离模块的一实施例的结构示意图;
图8为本发明的装置中路径获取模块的一实施例的结构示意图;
图9为本发明的智能家居***的一实施例的结构示意图;
图10为本发明的智能家居***的另一实施例的结构示意图。
结合附图,本发明实施例中附图标记如下:
102-配置化处理单元;1022-分类模块;1024-抽离模块;1026-确定模块;1028-配置模块;104-动态加载单元;1042-路径获取模块;1044-实体类加载模块;106-设备增加单元;108-功能具体化单元;110-模块化处理单元;112-协议兼容单元。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明具体实施例及相应的附图对本发明技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
根据本发明的实施例,提供了一种智能家居***的搭建方法,如图1所示本发明的方法的一实施例的流程示意图。该智能家居***的搭建方法可以包括:
在步骤S110处,对所述智能家居***中设备的设备信息进行配置化处理,得到与所述设备对应的配置文件。
例如:可以增加配置文件,用来配置设备信息。
由此,通过对设备信息的配置化处理,可以提升动态加载的便捷性和可靠性,用户体验好。
可选地,可以结合图2所示本发明的方法中配置化处理的一实施例的流程 示意图,进一步说明步骤S110中对所述智能家居***中设备的设备信息进行配置化处理的具体过程。
步骤S210,根据预设的设备类型,对所述智能家居***中的设备进行分类。
例如:首先通过设备类型对设备进行分类。
可选地,所述设备类型,可以包括:根据所述智能家居***中设备的预设功能、和/或预设适用人群,确定得到的类型。通过基于用户需求确定的设备类型,通用性强,人性化好。
步骤S220,根据所述分类得到的分类结果,将每类设备的设备信息中除通用信息之外的不确定信息进行抽离。
其中,抽离,可以是将同一类设备的设备信息中,确定该类设备的通用信息(例如:该类设备的通用功能对应的设备信息)后,将该类设备的设备信息中除了所述通用信息之外的其它信息(即不确定信息)进行提取。
例如:抽离并确定需要配置化的地方。
可选地,所述通用信息,可以包括:每类设备中,复杂程度不高于预设复杂程度的业务逻辑、和/或不确定程度不高于预设不确定程度的因素。
相应地,所述不确定信息,可以包括:每类设备中,所述复杂程度高于所述预设复杂程度的业务逻辑、和/或所述不确定程度高于所述预设不确定程度的因素。通过基于预设的复杂程度和不确定程度区分通用信息与不确定信息,有利于提高对设备信息进行配置化处理的精准性和可靠性。
可选地,可以结合图5所示本发明的方法中抽离处理的一实施例的流程示意图,进一步说明步骤S220中将每类设备的设备信息中除通用信息之外的不确定信息进行抽离的具体过程。
步骤S510,将每类设备的设备信息中除通用信息之外的不确定信息中任一子信息抽象成一个设备对象。
例如:具体的xml配置格式,可以如:
<?xml version=”1.0”encoding=”utf-8”>
<DeviceType id=1name=”空调”>
步骤S520,对所述设备对象进行设备标识。
例如:具体的xml配置格式,可以如:
<Mid>ab492s2sdfa123</Mid>(设备唯一标识)
步骤S530,设置用于访问所述设备对象的设备对应页面路径。
例如:具体的xml配置格式,可以如:
<DevicePath>/com/device/activity/DeviceAcActivity.java</DevicePath>(设备对应页面路径)
步骤S540,设置用于通过所述设备对应页面路径加载所述设备对象的设备对应实体类。
例如:具体的xml配置格式,可以如:
<DeviceEntity>/com/device/activity/DeviceEntity.java</DeviceEntity>(设备对应实体类)
步骤S550,设置用于查询所述设备对应实体类的设备登录方法。
例如:<DeviceLogin>DeviceAcLogin</DeviceLogin>(设备登录方法)
</DeviceType>
相应地,所述配置文件,还可以包括:设备对象、设备标识、设备登录方法的至少之一。
由此,通过对设备信息中不确定信息的抽离,有利于提升配置化处理的便捷性和高效性。
步骤S230,将抽离得到的所述不确定信息进行解耦合性处理;并将所述不确定信息中耦合程度大于预设值的部分,确定为所述设备的待配置信息。
其中,耦合性,也叫耦合度,可以是对模块(例如:所述不确定信息中的子信息)间关联程度的度量。
其中,解耦合性,即解除模块(例如:所述不确定信息中的子信息)间的关联,将模块变成单个的子模块(例如:将所述不确定信息变成多个子信息),使变成的每个子模块能够区别于所述模块中其它子模块而独立存在。这样,对所述不确定信息进行修改时,只要修改对应的子信息即可,一方面,对该子信息的修改不会影响到所述不确定信息中除该子信息之外的其它子信息的运行,有利于提升所述不确定信息运行的可靠性;另一方面,只对该子信息修改即可实现对所述不确定信息的修改,有利于提高修改的高效性。
例如:可以将复杂的业务逻辑或者不确定的因素进行配置化。
例如:配置文件,通过xml(即可扩展标记语言,是一种用于标记电子文件使其具有结构性的标记语言)的形式进行配置。
例如:可以将复杂的逻辑抽离,解耦合性,如果实在无法解耦合的地方就是需要写到配置文件的东西。
可选地,所述待配置信息,可以包括:机型、功能、协议、UI、地域的至少之一。
例如:从功能的角度去考虑APP的实现,APP需要配置化的地方,包括:机型不确定性,功能不确定性,协议不确定性。
例如:从适用人群选择的角度去考虑APP的实现,APP需要配置化的地方包括:UI不确定性(例如:不确定哪种UI适用于哪种人群),地域不确定性(例如:不确定服务器是否兼容该地区)等。
由此,通过多种形式的待配置信息,可以进一步提升配置化处理的灵活性和通用性,进而提升用户的使用体验。
步骤S240,将所述待配置信息,通过数据库表和/或xml的形式进行配置。
例如:将复杂的业务逻辑关系和无法确定的因素通过数据库表或者xml的方式存储,代码里面并不会体现这些复杂的逻辑关系。
例如:可以通过机型不确定性来说明配置化方案。
例如:为了满足各种机型的需求,需要在代码增加各种机型的判断,去识别不同的机型,将这种复杂的逻辑抽离成xml配置文件。
由此,通过对设备的不确定因素机械能数据库表、xml等形式的配置,可以使得不确定因素的调用更加方便、更加精准。
在步骤S120处,响应对经所述配置化处理的所述设备的触发请求,对该设备对应的所述配置文件进行解析,实现对所述设备的动态加载。
例如:运行的时候通过解析配置文件实现动态的加载。
例如:在加载设备信息前,不需要运行库不需要知道执行的方法;只有在用户点击触发的时候,通过路径去获取自己要跳转的机型页面。
例如:APP通过反射机制,在程序运行时动态调用配置文件,并通过配置文件来访问设备对应页面路径。
由此,通过对智能家居***中设备的配置化处理,通过对配置化处理得到 的配置文件进行解析实现动态加载,可以提升加载的响应速度,进而大大提升用户使用的便捷性。
可选地,所述配置文件,可以包括:设备对应页面路径和设备对应实体类的至少之一。
例如:将设备类型对应的设备对应页面路径、设备对应实体类存储在一个配置文件中。
由此,通过对设备对应页面路径和设备对应实体类的配置,可以提升解析的便捷性和可靠性,进而提升用户使用的便捷性。
相应地,可以结合图3所示本发明的方法中实体类加载处理的一实施例的流程示意图,进一步说明步骤S120中对该设备对应的所述配置文件进行解析的具体过程。
步骤S310,获取所述配置文件中该设备的设备对应页面路径。
例如:读取对应的设备信息,获取到设备对应的页面路径。
可选地,可以结合图4所示本发明的方法中路径获取处理的一实施例的流程示意图,进一步说明步骤S310中获取所述配置文件中该设备的设备对应页面路径的具体过程。
步骤S410,根据所述配置文件中该设备的设备类型,查询所述配置文件。
例如:每次加载设备的时候,根据设备的类型,查询配置文件。
步骤S420,根据查询得到的查询结果,获取与所述设备对应的所述设备对应页面路径。
由此,通过查询配置文件的方式实现设备的动态加载,加载效率高,精准性好。
步骤S320,通过预设的动态运行机制,在所述动态运行机制的运行过程中加载所述设备对应页面路径下的所述设备对应实体类。
例如:通过动态运行机制,在运行过程中加载对应路径下的页面实体类,而无需在代码里面写复杂的逻辑去实现。
由此,通过获取设备对应页面路径的方式实现设备对应实体类的动态加载,加载方式简便、且可靠性高。
在一个可选实施方式中,还可以包括:对所述功能进行具体化处理,得到 至少一个子功能,并使所述子功能被定制于所述设备。
其中,所述子功能,可以包括:能够单独运行的控制过程、和/或能够单独运行的设备界面。
例如:将功能具体化,不依赖于实体,每个功能都可以单独运行(例如:该运行,可以包括设备控制、界面UI等),而设备只需要定制自己需要的功能,而不直接具备任何功能。
由此,通过对设备功能的具体化处理,可以实现功能定制,进而满足众多的机型需求,使用方便,用户体验好。
在一个可选实施方式中,还可以包括:对所述功能进行具体化处理后,在所述设备对应实体类中对所述子功能进行注册处理,和/或,对所述子功能对应的所述UI进行更改处理,和/或,对所述子功能和/或所述子功能对应的UI进行模块化处理。
例如:将功能具体化之后,设备对应实体类注册功能。当界面刷新、下发指令时,通知对应的UI(User Interface,用户界面)进行更改,将功能、UI模块化。
例如:可以实现设备功能通用化,并实现功能模块化。
由此,通过对功能的注册处理、模块化处理等方式,可以解决团队合作开发困难的问题,解决APP大小急速膨胀的问题,可靠性高,环保性好。
在一个可选实施方式中,还可以包括:对所述功能进行具体化处理后,保持所述子功能和/或所述子功能对应的UI不被更改,增加所述子功能对应设备的标志位、协议配置的至少之一,和/或,填充所述子功能对应设备的具体协议。
例如:将功能具体化之后,功能和UI界面不改动,增加厂家设备标志位,增加协议配置,并填充具体协议,APP通过标志位改变采用的具体协议。
由此,通过增加标志位和协议配置,可以提升兼容性,进而提升使用便捷性和可靠性。
在一个可选实施方式中,还可以包括:通过所述标志位,对所述具体协议进行更改。
例如:可以通过增加协议转换工具,实现协议兼容。
由此,通过对具体协议的更改,可以提高兼容的便捷性,减小存储容量, 扩大适用范围。
在一个可选实施方式中,还可以包括:当所述智能家居***中有待增加设备时,根据所述待增加设备的设备信息对所述配置文件进行更改,以将所述待增加设备增加至所述智能家居***。
例如:例如:增加设备配置文件,每次添加设备只需要修改配置文件,而不需要去兼容设备,适配设备。
由此,通过修改配置文件的方式实现新设备的增加,增加方式简便,控制可靠性高。
经大量的试验验证,采用本实施例的技术方案,通过将复杂的业务逻辑或者不确定的因素进行配置化,运行的时候通过解析配置文件实现动态的加载,可以解决无法快速响应并满足众多的机型需求的问题。
根据本发明的实施例,还提供了对应于智能家居***的搭建方法的一种智能家居***的搭建装置。参见图6所示本发明的装置的一实施例的结构示意图。该智能家居***的搭建装置可以包括:配置化处理单元102和动态加载单元104。
在一个例子中,配置化处理单元102,可以用于对所述智能家居***中设备的设备信息进行配置化处理,得到与所述设备对应的配置文件。该配置化处理单元102的具体功能及处理参见步骤S110。
例如:可以增加配置文件,用来配置设备信息。
由此,通过对设备信息的配置化处理,可以提升动态加载的便捷性和可靠性,用户体验好。
可选地,配置化处理单元102,可以包括:分类模块1022、抽离模块1024、确定模块1026和配置模块1028。
在一个可选例子中,分类模块1022,可以用于根据预设的设备类型,对所述智能家居***中的设备进行分类。该分类模块1022的具体功能及处理参见步骤S210。
例如:首先通过设备类型对设备进行分类。
可选地,所述设备类型,可以包括:根据所述智能家居***中设备的预设功能、和/或预设适用人群,确定得到的类型。通过基于用户需求确定的设备类 型,通用性强,人性化好。
在一个可选例子中,抽离模块1024,可以用于根据所述分类得到的分类结果,将每类设备的设备信息中除通用信息之外的不确定信息进行抽离。该抽离模块1024的具体功能及处理参见步骤S220。
其中,抽离,可以是将同一类设备的设备信息中,确定该类设备的通用信息(例如:该类设备的通用功能对应的设备信息)后,将该类设备的设备信息中除了所述通用信息之外的其它信息(即不确定信息)进行提取。
例如:抽离并确定需要配置化的地方。
可选地,所述通用信息,可以包括:每类设备中,复杂程度不高于预设复杂程度的业务逻辑、和/或不确定程度不高于预设不确定程度的因素。
相应地,所述不确定信息,可以包括:每类设备中,所述复杂程度高于所述预设复杂程度的业务逻辑、和/或所述不确定程度高于所述预设不确定程度的因素。通过基于预设的复杂程度和不确定程度区分通用信息与不确定信息,有利于提高对设备信息进行配置化处理的精准性和可靠性。
可选地,可以结合图7所示本发明的装置中抽离模块的一实施例的结构示意图,进一步说明抽离模块1024的具体结构。抽离模块1024,可以包括:对象抽象子模块10242、标识设置子模块10244、路径设置子模块10246和实体类设置子模块10248。
在一个可选具体例子中,对象抽象子模块10242,可以用于将每类设备的设备信息中除通用信息之外的不确定信息中任一子信息抽象成一个设备对象。该对象抽象子模块10242的具体功能及处理参见步骤S510。
例如:具体的xml配置格式,可以如:
<?xml version=”1.0”encoding=”utf-8”>
<DeviceType id=1name=”空调”>
在一个可选具体例子中,标识设置子模块10244,可以用于对所述设备对象进行设备标识。该标识设置子模块10244的具体功能及处理参见步骤S520。
例如:具体的xml配置格式,可以如:
<Mid>ab492s2sdfa123</Mid>(设备唯一标识)
在一个可选具体例子中,路径设置子模块10246,可以用于设置用于访问所 述设备对象的设备对应页面路径。该对象抽象子模块10242的具体功能及处理参见步骤S530。
例如:具体的xml配置格式,可以如:
<DevicePath>/com/device/activity/DeviceAcActivity.java</DevicePath>(设备对应页面路径)
在一个可选具体例子中,实体类设置子模块10248,可以用于设置用于通过所述设备对应页面路径加载所述设备对象的设备对应实体类。该实体类设置子模块10248的具体功能及处理参见步骤S540。
例如:具体的xml配置格式,可以如:
<DeviceEntity>/com/device/activity/DeviceEntity.java</DeviceEntity>(设备对应实体类)
在一个可选具体例子中,方法设置子模块10250,可以用于设置用于查询所述设备对应实体类的设备登录方法。该方法设置子模块10250的具体功能及处理参见步骤S550。
例如:<DeviceLogin>DeviceAcLogin</DeviceLogin>(设备登录方法)
</DeviceType>
相应地,所述配置文件,还可以包括:设备对象、设备标识、设备登录方法的至少之一。
由此,通过对设备信息中不确定信息的抽离,有利于提升配置化处理的便捷性和高效性。
在一个可选例子中,确定模块1026,可以用于将抽离得到的所述不确定信息进行解耦合性处理;并将所述不确定信息中耦合程度大于预设值的部分,确定为所述设备的待配置信息。该确定模块1026的具体功能及处理参见步骤S230。
其中,耦合性,也叫耦合度,可以是对模块(例如:所述不确定信息中的子信息)间关联程度的度量。
其中,解耦合性,即解除模块(例如:所述不确定信息中的子信息)间的关联,将模块变成单个的子模块(例如:将所述不确定信息变成多个子信息),使变成的每个子模块能够区别于所述模块中其它子模块而独立存在。这样,对所述不确定信息进行修改时,只要修改对应的子信息即可,一方面,对该子信息的 修改不会影响到所述不确定信息中除该子信息之外的其它子信息的运行,有利于提升所述不确定信息运行的可靠性;另一方面,只对该子信息修改即可实现对所述不确定信息的修改,有利于提高修改的高效性。
例如:可以将复杂的业务逻辑或者不确定的因素进行配置化。
例如:配置文件,通过xml(即可扩展标记语言,是一种用于标记电子文件使其具有结构性的标记语言)的形式进行配置。
例如:可以将复杂的逻辑抽离,解耦合性,如果实在无法解耦合的地方就是需要写到配置文件的东西。
可选地,所述待配置信息,可以包括:机型、功能、协议、UI、地域的至少之一。
例如:从功能的角度去考虑APP的实现,APP需要配置化的地方,包括:机型不确定性,功能不确定性,协议不确定性。
例如:从适用人群选择的角度去考虑APP的实现,APP需要配置化的地方包括:UI不确定性(例如:不确定哪种UI适用于哪种人群),地域不确定性(例如:不确定服务器是否兼容该地区)等。
由此,通过多种形式的待配置信息,可以进一步提升配置化处理的灵活性和通用性,进而提升用户的使用体验。
在一个可选例子中,配置模块1028,可以用于将所述待配置信息,通过数据库表和/或xml的形式进行配置。该配置模块1028的具体功能及处理参见步骤S240。
例如:将复杂的业务逻辑关系和无法确定的因素通过数据库表或者xml的方式存储,代码里面并不会体现这些复杂的逻辑关系。
例如:可以通过机型不确定性来说明配置化方案。
例如:为了满足各种机型的需求,需要在代码增加各种机型的判断,去识别不同的机型,将这种复杂的逻辑抽离成xml配置文件。
由此,通过对设备的不确定因素机械能数据库表、xml等形式的配置,可以使得不确定因素的调用更加方便、更加精准。
在一个例子中,动态加载单元104,可以用于响应对经所述配置化处理的所述设备的触发请求,对该设备对应的所述配置文件进行解析,实现对所述设备的 动态加载。该动态加载单元104的具体功能及处理参见步骤S120。
例如:运行的时候通过解析配置文件实现动态的加载。
例如:在加载设备信息前,不需要运行库不需要知道执行的方法;只有在用户点击触发的时候,通过路径去获取自己要跳转的机型页面。
例如:APP通过反射机制,在程序运行时动态调用配置文件,并通过配置文件来访问设备对应页面路径。
由此,通过对智能家居***中设备的配置化处理,通过对配置化处理得到的配置文件进行解析实现动态加载,可以提升加载的响应速度,进而大大提升用户使用的便捷性。
可选地,所述配置文件,可以包括:设备对应页面路径和设备对应实体类的至少之一。
例如:将设备类型对应的设备对应页面路径、设备对应实体类存储在一个配置文件中。
由此,通过对设备对应页面路径和设备对应实体类的配置,可以提升解析的便捷性和可靠性,进而提升用户使用的便捷性。
相应地,动态加载单元104,可以包括:路径获取模块1042和实体类加载模块1044。
在一个可选例子中,路径获取模块1042,可以用于获取所述配置文件中该设备的设备对应页面路径。该路径获取模块1042的具体功能及处理参见步骤S310。
例如:读取对应的设备信息,获取到设备对应的页面路径。
可选地,可以结合图8所示本发明的装置中路径获取模块的一实施例的结构示意图,进一步说明路径获取模块1042的具体结构。路径获取模块1042,可以包括:查询子模块10422和获取子模块10424。
在一个可选具体例子中,查询子模块10422,可以用于根据所述配置文件中该设备的设备类型,查询所述配置文件。该查询子模块10422的具体功能及处理参见步骤S410。
例如:每次加载设备的时候,根据设备的类型,查询配置文件。
在一个可选具体例子中,获取子模块10424,可以用于根据查询得到的查询 结果,获取与所述设备对应的所述设备对应页面路径。该获取子模块10424的具体功能及处理参见步骤S420。
由此,通过查询配置文件的方式实现设备的动态加载,加载效率高,精准性好。
在一个可选例子中,实体类加载模块1044,可以用于通过预设的动态运行机制,在所述动态运行机制的运行过程中加载所述设备对应页面路径下的所述设备对应实体类。该实体类加载模块1044的具体功能及处理参见步骤S320。
例如:通过动态运行机制,在运行过程中加载对应路径下的页面实体类,而无需在代码里面写复杂的逻辑去实现。
由此,通过获取设备对应页面路径的方式实现设备对应实体类的动态加载,加载方式简便、且可靠性高。
在一个可选实施方式中,还可以包括:功能具体化单元108。
在一个可选例子中,功能具体化单元108,可以用于对所述功能进行具体化处理,得到至少一个子功能,并使所述子功能被定制于所述设备。
其中,所述子功能,可以包括:能够单独运行的控制过程、和/或能够单独运行的设备界面。
例如:将功能具体化,不依赖于实体,每个功能都可以单独运行(例如:该运行,可以包括设备控制、界面UI等),而设备只需要定制自己需要的功能,而不直接具备任何功能。
由此,通过对设备功能的具体化处理,可以实现功能定制,进而满足众多的机型需求,使用方便,用户体验好。
在一个可选实施方式中,还可以包括:模块化处理单元110。
在一个可选例子中,模块化处理单元110,可以用于对所述功能进行具体化处理后,在所述设备对应实体类中对所述子功能进行注册处理,和/或,对所述子功能对应的所述UI进行更改处理,和/或,对所述子功能和/或所述子功能对应的UI进行模块化处理。
例如:将功能具体化之后,设备对应实体类注册功能。当界面刷新、下发指令时,通知对应的UI(User Interface,用户界面)进行更改,将功能、UI模块化。
例如:可以实现设备功能通用化,并实现功能模块化。
由此,通过对功能的注册处理、模块化处理等方式,可以解决团队合作开发困难的问题,解决APP大小急速膨胀的问题,可靠性高,环保性好。
在一个可选实施方式中,还可以包括:协议兼容单元112。
在一个可选例子中,协议兼容单元112,可以用于对所述功能进行具体化处理后,保持所述子功能和/或所述子功能对应的UI不被更改,增加所述子功能对应设备的标志位、协议配置的至少之一,和/或,填充所述子功能对应设备的具体协议。
例如:将功能具体化之后,功能和UI界面不改动,增加厂家设备标志位,增加协议配置,并填充具体协议,APP通过标志位改变采用的具体协议。
由此,通过增加标志位和协议配置,可以提升兼容性,进而提升使用便捷性和可靠性。
在一个可选实施方式中,所述协议兼容单元112,还可以用于通过所述标志位,对所述具体协议进行更改。
例如:可以通过增加协议转换工具,实现协议兼容。
由此,通过对具体协议的更改,可以提高兼容的便捷性,减小存储容量,扩大适用范围。
在一个可选实施方式中,还可以包括:设备增加单元106。
在一个可选例子中,设备增加单元106,可以用于当所述智能家居***中有待增加设备时,根据所述待增加设备的设备信息对所述配置文件进行更改,以将所述待增加设备增加至所述智能家居***。
例如:例如:增加设备配置文件,每次添加设备只需要修改配置文件,而不需要去兼容设备,适配设备。
由此,通过修改配置文件的方式实现新设备的增加,增加方式简便,控制可靠性高。
由于本实施例的装置所实现的处理及功能基本相应于前述图1至图6所示的方法的实施例、原理和实例,故本实施例的描述中未详尽之处,可以参见前述实施例中的相关说明,在此不做赘述。
经大量的试验验证,采用本发明的技术方案,通过不断完善智能家居的功 能库和功能协议,就可以兼容所有单品,解决团队合作开发困难的问题,解决APP大小急速膨胀的问题。
根据本发明的实施例,还提供了对应于智能家居***的搭建装置的一种智能家居***。该智能家居***可以包括:以上所述的智能家居***的搭建装置。
在一个实施方式中,该智能家居***,可以将复杂的业务逻辑或者不确定的因素进行配置化,目前移动端都是通过动态加载的机制运行的,将复杂的业务逻辑关系和无法确定的因素通过数据库表或者xml的方式存储,代码里面并不会体现这些复杂的逻辑关系,运行的时候通过解析配置文件实现动态的加载。
可选地,该智能家居***,可以通过以下几个方面,对上述配置化的过程进行具体说明。
1、机型映射
首先通过设备类型对设备进行分类,将设备类型对应的设备对应页面路径、设备对应实体类存储在一个配置文件中。在加载设备信息前,不需要运行库不需要知道执行的方法;只有在用户点击触发的时候,通过路径去获取自己要跳转的机型页面。
在一个例子中,可以增加配置文件,用来配置设备信息。
例如:增加设备配置文件,每次添加设备只需要修改配置文件,而不需要去兼容设备,适配设备;APP通过反射机制,在程序运行时动态调用配置文件,并通过配置文件来访问设备对应页面路径。
2、功能定制
将功能具体化,不依赖于实体,每个功能都可以单独运行(例如:该运行,可以包括设备控制、界面UI等),而设备只需要定制自己需要的功能,而不直接具备任何功能。
3、通知响应
将功能具体化之后,设备对应实体类注册功能。当界面刷新、下发指令时,通知对应的UI(User Interface,用户界面)进行更改,将功能、UI模块化。
在一个例子中,可以实现设备功能通用化,并实现功能模块化。
例如:可以针对具体的功能去实现界面的显示和命令查询和下发,而不依 赖于具体的机型,机型页面通过注册的方式获取功能。例如:可以采用MVP三层架构的思想,Model层负责数据获取,View层负责界面显示,Presenter层负责控制逻辑的实现,具体设备对应页面路径注册功能模块,动态组装和加载设备需要的功能模块,避免重复的开发。
4、兼容性(兼容其它厂家设备)
将功能具体化之后,功能和UI界面不改动,增加厂家设备标志位,增加协议配置,并填充具体协议,APP通过标志位改变采用的具体协议。
在一个例子中,可以通过增加协议转换工具,实现协议兼容。
例如:为了兼容各种不同厂家的协议,将协议层和通讯层进行封装,通讯层负责数据的发送和接受,协议层负责数据的处理,上层获取数据通过具体的接口去调用,将上下层解耦和,通过协议标志位去调用选择不同的协议或者协议版本。
在一个可选实施方式中,参见图9和图10所示的例子,该智能家居***,可以将不确定的因素或者业务逻辑抽离,进行可配置化操作。
步骤1、抽离并确定需要配置化的地方。
从功能的角度去考虑APP的实现,APP需要配置化的地方,包括:机型不确定性,功能不确定性,协议不确定性。
从适用人群选择的角度去考虑APP的实现,APP需要配置化的地方包括:UI不确定性(例如:不确定哪种UI适用于哪种人群),地域不确定性(例如:不确定服务器是否兼容该地区)等。
步骤2、配置文件,通过xml(即可扩展标记语言,是一种用于标记电子文件使其具有结构性的标记语言)的形式进行配置。
例如:可以将复杂的逻辑抽离,解耦合性,如果实在无法解耦合的地方就是需要写到配置文件的东西。其中,耦合性,也叫耦合度,是对模块间关联程度的度量。
可选地,可以通过机型不确定性来说明配置化方案。
例如:为了满足各种机型的需求,需要在代码增加各种机型的判断,去识别不同的机型,将这种复杂的逻辑抽离成xml配置文件,格式可以如:
<?xml version=”1.0”encoding=”utf-8”>
<DeviceType id=1name=”空调”>
<Mid>ab492s2sdfa123</Mid>(设备唯一标识)
<DevicePath>/com/device/activity/DeviceAcActivity.java</DevicePath>(设备对应页面路径)
<DeviceEntity>/com/device/activity/DeviceEntity.java</DeviceEntity>(设备对应实体类)
<DeviceLogin>DeviceAcLogin</DeviceLogin>(设备登录方法)
</DeviceType>
在一个例子中,每次加载设备的时候,根据设备的类型,查询配置文件,读取对应的设备信息,获取到设备对应的页面路径;通过动态运行机制,在运行过程中加载对应路径下的页面实体类,而无需在代码里面写复杂的逻辑去实现。
可见,APP展示给用户的是具体的功能,但是正是因为不确定性,让APP具有可玩性。因此,为了让APP更人性化、更完善,将不确定的因素可配置化,在一定程度上降低了代码的复杂性,并且让合作开发变得更简单,更多的开发人员可以专注于功能的具体实现,而APP可以通过配置的方式动态去加载需要的功能,让APP更强大。
由此,从智能家居***的整体概念不难理解,是为了实现家庭设备智能化,而目前家庭设备***已经很完善,这些设备按照功能基本可以分为多类。例如:空气调节、照明、安防、美食、净水热水、健康生活等。既然功能是已知的,不管智能单品如何变化,只要不断完善智能家居的功能库和功能协议,就可以兼容所有单品;而且单品的开发和功能开发不冲突,可以同时开发多个智能单品,只需要搭建足够稳定的***。
由于本实施例的***所实现的处理及功能基本相应于前述图6所示的装置的实施例、原理和实例,故本实施例的描述中未详尽之处,可以参见前述实施例中的相关说明,在此不做赘述。
经大量的试验验证,采用本发明的技术方案,通过搭建足够稳定的***,可以同时开发多个智能单品,使得单品的开发和功能开发不冲突,可以进一步提升智能家居***的响应速度和可伸缩性。
根据本发明的实施例,还提供了对应于智能家居***的一种终端。该终端至少包括:以上所述的所述的智能家居***。
由于本实施例的终端所实现的处理及功能基本相应于前述图9和图10所示的***的实施例、原理和实例,故本实施例的描述中未详尽之处,可以参见前述实施例中的相关说明,在此不做赘述。
经大量的试验验证,采用本发明的技术方案,通过将不确定的因素可配置化,在一定程度上降低了代码的复杂性,并且让合作开发变得更简单,更多的开发人员可以专注于功能的具体实现;而APP可以通过配置的方式动态去加载需要的功能,让APP更强大。
综上,本领域技术人员容易理解的是,在不冲突的前提下,上述各有利方式可以自由地组合、叠加。
以上所述仅为本发明的实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的权利要求范围之内。

Claims (24)

  1. 一种智能家居***的搭建方法,其特征在于,包括:
    对所述智能家居***中设备的设备信息进行配置化处理,得到与所述设备对应的配置文件;
    响应对经所述配置化处理的所述设备的触发请求,对该设备对应的所述配置文件进行解析,实现对所述设备的动态加载。
  2. 根据权利要求1所述的方法,其特征在于,对所述智能家居***中设备的设备信息进行配置化处理,包括:
    根据预设的设备类型,对所述智能家居***中的设备进行分类;
    根据所述分类得到的分类结果,将每类设备的设备信息中除通用信息之外的不确定信息进行抽离;
    将抽离得到的所述不确定信息进行解耦合性处理;并将所述不确定信息中耦合程度大于预设值的部分,确定为所述设备的待配置信息;
    将所述待配置信息,通过数据库表和/或xml的形式进行配置。
  3. 根据权利要求2所述的方法,其特征在于,所述配置文件,包括:设备对应页面路径和设备对应实体类的至少之一;
    相应地,对所述智能家居***中待加载设备的所述配置文件进行解析,包括:
    获取所述配置文件中该设备的设备对应页面路径;
    通过预设的动态运行机制,在所述动态运行机制的运行过程中加载所述设备对应页面路径下的所述设备对应实体类。
  4. 根据权利要求3所述的方法,其特征在于,获取所述配置文件中该设备的设备对应页面路径,包括:
    根据所述配置文件中该设备的设备类型,查询所述配置文件;
    根据查询得到的查询结果,获取与所述设备对应的所述设备对应页面路径。
  5. 根据权利要求3或4所述的方法,其特征在于,将每类设备的设备信息中除通用信息之外的不确定信息进行抽离,包括:
    将每类设备的设备信息中除通用信息之外的不确定信息中任一子信息抽象 成一个设备对象;
    对所述设备对象进行设备标识;
    设置用于访问所述设备对象的设备对应页面路径;
    设置用于通过所述设备对应页面路径加载所述设备对象的设备对应实体类;
    设置用于查询所述设备对应实体类的设备登录方法;
    相应地,所述配置文件,还包括:设备对象、设备标识、设备登录方法的至少之一。
  6. 根据权利要求2-5之一所述的方法,其特征在于,其中,
    所述设备类型,包括:根据所述智能家居***中设备的预设功能、和/或预设适用人群,确定得到的类型;和/或,
    所述通用信息,包括:每类设备中,复杂程度不高于预设复杂程度的业务逻辑、和/或不确定程度不高于预设不确定程度的因素;
    相应地,所述不确定信息,包括:每类设备中,所述复杂程度高于所述预设复杂程度的业务逻辑、和/或所述不确定程度高于所述预设不确定程度的因素;和/或,
    所述待配置信息,包括:机型、功能、协议、UI、地域的至少之一。
  7. 根据权利要求6所述的方法,其特征在于,还包括:
    对所述功能进行具体化处理,得到至少一个子功能,并使所述子功能被定制于所述设备;
    其中,所述子功能,包括:能够单独运行的控制过程、和/或能够单独运行的设备界面。
  8. 根据权利要求7所述的方法,其特征在于,还包括:
    对所述功能进行具体化处理后,在所述设备对应实体类中对所述子功能进行注册处理,和/或,对所述子功能对应的所述UI进行更改处理,和/或,对所述子功能和/或所述子功能对应的UI进行模块化处理。
  9. 根据权利要求7或8所述的方法,其特征在于,还包括:
    对所述功能进行具体化处理后,保持所述子功能和/或所述子功能对应的UI不被更改,增加所述子功能对应设备的标志位、协议配置的至少之一,和/或, 填充所述子功能对应设备的具体协议。
  10. 根据权利要求9所述的方法,其特征在于,还包括:
    通过所述标志位,对所述具体协议进行更改。
  11. 根据权利要求1-10之一所述的方法,其特征在于,还包括:
    当所述智能家居***中有待增加设备时,根据所述待增加设备的设备信息对所述配置文件进行更改,以将所述待增加设备增加至所述智能家居***。
  12. 一种智能家居***的搭建装置,其特征在于,包括:
    配置化处理单元,用于对所述智能家居***中设备的设备信息进行配置化处理,得到与所述设备对应的配置文件;
    动态加载单元,用于响应对经所述配置化处理的所述设备的触发请求,对该设备对应的所述配置文件进行解析,实现对所述设备的动态加载。
  13. 根据权利要求12所述的装置,其特征在于,配置化处理单元,包括:
    分类模块,用于根据预设的设备类型,对所述智能家居***中的设备进行分类;
    抽离模块,用于根据所述分类得到的分类结果,将每类设备的设备信息中除通用信息之外的不确定信息进行抽离;
    确定模块,用于将抽离得到的所述不确定信息进行解耦合性处理;并将所述不确定信息中耦合程度大于预设值的部分,确定为所述设备的待配置信息;
    配置模块,用于将所述待配置信息,通过数据库表和/或xml的形式进行配置。
  14. 根据权利要求13所述的装置,其特征在于,所述配置文件,包括:设备对应页面路径和设备对应实体类的至少之一;
    相应地,动态加载单元,包括:
    路径获取模块,用于获取所述配置文件中该设备的设备对应页面路径;
    实体类加载模块,用于通过预设的动态运行机制,在所述动态运行机制的运行过程中加载所述设备对应页面路径下的所述设备对应实体类。
  15. 根据权利要求14所述的装置,其特征在于,路径获取模块,包括:
    查询子模块,用于根据所述配置文件中该设备的设备类型,查询所述配置文件;
    获取子模块,用于根据查询得到的查询结果,获取与所述设备对应的所述设备对应页面路径。
  16. 根据权利要求14或15所述的装置,其特征在于,抽离模块,包括:
    对象抽象子模块,用于将每类设备的设备信息中除通用信息之外的不确定信息中任一子信息抽象成一个设备对象;
    标识设置子模块,用于对所述设备对象进行设备标识;
    路径设置子模块,用于设置用于访问所述设备对象的设备对应页面路径;
    实体类设置子模块,用于设置用于通过所述设备对应页面路径加载所述设备对象的设备对应实体类;
    方法设置子模块,用于设置用于查询所述设备对应实体类的设备登录方法;
    相应地,所述配置文件,还包括:设备对象、设备标识、设备登录方法的至少之一。
  17. 根据权利要求13-16之一所述的装置,其特征在于,其中,
    所述设备类型,包括:根据所述智能家居***中设备的预设功能、和/或预设适用人群,确定得到的类型;和/或,
    所述通用信息,包括:每类设备中,复杂程度不高于预设复杂程度的业务逻辑、和/或不确定程度不高于预设不确定程度的因素;
    相应地,所述不确定信息,包括:每类设备中,所述复杂程度高于所述预设复杂程度的业务逻辑、和/或所述不确定程度高于所述预设不确定程度的因素;和/或,
    所述待配置信息,包括:机型、功能、协议、UI、地域的至少之一。
  18. 根据权利要求17所述的装置,其特征在于,还包括:
    功能具体化单元,用于对所述功能进行具体化处理,得到至少一个子功能,并使所述子功能被定制于所述设备;
    其中,所述子功能,包括:能够单独运行的控制过程、和/或能够单独运行的设备界面。
  19. 根据权利要求18所述的装置,其特征在于,还包括:
    模块化处理单元,用于对所述功能进行具体化处理后,在所述设备对应实体类中对所述子功能进行注册处理,和/或,对所述子功能对应的所述UI进行更 改处理,和/或,对所述子功能和/或所述子功能对应的UI进行模块化处理。
  20. 根据权利要求18或19所述的装置,其特征在于,还包括:
    协议兼容单元,用于对所述功能进行具体化处理后,保持所述子功能和/或所述子功能对应的UI不被更改,增加所述子功能对应设备的标志位、协议配置的至少之一,和/或,填充所述子功能对应设备的具体协议。
  21. 根据权利要求20所述的装置,其特征在于,还包括:
    所述协议兼容单元,还用于通过所述标志位,对所述具体协议进行更改。
  22. 根据权利要求12-21之一所述的装置,其特征在于,还包括:
    设备增加单元,用于当所述智能家居***中有待增加设备时,根据所述待增加设备的设备信息对所述配置文件进行更改,以将所述待增加设备增加至所述智能家居***。
  23. 一种智能家居***,其特征在于,包括:如权利要求12-22任一所述的智能家居***的搭建装置。
  24. 一种终端,其特征在于,包括:如权利要求23所述的智能家居***。
PCT/CN2017/074369 2016-07-20 2017-02-22 智能家居***的搭建方法、装置、智能家居***及终端 WO2018014553A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610578439.1A CN106161157B (zh) 2016-07-20 2016-07-20 智能家居***的搭建方法、装置、智能家居***及终端
CN201610578439.1 2016-07-20

Publications (1)

Publication Number Publication Date
WO2018014553A1 true WO2018014553A1 (zh) 2018-01-25

Family

ID=58059532

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/074369 WO2018014553A1 (zh) 2016-07-20 2017-02-22 智能家居***的搭建方法、装置、智能家居***及终端

Country Status (2)

Country Link
CN (1) CN106161157B (zh)
WO (1) WO2018014553A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198677A (zh) * 2018-10-30 2020-05-26 阿里巴巴集团控股有限公司 一种设备对象生成方法、装置及设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161157B (zh) * 2016-07-20 2019-01-29 珠海格力电器股份有限公司 智能家居***的搭建方法、装置、智能家居***及终端
CN111580857B (zh) * 2020-04-27 2021-10-19 珠海格力电器股份有限公司 设备固件在线配置方法、装置及***
CN113419775B (zh) * 2021-05-31 2022-11-04 济南浪潮数据技术有限公司 一种固件配置方法、***、设备以及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040054789A1 (en) * 2002-09-12 2004-03-18 International Business Machines Corporation Pervasive home network portal
CN102164360A (zh) * 2011-04-20 2011-08-24 瑞斯康达科技发展股份有限公司 网络设备的配置加载方法及***
CN105116734A (zh) * 2015-06-26 2015-12-02 青岛海信移动通信技术股份有限公司 一种智能家电的控制方法及装置、控制终端
CN105259828A (zh) * 2015-10-15 2016-01-20 珠海格力电器股份有限公司 一种家用电器的集成控制方法、终端及应用程序调控***
CN106161157A (zh) * 2016-07-20 2016-11-23 珠海格力电器股份有限公司 智能家居***的搭建方法、装置、智能家居***及终端

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595717B (zh) * 2013-11-13 2017-02-08 海信集团有限公司 家电控制协议转换方法和控制终端
CN104167088B (zh) * 2014-08-26 2018-12-25 上海青芒智能科技有限公司 家用电器远程控制的方法及***
HK1197633A2 (zh) * 2014-11-11 2015-01-30 Lincogn Technology Co Ltd 種智能家居產品配置方法
CN105739460B (zh) * 2014-12-12 2018-11-09 青岛海尔智能家电科技有限公司 一种自动生成物联家电的控制界面的方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040054789A1 (en) * 2002-09-12 2004-03-18 International Business Machines Corporation Pervasive home network portal
CN102164360A (zh) * 2011-04-20 2011-08-24 瑞斯康达科技发展股份有限公司 网络设备的配置加载方法及***
CN105116734A (zh) * 2015-06-26 2015-12-02 青岛海信移动通信技术股份有限公司 一种智能家电的控制方法及装置、控制终端
CN105259828A (zh) * 2015-10-15 2016-01-20 珠海格力电器股份有限公司 一种家用电器的集成控制方法、终端及应用程序调控***
CN106161157A (zh) * 2016-07-20 2016-11-23 珠海格力电器股份有限公司 智能家居***的搭建方法、装置、智能家居***及终端

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198677A (zh) * 2018-10-30 2020-05-26 阿里巴巴集团控股有限公司 一种设备对象生成方法、装置及设备

Also Published As

Publication number Publication date
CN106161157A (zh) 2016-11-23
CN106161157B (zh) 2019-01-29

Similar Documents

Publication Publication Date Title
Alaya et al. Toward semantic interoperability in oneM2M architecture
WO2018014553A1 (zh) 智能家居***的搭建方法、装置、智能家居***及终端
US8954541B2 (en) Method, computer-readable medium, and system for discovery and registration of controlled devices associated with self-describing modules
US20210405629A1 (en) System and method for interoperable communication of an automation system component with multiple information sources
TW201826869A (zh) 設備關聯方法、裝置、終端設備和作業系統
TW576982B (en) Programmatic management of software resources in a content framework environment
CN108614689A (zh) 场景服务的生成方法、装置和终端设备
Wu et al. OneM2M-based IoT protocol integration
CN108011768A (zh) 一种aop拦截式HBase数据存储微服务架构构建方法
CN100531200C (zh) 面向3c融合的数字家居中间件引擎
CN103218220A (zh) 基于动态可插拔组件的物联网中间件***
KR100880536B1 (ko) 이기종 컴퓨팅 및 서비스 통합을 위한 오픈 프레임워크시스템
CN107948231A (zh) 基于场景的服务提供方法、***和操作***
CN110618614A (zh) 一种智能家居的控制方法、装置、存储介质及机器人
US20070106770A1 (en) Managing a remote device by a communication element that does not specify an identifier for the management object
US20180101574A1 (en) Searching index information for application data
CN111381508A (zh) 一种智能家居的控制方法、***及存储介质
CN107577820A (zh) 数据处理的方法、设备及***
CN103488696A (zh) Cpe的业务查询方法、装置及***、acs和cpe
CN113391559A (zh) 智慧家居设备控制方法和终端设备
Evensen et al. SenseWrap: A service oriented middleware with sensor virtualization and self-configuration
CN103198041B (zh) 一种实现建立iec61970 gid接口的方法
CN103763325B (zh) 构建ip安防产品开发环境的方法
KR101996029B1 (ko) 네트워크 기능 가상화 시스템에 있어서, 네트워크 서비스 디스크립터를 설계하는 방법, 네트워크 서비스 디스크립터를 관리하는 방법 및 그 방법들을 구현하기 위한 시스템
Kuller et al. Conceptual design of a digital twin based on semantic web technologies in the smart home context

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17830202

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17830202

Country of ref document: EP

Kind code of ref document: A1