Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Fig. 1 utilizes Intelligent hardware to control the theory diagram of intelligent electric appliance in prior art.
As shown in Figure 1, utilize the intelligent electric appliance application program in Intelligent hardware intelligent appliance to be carried out to the method for Based Intelligent Control in prior art, be generally:
The application program for controlling intelligent electric appliance 20 is arranged in Intelligent hardware 10;
By the wireless network that Wireless Telecom Equipment 30 provides, realize the radio communication between Intelligent hardware 10 and intelligent electric appliance 20, thus control signal is sent to intelligent electric appliance 20, make it perform corresponding operation, realize corresponding function;
Intelligent hardware 10 receives by Wireless Telecom Equipment 30 work state information that intelligent electric appliance 20 feeds back, to realize real-time monitoring to intelligent appliance 20 and control.
In a particular application, Intelligent hardware 10 can be the mobile terminals such as smart mobile phone, panel computer, special Based Intelligent Control telepilot; Wireless Telecom Equipment 30 can be the equipment based on WiFi, bluetooth, infrared ray, ZigBee or related wireless communication technology; Intelligent electric appliance 20 can be various household electrical appliance (refrigerator, air-conditioning, washing machines etc.), also can be the device that various office electrical equipment (printer, shredder etc.), medical electrical equipment, industrial electric apparatus etc. support Based Intelligent Control, every needs realize in the device range of application all of the present invention of Based Intelligent Control by writing related application.
Fig. 2 is the process flow diagram of the application programming method of the intelligent electric appliance that the embodiment of the present invention provides.
As shown in Figure 2, the application programming method of the intelligent electric appliance that the embodiment of the present invention provides, comprising:
S101: the attribute obtaining intelligent electric appliance;
S102: generate the interface routine about described attribute, described interface routine comprises the first interface program for obtaining described attribute;
S103: the entity component creating described intelligent electric appliance according to described attribute and described interface routine;
S104: in described Develop Application System process, call described entity component;
S105: the attribute being imported described intelligent electric appliance by described interface routine, to complete the Develop Application System to described intelligent electric appliance.
In a particular application, operation when S101 is using computing machine as executive agent, S101 is specially: application developer sets, writes the attribute of intelligent electric appliance, and to the attribute of computer input intelligent electric appliance, the attribute of intelligent electric appliance is obtained again, the program code that described attribute is made up of character by computing machine.
In a particular application, the attribute of intelligent electric appliance comprises: the name attribute, ID attribute, cryptographic properties, temperature property, duty attribute, malfunction attribute, communication data attribute, mode of operation attribute, timing machine open/close attribute etc. of intelligent electric appliance.
Interface routine is write by application developer and inputs one section of program code of computing machine, for when needing the attribute obtaining described intelligent electric appliance, sends the request of the attribute obtaining described intelligent electric appliance to computing machine.
Assembly refers to the simplified package to data and method, the entity component of the intelligent electric appliance in the present embodiment refers to the encapsulation of attribute to intelligent electric appliance and interface routine, includes the attribute of described intelligent electric appliance and the program code of interface routine in this entity component.
In a preferred embodiment, S101 specifically comprises:
Obtain the attribute of this intelligent electric appliance according to the design requirement of intelligent electric appliance, described design requirement comprises functional requirement, demand for control or display demand.
In a preferred embodiment, described interface routine also comprises:
For revising the second interface routine of described attribute.
In a particular application, programmer can access the attribute of described intelligent electric appliance by described second interface routine, and increases described attribute, delete or change according to actual needs.
In a preferred embodiment, S104 specifically comprises:
The calling interface program for calling described entity component is created according to described entity component;
In described Develop Application System process, by entity component described in described calling interface routine call.
In a particular application, programmer is when carrying out the application development of intelligent electric appliance, call the entity component of this intelligent electric appliance by calling interface program, and obtain or revise the attribute of the intelligent electric appliance be encapsulated in entity component by first interface program and the second interface routine.
In a particular application, described intelligent electric appliance can be the household electrical appliance such as refrigerator, washing machine, air-conditioning, and the office electrical equipment such as printer, facsimile recorder and the various application program that utilizes are to carry out the electrical equipment of Based Intelligent Control.
Below exemplify the application programming method of several intelligent electric appliance, to elaborate to the embodiment of the present invention.
Embodiment one
In concrete application, when described intelligent electric appliance is refrigerator, the application programming method of refrigerator, specifically comprises:
Obtain the name attribute (described title can be changed according to corresponding development requirement) of refrigerator;
Obtain the ID attribute (described ID is unique, can not change) of refrigerator;
Obtain the cryptographic properties (affiliated password can be changed according to corresponding development requirement) of refrigerator;
Obtain the internal temperature attribute of refrigerator;
Obtain the set temperature attribute of refrigerator;
Obtain the duty attribute (data type of the code of described duty is array data) of refrigerator;
Obtain the malfunction attribute (data type of the code of described malfunction is array data) of refrigerator;
Obtain the communication data attribute (data type of the code of described communication data is array data) of refrigerator;
Generate the first interface program of the name attribute for obtaining refrigerator;
Generate the first interface program of the ID attribute for obtaining refrigerator;
Generate the first interface program of the cryptographic properties for obtaining refrigerator;
Generate the first interface program of the internal temperature attribute for obtaining refrigerator;
Generate the first interface program of the set temperature attribute for obtaining refrigerator;
Generate the first interface program of the duty attribute for obtaining refrigerator;
Generate the first interface program of the malfunction attribute for obtaining refrigerator;
Generate the first interface program of the communication data attribute for obtaining refrigerator;
Generate the second interface routine of the name attribute for revising refrigerator;
Generate the second interface routine of the ID attribute for revising refrigerator;
Generate the second interface routine of the cryptographic properties for revising refrigerator;
Generate the second interface routine of the internal temperature attribute for revising refrigerator;
Generate the second interface routine of the set temperature attribute for revising refrigerator;
Generate the second interface routine of the duty attribute for revising refrigerator;
Generate the second interface routine of the malfunction attribute for revising refrigerator;
Generate the second interface routine of the communication data attribute for revising refrigerator;
The entity component of refrigerator is created according to the described attribute of refrigerator, described first interface program and described second interface routine;
Imported the attribute of described refrigerator by described first interface program, and revise the attribute of described refrigerator by described second interface routine, to complete the Develop Application System to described refrigerator.
Embodiment two
In concrete application, when described intelligent electric appliance is air-conditioning, the method for designing of the application program of air-conditioning, specifically comprises:
Obtain the name attribute (described title can be changed according to corresponding development requirement) of air-conditioning;
Obtain the ID attribute (described ID is unique, can not change) of air-conditioning;
Obtain the cryptographic properties (affiliated password can be changed according to corresponding development requirement) of air-conditioning;
Obtain the ambient temperature attribute of air-conditioning;
Obtain the set temperature attribute of air-conditioning;
Obtain the duty attribute (data type of the code of described duty is array data) of air-conditioning;
Obtain the malfunction attribute (data type of the code of described malfunction is array data) of air-conditioning;
Obtain the communication data attribute (data type of the code of described communication data is array data) of air-conditioning;
Obtain the mode of operation attribute of air-conditioning;
Obtain the timing machine open/close attribute of air-conditioning;
Generate the first interface program of the name attribute for obtaining air-conditioning;
Generate the first interface program of the ID attribute for obtaining air-conditioning;
Generate the first interface program of the cryptographic properties for obtaining air-conditioning;
Generate the first interface program of the ambient temperature attribute for obtaining air-conditioning;
Generate the first interface program of the set temperature attribute for obtaining air-conditioning;
Generate the first interface program of the duty attribute for obtaining air-conditioning;
Generate the first interface program of the malfunction attribute for obtaining air-conditioning;
Generate the first interface program of the communication data attribute for obtaining air-conditioning;
Generate the first interface program of the mode of operation attribute for obtaining air-conditioning;
Generate the first interface program of the timing machine open/close attribute for obtaining air-conditioning;
Generate the second interface routine of the name attribute for revising air-conditioning;
Generate the second interface routine of the ID attribute for revising air-conditioning;
Generate the second interface routine of the cryptographic properties for revising air-conditioning;
Generate the second interface routine of the internal temperature attribute for revising air-conditioning;
Generate the second interface routine of the set temperature attribute for revising air-conditioning;
Generate the second interface routine of the duty attribute for revising air-conditioning;
Generate the second interface routine of the malfunction attribute for revising air-conditioning;
Generate the second interface routine of the communication data attribute for revising air-conditioning;
Generate the second interface routine of the mode of operation attribute for revising air-conditioning;
Generate the second interface routine of the timing machine open/close attribute for revising air-conditioning;
The entity component of air-conditioning is created according to the described attribute of air-conditioning, described first interface program and described second interface routine;
Imported the attribute of described air-conditioning by described first interface program, and revise the attribute of described air-conditioning by described second interface routine, to complete the Develop Application System to described air-conditioning.
Embodiment three
In concrete application, when described intelligent electric appliance is washing machine, the method for the application program of washing machine, specifically comprises:
Obtain the name attribute (described title can be changed according to corresponding development requirement) of washing machine;
Obtain the ID attribute (described ID is unique, can not change) of washing machine;
Obtain the cryptographic properties (affiliated password can be changed according to corresponding development requirement) of washing machine;
Obtain the duty attribute (data type of the code of described duty is array data) of washing machine;
Obtain the malfunction attribute (data type of the code of described malfunction is array data) of washing machine;
Obtain the communication data attribute (data type of the code of described communication data is array data) of washing machine;
Obtain the mode of operation attribute of washing machine;
Obtain the timing machine open/close attribute of washing machine;
Generate the first interface program of the name attribute for obtaining washing machine;
Generate the first interface program of the ID attribute for obtaining washing machine;
Generate the first interface program of the cryptographic properties for obtaining washing machine;
Generate the first interface program of the duty attribute for obtaining washing machine;
Generate the first interface program of the malfunction attribute for obtaining washing machine;
Generate the first interface program of the communication data attribute for obtaining washing machine;
Generate the first interface program of the mode of operation attribute for obtaining washing machine;
Generate the first interface program of the timing machine open/close attribute for obtaining washing machine;
Generate the second interface routine of the name attribute for revising washing machine;
Generate the second interface routine of the ID attribute for revising washing machine;
Generate the second interface routine of the cryptographic properties for revising washing machine;
Generate the second interface routine of the internal temperature attribute for revising washing machine;
Generate the second interface routine of the set temperature attribute for revising washing machine;
Generate the second interface routine of the duty attribute for revising washing machine;
Generate the second interface routine of the malfunction attribute for revising washing machine;
Generate the second interface routine of the communication data attribute for revising washing machine;
Generate the second interface routine of the mode of operation attribute for revising washing machine;
Generate the second interface routine of the timing machine open/close attribute for revising washing machine;
The entity component of washing machine is created according to the described attribute of washing machine, described first interface program and described second interface routine;
Imported the attribute of described washing machine by described first interface program, and revise the attribute of described washing machine by described second interface routine, to complete the Develop Application System to described washing machine.
Embodiment four
In concrete application, when described intelligent electric appliance is coffee machine, the method for designing of the application program of coffee machine, specifically comprises:
Obtain the name attribute (described title can be changed according to corresponding development requirement) of coffee machine;
Obtain the ID attribute (described ID is unique, can not change) of coffee machine;
Obtain the cryptographic properties (affiliated password can be changed according to corresponding development requirement) of coffee machine;
Obtain the heating-up temperature attribute of coffee machine;
Obtain the duty attribute (data type of the code of described duty is array data) of coffee machine;
Obtain the malfunction attribute (data type of the code of described malfunction is array data) of coffee machine;
Obtain the communication data attribute (data type of the code of described communication data is array data) of coffee machine;
Obtain the mode of operation attribute of coffee machine;
Generate the first interface program of the name attribute for obtaining coffee machine;
Generate the first interface program of the ID attribute for obtaining coffee machine;
Generate the first interface program of the cryptographic properties for obtaining coffee machine;
Generate the first interface program of the heating-up temperature attribute for obtaining coffee machine;
Generate the first interface program of the duty attribute for obtaining coffee machine;
Generate the first interface program of the malfunction attribute for obtaining coffee machine;
Generate the first interface program of the communication data attribute for obtaining coffee machine;
Generate the first interface program of the mode of operation attribute for obtaining coffee machine;
Generate the second interface routine of the name attribute for revising coffee machine;
Generate the second interface routine of the ID attribute for revising coffee machine;
Generate the second interface routine of the cryptographic properties for revising coffee machine;
Generate the second interface routine of the heating-up temperature attribute for revising coffee machine;
Generate the second interface routine of the duty attribute for revising coffee machine;
Generate the second interface routine of the malfunction attribute for revising coffee machine;
Generate the second interface routine of the communication data attribute for revising coffee machine;
Generate the second interface routine of the mode of operation attribute for revising coffee machine;
The entity component of coffee machine is created according to the described attribute of coffee machine, described first interface program and described second interface routine;
Imported the attribute of described coffee machine by described first interface program, and revise the attribute of described coffee machine by described second interface routine, to complete the Develop Application System to described coffee machine.
In a particular application, developer is by directly importing and call the entity component of intelligent electric appliance leaved for development to carry out system architecture and the exploitation of its application program, make the design process of the application program of intelligent electric appliance simpler, be easy to realize, shorten the construction cycle of again writing code, decrease debugging and the retouching operation of later stage program, save manpower and materials, save cost of development.
Fig. 3 is the process flow diagram of the application programming method of the intelligent electric appliance that the preferred embodiments of the present invention provide.
As shown in Figure 3, the application programming method of the intelligent electric appliance that the preferred embodiments of the present invention provide, specifically comprises:
S201: the attribute obtaining often kind of intelligent electric appliance in multiple intelligent electric appliance respectively;
S202: the interface routine generating the attribute about described often kind of intelligent electric appliance respectively, described interface routine comprises the first interface program for obtaining described attribute;
S203: according to described attribute and the described often kind of intelligent electric appliance entity component of described interface routine establishment of described often kind of intelligent electric appliance;
S204: create the Component Gallery comprising multiple described entity component, the wherein corresponding a kind of intelligent electric appliance of each described entity component;
S205: in the Develop Application System process of often kind of intelligent electric appliance, call the entity component corresponding with this kind of intelligent electric appliance from described Component Gallery;
S206: the attribute being imported described intelligent electric appliance by described interface routine, to complete the Develop Application System to described intelligent electric appliance.
In the present embodiment, by creating the Component Gallery comprising the entity component of multiple intelligent electric appliance, make programmer when needs carry out application programming to certain intelligent electric appliance, directly can be called the entity component of this kind of intelligent electric appliance from Component Gallery by calling interface program, complete the design of the application program of this kind of intelligent electric appliance, improve design efficiency; By creating the Component Gallery comprising the entity component of multiple intelligent electric appliance, same position developer can be developed the application program of the multiple intelligent electric appliance of different field, reduce the technical requirement to application developer.
In a preferred embodiment, described interface routine also comprises:
For revising the second interface routine of described attribute.
In preferably implementing one, the application programming method of described intelligent electric appliance, specifically also comprises:
According to design requirement, the entity component in described Component Gallery is deleted or is imported the entity component of new intelligent electric appliance.
Application developer can, by importing the entity component of new intelligent electric appliance or delete unwanted entity component in described Component Gallery, make the multiple entity component in described Component Gallery to be upgraded in time.
Fig. 4 is the structured flowchart of the application programming system of the intelligent electric appliance that the embodiment of the present invention provides.
As shown in Figure 4, the embodiment of the present invention also provides a kind of application programming system of intelligent electric appliance, and described system comprises:
Attribute acquisition module 101, for obtaining the attribute of intelligent electric appliance;
Interface routine generation module 102, for generating the interface routine about described attribute, described interface routine comprises the first interface program for obtaining described attribute;
Building component module 103, for creating the entity component of described intelligent electric appliance according to described attribute and described interface routine;
Component call module 104, in described Develop Application System process, calls described entity component;
Attribute imports module 105, for being imported the attribute of described intelligent electric appliance by described interface routine, to complete the Develop Application System to described intelligent electric appliance.
In a preferred embodiment, described interface routine also comprises:
For revising the second interface routine of described attribute.
In a preferred embodiment, described component call module 104, specifically comprises:
Calling interface Program Generating unit, for creating the calling interface program for calling described entity component according to described entity component;
Component call unit, in described Develop Application System process, by entity component described in described calling interface routine call.
Fig. 5 is the structured flowchart of the application programming system of the intelligent electric appliance that the preferred embodiments of the present invention provide.
As Fig. 5, in the application programming system of the intelligent electric appliance provided in the preferred embodiments of the present invention:
Shown described attribute acquisition module 101, also for obtaining the attribute of often kind of intelligent electric appliance in multiple intelligent electric appliance respectively;
Described interface routine generation module 102, also for generating the interface routine of the attribute about described often kind of intelligent electric appliance respectively, described interface routine comprises the first interface program for obtaining described attribute;
Described building component module 103, also for creating described often kind of intelligent electric appliance entity component according to the described attribute of described often kind of intelligent electric appliance and described interface routine;
Described system also comprises Component Gallery creation module 106, creates for the entity component according to described often kind of intelligent electric appliance the Component Gallery comprising multiple entity component;
Described component call module 104, also in the Develop Application System process of described often kind of intelligent electric appliance, calls the entity component of described often kind of intelligent electric appliance from described Component Gallery.
In a preferred embodiment, described attribute acquisition module 101, specifically for:
Obtain the attribute of this intelligent electric appliance according to the design requirement of intelligent electric appliance, described design requirement comprises functional requirement, demand for control or display demand.
In preferably implementing one, the application programming system of described intelligent electric appliance, specifically also comprises:
Assembly imports/deletes module, for according to design requirement, the entity component in described Component Gallery is deleted or imported to the entity component of new intelligent electric appliance.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.