Summary of the invention
Fundamental purpose of the present invention is to provide a kind of interface to generate method and system automatically, is intended to improve the interface operation dirigibility of house control system.
In order to achieve the above object, the present invention proposes a kind of interface and generates method automatically, may further comprise the steps:
Terminal device provides equipment to send interface application request with predetermined data frame format to said man-machine interface after providing equipment to connect with man-machine interface;
Said man-machine interface provides equipment according to the application request of said interface, obtains interface content and preserves to local, and generate display interface according to the interface content that obtains.
Preferably, said man-machine interface provides equipment according to the application request of said interface, obtains interface content to local step of preserving and comprises:
Said man-machine interface provides the application request of the said interface of device parses, selects the corresponding interface icon identifier of said terminal device according to analysis result;
Setting up socket with interface network address that obtains in the application request of the said interface of parsing or ip address corresponding server is connected;
According to the interface icon identifier of said terminal device, download corresponding icon file from said corresponding server;
Said icon file inserted in the local interface description file preserve.
Preferably, said man-machine interface provides equipment according to the application request of said interface, obtains interface content to local step of preserving and also comprises:
When interface network address that in resolving the application request of said interface, obtains or ip address were invalid, said man-machine interface provided equipment to download interface content from the acquiescence network address corresponding server of said device end.
Preferably, said man-machine interface provides equipment according to the application request of said interface, obtains interface content to local step of preserving and also comprises:
When said man-machine interface provided equipment can't set up the network connection, said man-machine interface provided equipment to reach the icon sets content of being scheduled to through the public version interface numbering of being scheduled to, and forms interim interface.
Preferably, said man-machine interface provides equipment to comprise according to the step that the interface content that obtains generates display interface:
Said man-machine interface provides equipment through pre-defined algorithm the interface content that obtains to be carried out safety check;
Interface content behind the safety check is carried out the interface play up, generate display interface.
Preferably, also comprise after the step that the interface content after said man-machine interface provides equipment to safety check carries out playing up at the interface:
Said man-machine interface provides equipment to pass through to send monitor command to said terminal device, and the interface content after the interface is played up carries out function check; After the function check success, the said display interface that generates is saved as formal interface.
The present invention also proposes a kind of interface automatic creation system, comprising: terminal device and man-machine interface provide equipment, wherein:
Said terminal device is used for after providing equipment to connect with man-machine interface, provides equipment to send interface application request with predetermined data frame format to said man-machine interface;
Said man-machine interface provides equipment, comprising:
The interface content acquisition module is used for obtaining interface content and preserving to local according to the application request of said interface;
The interface generation module is used for generating display interface according to the interface content that obtains.
Preferably, said interface content acquisition module comprises:
Resolve and selected cell, be used to resolve the application request of said interface, select the corresponding interface icon identifier of said terminal device according to analysis result;
Connect and to set up the unit, be used for and resolve interface network address that the application of said interface asks to obtain or ip address corresponding server and set up socket and be connected;
Download unit is used for the interface icon identifier according to said terminal device, downloads corresponding icon file from said corresponding server;
Preserve the unit, be used for that said icon file is inserted local interface description file and preserve.
Preferably, said interface content acquisition module also is used for downloading interface content when resolving interface network address that the application request of said interface obtains or ip address when invalid from the acquiescence network address corresponding server of said device end; And when said man-machine interface provides equipment can't set up the network connection, reach predetermined icon sets content through predetermined public version interface numbering, form interim interface.
Preferably, said interface generation module comprises:
The safety check unit is used for through pre-defined algorithm the interface content that obtains being carried out safety check;
Rendering unit is used for that the interface content behind the safety check is carried out the interface and plays up, and generates display interface;
The function check unit is used for through sending monitor command to said terminal device, and the interface content after the interface is played up carries out function check; After the function check success, the said display interface that generates is saved as formal interface.
A kind of interface that the present invention proposes generates method and system automatically, and terminal device is through LAN, zigbee network, after modes such as radio-frequency communication are connected to man-machine interface equipment is provided; Provide equipment to send interface application request with predetermined data frame format to man-machine interface; After man-machine interface provided equipment to receive request, online was downloaded interface content or under the net situation, is being used public version interface according to content frame, and man-machine interface provides equipment and terminal device to carry out function check according to interface content simultaneously; If the feasible interface content of then preserving of function; And at this interface control terminal device of follow-up use, thereby make the man-machine interface of control terminal that the objective interface of equipment is provided, improved its interface operation dirigibility; Keep terminal device manufacturer style; Upgrade the icon outward appearance of terminal device on the interface easily, under the suspension situation, also can guarantee the usability of product simultaneously, meet consumers' demand.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Embodiment of the invention solution mainly is: terminal device is after providing device talk through modes such as LAN, zigbee network, radio-frequency communication ability and man-machine interface; Provide equipment to send interface application request with predetermined data frame format to man-machine interface; After man-machine interface provides equipment to receive request; Online is downloaded interface content or under the net situation, is being used public version interface according to content frame; Man-machine interface provides equipment and terminal device to carry out function check according to interface content simultaneously, if the feasible interface content of then preserving of function, and at this interface control terminal device of follow-up use; Thereby make the man-machine interface of control terminal that the objective interface of equipment is provided, improve the interface operation dirigibility.
The embodiment of the invention relates to the control system of Smart Home or intelligent building; This system comprises that terminal device and man-machine interface provide equipment; Wherein: terminal device can be any product of household; Such as air-conditioning, washing machine or TV etc., man-machine interface provides equipment then can be connected to the interface equipment that has of the Internet for Centralized Controller, gateway, smart mobile phone or panel computer etc.
Consider the limitation and the cost factor of terminal resource,, then do not meet reality, and cost is higher if adopt the terminal device that has large-size screen monitors and high-performance processor to come the different-style interface of display terminal.And equipment is provided man-machine interface if good administration interface content, and machine-made look & feel then can't satisfy the demand of user to the different terminal equipment look & feel.
Based on above-mentioned factor, the present invention can improve the interface operation dirigibility that man-machine interface provides equipment.
Particularly, please with reference to shown in Figure 1, Fig. 1 is that a kind of interface that one embodiment of the invention proposes generates method automatically, comprising:
Step S101, terminal device provide equipment to send interface application request with predetermined data frame format to man-machine interface after providing equipment to connect with man-machine interface;
In the present embodiment; Terminal device is passing through LAN, zigbee network; After modes such as radio-frequency communication are connected to man-machine interface equipment are provided; Provide equipment to send interface application request with predetermined data frame format to man-machine interface,, and then download corresponding interface content according to this icon information so that man-machine interface provides equipment to apply for the corresponding icon information of this terminal device of acquisition request according to this interface.
The interface application request of above-mentioned predetermined data frame format possibly all comprise or part comprises: the descriptor that terminal device is relevant, this descriptor comprises: device type, supplier number, device numbering, interface network address and public version interface numbering.
Wherein: which kind of electrical equipment is device type be expressed as, like air-conditioning, and washing machine etc.; Corresponding each manufacturer of supplier number has uniqueness in system; Device numbering is represented the actual model of terminal device in manufacturer; The interface network address is defaulted as the placement network address of terminal device in the manufacturer interface; A public version interface is in order to prevent from net type unexpected the generation, and the basic function of terminal device is carried out interface and the control command that standardization is set, do not kept manufacturer's style and specific function.
Step S102, man-machine interface provides equipment according to interface application request, obtains interface content and preserves to local, and generate display interface according to the interface content that obtains.
After the interface application that man-machine interface provides equipment to receive the terminal device transmission is asked; This interface application request is resolved; Use information such as the real-time sense terminals equipment of technology such as zigbee, radio-frequency communication, network communication is online, attribute change, state change, equipment establishment; According to the interface icon corresponding informance that provides behind the resolution data content frame, the interface network address corresponding server from the application request of interface is downloaded the corresponding interface icon data content of this terminal device; Be kept at this locality, and the interface content of downloading is carried out safety check according to pre-defined algorithm.
Afterwards the interface content of downloading is carried out the interface through modes such as browsers and play up, and, interface content reasonably is inserted in local original interface description file, generate display interface through local program.
Particularly; Man-machine interface provides equipment in generating the process of display interface, when the interface application request of receiving that terminal device is sent, judges that at first self whether can connect the interface application asks median surface network address corresponding server; If can accomplish socket with interface network address specified server is connected; The interface network address that then provides according to the application request of this interface, and the icon information of this terminal device that from the application request of interface, parses are to the corresponding server application and download the icon file of correspondence of the terminal device of new that add or upgrading; As the corresponding interface content of this terminal device; The interface content that obtains is added into man-machine interface to be provided in the local original interface description file of equipment, carries out providing the interface of equipment to generate display interface in man-machine interface after the interface plays up through browser etc.; The user can drag the terminal device icon on man-machine interface provides the interface of equipment, to mix optimal man-machine interface.
If the interface website links that interface application request provides is invalid, then man-machine interface provides the acquiescence network address of equipment AutoLink terminal device, and interface content is downloaded in application in the acquiescence network address according to equipment class, supplier number and device numbering.Such acquiescence network address is the network address of the family of similar driving, can the interface content of each manufacturer collected and issue, and has the interface content that is carried out verification and approval by official on this network address.
If man-machine interface provides equipment can not connect network, then use predetermined public version interface numbering and predetermined icon sets content, form interim interface.Wherein, a public version interface only possesses general control content, does not possess the content that logo etc. has manufacturer's style.Public version interface is after man-machine interface provides equipment to be connected to network and successfully applies for corresponding interface content, and the interface content of being applied for replaces.
In addition; After man-machine interface provides equipment to get access to corresponding interface content (comprising the interface content of downloading from corresponding server, public version interface or formal manufacturer interface) and is saved in this locality; Man-machine interface provides equipment at first to carry out safety check according to pre-defined algorithm, and whether the affirmation interface content once was held as a hostage in downloading process and was revised.If detection is dangerous, then abandon this interface content, apply for again; Otherwise, carry out follow-up interface and play up and the function check process.
The pre-defined algorithm that above-mentioned safety check adopted can adopt the MD5 algorithm to realize, the MD5 algorithm belongs to prior art, is not described further at this.
Interface render process for interface content comprises that to interface content generation engine and compiling decipher this process and current web page compiling html files classes seemingly can adopt xml compiling decipher mode to realize the interface generation.
After interface content is downloaded and played up completion, need carry out function check.In the function check process, man-machine interface provides equipment anthropomorphic dummy's mode of operation one by one, sends monitor command and gives terminal device; If the terminal device normal running is also fed back correct information; Think that then the interface of above-mentioned generation is exercisable interface, the interface of this generation provides on the equipment in man-machine interface and is saved as formal interface, in the follow-up practical application; When not running into official renewal interface, do not need the interface is changed.
In the specific embodiment process, as shown in Figure 2, man-machine interface provides equipment according to interface application request among the above-mentioned steps S102, obtains interface content to local step of preserving and comprises:
Step S1021, man-machine interface provides the application request of device parses interface, selects the corresponding interface icon identifier of terminal device according to analysis result;
Step S1022 judges that man-machine interface provides equipment whether can set up network and connects, if then get into step S1023; Otherwise, get into step S1028;
Step S1023; Judge whether the interface network address or the ip address that obtain in the resolution interface application request be effective; If effectively, then get into step S1024; Otherwise, get into step S1027;
Step S1024 sets up socket with interface network address that obtains in the resolution interface application request or ip address corresponding server and is connected;
Step S1025 according to the interface icon identifier of terminal device, downloads corresponding icon file from corresponding server;
Step S1026 inserts icon file in the local interface description file and to preserve.
Step S1027, the acquiescence network address corresponding server at slave unit terminal is downloaded interface content.
Step S1028, public version interface numbering and predetermined icon sets content through predetermined form interim interface.
As shown in Figure 3, man-machine interface provides equipment to comprise according to the step that the interface content that obtains generates display interface among the above-mentioned steps S102:
Step S1029, man-machine interface provides equipment through pre-defined algorithm the interface content that obtains to be carried out safety check;
Step S1030 carries out the interface to the interface content behind the safety check and plays up, and generates display interface.
Step S1031, through sending monitor command to terminal device, the interface content after the interface is played up carries out function check; After the function check success, the display interface that generates is saved as formal interface.
Present embodiment is after terminal device is connected to LAN; Provide equipment to send interface application request with certain data frame format to man-machine interface; Man-machine interface provides equipment to ask specified server download interface content or under the net situation, using public version interface according to above-mentioned; Simultaneously, man-machine interface provides equipment and terminal device to carry out function check according to the interface content of downloading.If function is feasible, then man-machine interface provides equipment to preserve interface content, and in subsequent process; Use this interface content control corresponding terminal device, terminal device is effectively used, simultaneously objective interface; Flexible operation; And keeping manufacturer's style, interface function and outward appearance are upgraded easily, under the suspension situation, also can guarantee the usability of product.
As shown in Figure 4, one embodiment of the invention proposes a kind of interface automatic creation system, comprising:terminal device 401 and man-machine interface provideequipment 402, wherein:
Terminal device 401 is used for after providingequipment 402 to connect with man-machine interface, to man-machine interface the application request ofequipment 402 transmission interfaces is provided with predetermined data frame format;
Man-machine interface providesequipment 402, is used for obtaining interface content and preserving to local, and generate display interface according to the interface content that obtains according to interface application request.
Particularly, as shown in Figure 5, man-machine interface providesequipment 402, comprising: interfacecontent acquisition module 4021 andinterface generation module 4022, wherein:
Interfacecontent acquisition module 4021 is used for obtaining interface content and preserving to local according to interface application request;
Interface generation module 4022 is used for generating display interface according to the interface content that obtains.
In the present embodiment;Terminal device 401 is passing through LAN, zigbee network; After modes such as radio-frequency communication are connected to man-machine interface equipment are provided; To man-machine interface the application request ofequipment 402 transmission interfaces is provided with predetermined data frame format,, and then downloads corresponding interface content according to this icon information so that man-machine interface providesequipment 402 can apply for the icon information of theseterminal device 401 correspondences of acquisition request according to this interface.
The interface application request of above-mentioned predetermined data frame format possibly all comprise or part comprises: the descriptor thatterminal device 401 is relevant, this descriptor comprises: device type, supplier number, device numbering, interface network address and public version interface numbering.
Wherein: which kind of electrical equipment is device type be expressed as, like air-conditioning, and washing machine etc.; Corresponding each manufacturer of supplier number has uniqueness in system; Device numbering is represented the actual model ofterminal device 401 in manufacturer; The interface network address is defaulted as the placement network address ofterminal device 401 in the manufacturer interface; A public version interface is in order to prevent from net type unexpected the generation, and the basic function ofterminal device 401 is carried out interface and the control command that standardization is set, do not kept manufacturer's style and specific function.
After the interface application that man-machine interface providesequipment 402 to receiveterminal device 401 transmissions is asked; Resolve through 4021 pairs of this interface application requests of interface content acquisition module; Use information such as 401 online, the attribute change of sense terminals equipment in real time of technology such as zigbee, radio-frequency communication, network communication, state change, equipment establishment; According to the interface icon corresponding informance that provides behind the resolution data content frame; Apply for the interface network address corresponding server the request from the interface, download the interface icon data content of theseterminal device 401 correspondences, be kept at this locality.
Afterwards the interface content through downloading 4022 pairs of downloads of theseterminal device 401 median surface generation modules according to pre-defined algorithm carry out safety check, play up at the interface and function check.Carrying out the interface when playing up, can carry out the interface through modes such as browsers to the interface content of downloading and play up, and, interface content reasonably is inserted in local original interface description file, generating display interface through local program.
Particularly; Man-machine interface providesequipment 402 in generating the process of display interface, when the interface application request of receiving thatterminal device 401 is sent, judges that at first self whether can connect the interface application asks median surface network address corresponding server; If can accomplish socket with interface network address specified server is connected; The interface network address that then provides according to the application request of this interface, and the icon information of thisterminal device 401 that from the application request of interface, parses are to the corresponding server application and download the icon file of correspondence of theterminal device 401 of new that add or upgrading; Interface content as theseterminal device 401 correspondences; Add the interface content that obtains into that man-machine interface provides inequipment 402 local original interface description files, carry out providing the interface ofequipment 402 to generate display interface in man-machine interface after the interface plays up through browser etc.; The user can dragterminal device 401 icons on man-machine interface provides the interface ofequipment 402, to mix optimal man-machine interface.
If the interface website links that interface application request provides is invalid, then man-machine interface provides the acquiescence network address ofequipment 402 AutoLinkterminal devices 401, and interface content is downloaded in application in the acquiescence network address according to equipment class, supplier number and device numbering.Such acquiescence network address is the network address of the family of similar driving, can the interface content of each manufacturer collected and issue, and has the interface content that is carried out verification and approval by official on this network address.
If man-machine interface providesequipment 402 can not connect network, then use predetermined public version interface numbering and predetermined icon sets content, form interim interface.Wherein, a public version interface only possesses general control content, does not possess the content that logo etc. has manufacturer's style.Public version interface is after man-machine interface providesequipment 402 to be connected to network and successfully applies for corresponding interface content, and the interface content of being applied for replaces.
In addition; After man-machine interface providesequipment 402 to get access to corresponding interface content (comprising the interface content of downloading from corresponding server, public version interface or formal manufacturer interface) and is saved in this locality; Man-machine interface providesequipment 402 at first to carry out safety check according to pre-defined algorithm, and whether the affirmation interface content once was held as a hostage in downloading process and was revised.If detection is dangerous, then abandon this interface content, apply for again; Otherwise, carry out follow-up interface and play up and the function check process.
The pre-defined algorithm that above-mentioned safety check adopted can adopt the MD5 algorithm to realize, the MD5 algorithm belongs to prior art, is not described further at this.
Interface render process for interface content comprises that to interface content generation engine and compiling decipher this process and current web page compiling html files classes seemingly can adopt xml compiling decipher mode to realize the interface generation.
After interface content is downloaded and played up completion, need carry out function check.In the function check process, man-machine interface providesequipment 402 anthropomorphic dummy's mode of operation one by one, sends monitor command and givesterminal device 401; Ifterminal device 401 normal runnings are also fed back correct information; Think that then the interface of above-mentioned generation is exercisable interface, the interface of this generation provides on theequipment 402 in man-machine interface and is saved as formal interface, in the follow-up practical application; When not running into official renewal interface, do not need the interface is changed.
Particularly, as shown in Figure 6, above-mentioned interfacecontent acquisition module 4021 comprises: parsing and selectedcell 40211, connection are set upunit 40212,download unit 40213 and are preservedunit 40214, wherein:
Resolve and selectedcell 40211, be used for resolution interface application request, select the corresponding interface icon identifier of terminal device according to analysis result;
Connect and to set upunit 40212, interface network address that is used for obtaining with resolution interface application request or ip corresponding server are set up socket and are connected;
Download unit 40213 is used for the interface icon identifier according to terminal device, downloads corresponding icon file from corresponding server;
Preserve unit 40214, be used for that icon file is inserted local interface description file and preserve.
Further, above-mentioned interfacecontent acquisition module 4021 also is used for when the interface applies for that the interface network address of asking is invalid, and the acquiescence network address corresponding server at slave unit terminal is downloaded interface content.
Interfacecontent acquisition module 4021 also is used for when man-machine interface provides equipment can't set up the network connection, reaches predetermined icon sets content through predetermined public version interface numbering, forms interim interface.
As shown in Figure 7, above-mentionedinterface generation module 4022 comprises:safety check unit 40221,rendering unit 40222 andfunction check unit 40223, wherein:
Safety check unit 40221 is used for through pre-defined algorithm the interface content that obtains being carried out safety check;
Rendering unit 40222 is used for that the interface content behind the safety check is carried out the interface and plays up, and generates display interface;
Function check unit 40223 is used for through sending monitor command to terminal device, and the interface content after the interface is played up carries out function check; After the function check success, the display interface that generates is saved as formal interface.
Embodiment of the invention interface generates method and system automatically, and terminal device provides equipment to send interface application request with predetermined data frame format to man-machine interface after being connected to LAN; After man-machine interface provides equipment to receive request; Online is downloaded interface content or under the net situation, is being used public version interface according to content frame, and man-machine interface provides equipment and terminal device to carry out function check according to interface content simultaneously, if the feasible interface content of then preserving of function; And at this interface control terminal device of follow-up use; Thereby make the man-machine interface of control terminal that the objective interface of equipment is provided, improved its interface operation dirigibility, keep terminal device manufacturer style; Upgrade the icon outward appearance of terminal device on the interface easily, under the suspension situation, also can guarantee the usability of product simultaneously.
The above is merely the preferred embodiments of the present invention; Be not so limit claim of the present invention; Every equivalent structure or flow process conversion that utilizes instructions of the present invention and accompanying drawing content to be done; Or directly or indirectly be used in other relevant technical field, all in like manner be included in the scope of patent protection of the present invention.