CN110008038A - Control method, apparatus, equipment and the storage medium of household appliance - Google Patents

Control method, apparatus, equipment and the storage medium of household appliance Download PDF

Info

Publication number
CN110008038A
CN110008038A CN201910172174.9A CN201910172174A CN110008038A CN 110008038 A CN110008038 A CN 110008038A CN 201910172174 A CN201910172174 A CN 201910172174A CN 110008038 A CN110008038 A CN 110008038A
Authority
CN
China
Prior art keywords
household appliance
model
device model
application program
data model
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201910172174.9A
Other languages
Chinese (zh)
Inventor
王关水
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Haier Uplus Intelligent Technology Beijing Co Ltd
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 Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Haier Uplus Intelligent Technology Beijing Co Ltd
Priority to CN201910172174.9A priority Critical patent/CN110008038A/en
Publication of CN110008038A publication Critical patent/CN110008038A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications

Abstract

The invention discloses a kind of method, apparatus, equipment and storage mediums for controlling household appliance, wherein, a method of control household appliance, comprising: obtain the device model of certain types of household appliance, and the device model is converted into corresponding data model;The api interface that can be called by application program is generated, according to the data model so that the application program controls the certain types of household appliance by the api interface;Wherein, the application program is for controlling various types of household appliances.By the way that device model is converted to data model, and api interface is generated according to data model, during APP exploitation, when as identical such as function, code is write without repeating, is directly called by api interface, to reduce development procedure, the consistency and quality for also ensuring APP achievees the purpose that reduce development cost and improves procedural compliance and quality.

Description

Control method, apparatus, equipment and the storage medium of household appliance
Technical field
The present invention relates to field of household appliances more particularly to a kind of method, apparatus for controlling household appliance, equipment and storage to be situated between Matter.
Background technique
Presently, there are many APP, gross function is all essentially the same, the interaction of completion equipment and user.Every money APP Most of below is all duplicate code.
Therefore there are development cost height, and the exploitation of duplicated code is so that the consistency and quality of home wiring control scheme is low Problem.
Summary of the invention
The embodiment of the present invention provides a kind of method, apparatus, equipment and storage medium for controlling household appliance, existing to solve There are development cost height, procedural compliance and low-quality problem in technology.
In a first aspect, the embodiment of the present invention provides a kind of method for controlling household appliance, comprising:
The device model of certain types of household appliance is obtained, and the device model is converted into corresponding data mould Type;
The api interface that can be called by application program is generated, according to the data model so that the application program passes through The api interface controls the certain types of household appliance;Wherein, the application program is for controlling various types of household electrical appliances Equipment.
As a kind of specific implementation of the embodiment of the present invention, the device model is being converted into corresponding data mould Before type, the method also includes:
Judge whether the device model meets preset format specification, if so, being to correspond to by the standby model conversion Data model.
It is described that the device model is converted into corresponding data as a kind of specific implementation of the embodiment of the present invention Model, comprising:
The device model of document form is converted to the data model of structured data form according to preset rules.
As a kind of specific implementation of the embodiment of the present invention, the device model includes: device model operation, equipment Model attributes and device model alarm.
Second aspect, the embodiment of the present invention provide a kind of device for controlling household appliance, comprising:
Interlocking module: it links for establishing the page and data resource interface;
Building module: it is the interface document that the data resource interface generates standard for using interface automation plug-in unit, obtains To the Internet of Things application of building;
Test module: for carrying out automatic test to Internet of Things application;
Deployment module: for disposing the Internet of Things application after automatic test.
Conversion module is converted to for obtaining the device model of certain types of household appliance, and by the device model Corresponding data model;
Generation module, for generating the api interface that can be called by application program according to the data model, for described Application program controls the certain types of household appliance by the api interface;Wherein, the application program is each for controlling The household appliance of seed type.
As a kind of specific implementation of the embodiment of the present invention, described device further include:
Judgment module, for judging whether the device model meets preset format specification, if so, by the standby mould Type is converted to corresponding data model.
As a kind of specific implementation of the embodiment of the present invention, the conversion module is specifically used for:
The device model of document form is converted to the data model of structured data form according to preset rules.
As a kind of specific implementation of the embodiment of the present invention, the device model includes: device model operation, equipment Model attributes and device model alarm.
The third aspect, the embodiment of the present invention provide it is a kind of control household appliance equipment, the equipment include: processor, Memory and communication bus;
The communication bus is for realizing the connection communication between the processor and the memory;
The processor is used to execute the program of the control household appliance stored in the memory, to realize first aspect The step of method of described in any item control household appliances.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer-readable storage medium Matter is stored with the program of control household appliance;
When the program of the control household appliance is executed by least one processor, lead at least one described processor The step of executing the method for the described in any item control household appliances of first aspect.
The embodiment of the present invention generates api interface according to data model by the way that device model is converted to data model, During APP is developed, when as identical such as function, code is write without repeating, is directly called by api interface, thus Reduce development procedure, also ensure the consistency and quality of APP, reaching reduces development cost and improve procedural compliance and matter The purpose of amount.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is the flow chart of the method for control household appliance described in the embodiment of the present invention one;
Fig. 2 is the flow chart of the method for control household appliance described in the embodiment of the present invention two;
Fig. 3 is the principle frame of one concrete application scene of method of control household appliance described in the embodiment of the present invention two Figure;
Fig. 4 is the flow chart of one concrete application scene of method of control household appliance described in the embodiment of the present invention two;
Fig. 5 is the structural block diagram of the device of control household appliance described in the embodiment of the present invention three.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Most of behind every money APP is all duplicate code, from design angle, can eliminate these repeatability completely, real The driving exploitation of existing model.The main problem that the embodiment of the present invention solves is exactly automatic by the elimination implementation pattern of repeatability Change, improves the consistency and quality of solution.
Present often upper a product, has similar code to generate, the component of interaction especially between user and equipment.From The level of Technical Architecture considers that this needs to reconstruct certainly, or needs to consider this problem from whole removing.
The embodiment of the present invention is based on Mode-driven architecture, design pattern and mentions in conjunction with the framework experience and design experiences of many years Such a framework thinking based on device model out.And it is applied to production.
Design based on model is a kind of solution of model common software, is lacked to personalized support.
Model be it is abstract, the model attributes of public approval are extracted from each individual device model, generally at this The personalized device model attribute of comparison can be neglected in the process, thus the Internet of Things software meeting designed according to model data Only the lacking individuality with versatility.
For personalized Internet of Things software, can be added in common software by the way of customization.Common software is made For a basic version, individualized software is up superimposed on this basis.
Embodiment one:
The embodiment of the present invention provides a kind of method for controlling household appliance, as shown in Figure 1, comprising:
Step S101: the device model of certain types of household appliance is obtained, and the device model is converted into correspondence Data model;
Optionally, device model includes: device model operation, device model attribute and device model alarm.
Step S102: the api interface that can be called by application program is generated, according to the data model for the application Program controls the certain types of household appliance by the api interface;Wherein, the application program is various types of for controlling The household appliance of type.
The api interface that can be called by application program is generated according to the data model, i.e., to same category of device model conversion Data model extract, so that the code of identical function to be extracted as to the api interface that can be called, when developing other APP, When needing using identical function, the function is directly called by the api interface, avoids the overlapping development of same code.
In a specific application scenarios, there are two function, function a and function b in APP such as in home wiring control, existing Have when writing code in technology, needs to write the corresponding code of function a and the corresponding code of function b, function a and function b respectively There are the duplicate code in part in corresponding code, after the method using the control household appliance of the embodiment of the present invention, will repeat Code section is extracted as api interface, and such function a and the duplicate code section of function b only need to write once.
It is described that the device model is converted into corresponding data model as a specific embodiment of the present invention, Include:
The device model of document form is converted to the data model of structured data form according to preset rules.
Firstly the need of one common model of production, the value of some parameters and parameter is defined in model, specifically such as 1 institute of table Show,
Table 1: common model data format table.
Then the specific procedure that device model is converted to the data model of structured data form according to preset rules is retell It is as follows:
Embodiment two:
The embodiment of the present invention provides a kind of method for controlling household appliance, as shown in Figure 2, comprising:
Step S101: judge whether the device model meets preset format specification;
If so, carrying out following step for the standby model conversion is corresponding data model.
Preset format specification is not met such as, then needs to be converted into preset format specification, is further continued for carrying out following The step of by the standby model conversion be corresponding data model.
Step S102: the device model of certain types of household appliance is obtained, and the device model is converted into correspondence Data model;
The above-mentioned device model for meeting preset format specification is converted into corresponding data model.
Optionally, device model includes: device model operation, device model attribute and device model alarm.
Step S103: the api interface that can be called by application program is generated, according to the data model for the application Program controls the certain types of household appliance by the api interface;Wherein, the application program is various types of for controlling The household appliance of type.
The api interface that can be called by application program is generated according to the data model, i.e., to same category of device model conversion Data model extract, so that the code of identical function to be extracted as to the api interface that can be called, when developing other APP, When needing using identical function, the function is directly called by the api interface, avoids the overlapping development of same code.
In a specific application scenarios, there are two function, function a and function b in APP such as in home wiring control, existing Have when writing code in technology, needs to write the corresponding code of function a and the corresponding code of function b, function a and function b respectively There are the duplicate code in part in corresponding code, after the method using the control household appliance of the embodiment of the present invention, will repeat Code section is extracted as api interface, and such function a and the duplicate code section of function b only need to write once.
In a specific application scenarios, it is a kind of control household appliance method functional block diagram as shown in figure 3, equipment Model is to provide the basis of Internet of Things common application, needs expert to participate in the common model for formulating certain class equipment jointly, provides specially Industry and stable model service.
Based on device model, to extract the data model of equipment, and stored and structuring.
Interface layer is towards concrete application, and the demand of comprehensive each specific business producing line takes out specific business Demand, to provide detailed interface API.
Infrastructure service provides simple and practical infrastructure service across several fields.Its flow chart is as shown in Figure 4.
Device model describes the common characteristic of each device type, including essential information, operation, attribute, alarm Deng;Using the uniform characteristics of model, implementation model driving exploitation increases the business value of system, reduces solution development Cost.It is automated by converting with the elimination implementation pattern of repeatability, improves the consistency and quality of solution.
The embodiment of the present invention is based on Mode-driven architecture, design pattern and mentions in conjunction with the framework experience and design experiences of many years Such a framework thinking based on device model out, and it is applied to production.
With the uniform characteristics of model, implementation model driving exploitation increases the business value of system, reduces solution development Cost.It is automated by converting with the elimination implementation pattern of repeatability, improves the consistency and quality of solution.
Embodiment three:
As shown in figure 5, the embodiment of the present invention provides a kind of device for controlling household appliance, comprising:
Conversion module 502 is converted for obtaining the device model of certain types of household appliance, and by the device model For corresponding data model;
Generation module 503, for generating the api interface that can be called by application program according to the data model, for The application program controls the certain types of household appliance by the api interface;Wherein, the application program is for controlling Make various types of household appliances.
As a specific embodiment of the present invention, the device of household appliance is controlled further include:
Judgment module 501, for judging whether the device model meets preset format specification, if so, will be described Standby model conversion is corresponding data model.
As a specific embodiment of the present invention, the conversion module 502 is specifically used for:
The device model of document form is converted to the data model of structured data form according to preset rules.
As a specific embodiment of the present invention, the device model includes: device model operation, device model category Property and device model alarm.
Example IV:
The embodiment of the present invention provides a kind of equipment for controlling household appliance, which is characterized in that the equipment includes: processing Device, memory and communication bus;
The communication bus is for realizing the connection communication between the processor and the memory;
The processor is used to execute the program of the control household appliance stored in the memory, to realize embodiment one Or control household appliance described in any one of embodiment two method the step of.
Processor can be general processor, such as central processing unit (Central Processing Unit, CPU), also It can be digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), or be arranged to implement the one or more of the embodiment of the present invention Integrated circuit.Wherein, memory is used to store the executable instruction of the processor;Memory, for storing program code, and The program code is transferred to processor.Memory may include volatile memory (Volatile Memory), such as at random It accesses memory (Random Access Memory, RAM);It also may include nonvolatile memory (Non-Volatile ), such as read-only memory (Read-Only Memory, ROM), flash memory (Flash Memory), hard disk Memory (Hard Disk Drive, HDD) or solid state hard disk (Solid-State Drive, SSD);It can also include depositing for mentioned kind The combination of reservoir.
Embodiment five:
The embodiment of the present invention also provides a kind of offer computer readable storage medium, and the computer readable storage medium is deposited Contain the program of control household appliance;
When the program of the control household appliance is executed by least one processor, lead at least one described processor The step of method of control household appliance described in any one of in execution embodiment one or embodiment two.
Storage medium such as hard disk, USB flash disk, disk etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of method for controlling household appliance, which is characterized in that the described method includes:
The device model of certain types of household appliance is obtained, and the device model is converted into corresponding data model;
The api interface that can be called by application program is generated, according to the data model so that the application program is described in Api interface controls the certain types of household appliance;Wherein, the application program is set for controlling various types of household electrical appliances It is standby.
2. the method for control household appliance according to claim 1, which is characterized in that be converted to by the device model Before corresponding data model, the method also includes:
Judge whether the device model meets preset format specification, if so, being corresponding number by the standby model conversion According to model.
3. the method for control household appliance according to claim 1, which is characterized in that described to convert the device model For corresponding data model, comprising:
The device model of document form is converted to the data model of structured data form according to preset rules.
4. the method for control household appliance according to claim 1, which is characterized in that the device model includes: equipment Model manipulation, device model attribute and device model alarm.
5. a kind of device for controlling household appliance, which is characterized in that described device includes:
Conversion module is converted to correspondence for obtaining the device model of certain types of household appliance, and by the device model Data model;
Generation module, for generating the api interface that can be called by application program according to the data model, for the application Program controls the certain types of household appliance by the api interface;Wherein, the application program is various types of for controlling The household appliance of type.
6. the device of control household appliance according to claim 5, which is characterized in that described device further include:
Judgment module, for judging whether the device model meets preset format specification, if so, the standby model is turned It is changed to corresponding data model.
7. the device of control household appliance according to claim 5, which is characterized in that the conversion module is specifically used for:
The device model of document form is converted to the data model of structured data form according to preset rules.
8. the device of control household appliance according to claim 5, which is characterized in that
The device model includes: device model operation, device model attribute and device model alarm.
9. a kind of equipment for controlling household appliance, which is characterized in that the equipment includes: processor, memory and communication bus;
The communication bus is for realizing the connection communication between the processor and the memory;
The processor is used to execute the program of the control household appliance stored in the memory, to realize Claims 1-4 Any one of described in control household appliance method the step of.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has control household electrical appliances The program of equipment;
When the program of the control household appliance is executed by least one processor, at least one described processor is caused to execute The step of method of control household appliance described in any one of Claims 1-4.
CN201910172174.9A 2019-03-07 2019-03-07 Control method, apparatus, equipment and the storage medium of household appliance Pending CN110008038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910172174.9A CN110008038A (en) 2019-03-07 2019-03-07 Control method, apparatus, equipment and the storage medium of household appliance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910172174.9A CN110008038A (en) 2019-03-07 2019-03-07 Control method, apparatus, equipment and the storage medium of household appliance

Publications (1)

Publication Number Publication Date
CN110008038A true CN110008038A (en) 2019-07-12

Family

ID=67166831

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910172174.9A Pending CN110008038A (en) 2019-03-07 2019-03-07 Control method, apparatus, equipment and the storage medium of household appliance

Country Status (1)

Country Link
CN (1) CN110008038A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352596A (en) * 2020-03-03 2020-06-30 广州致远电子有限公司 Method, device and equipment for driving micro printer and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569471A (en) * 2016-11-11 2017-04-19 上海电机学院 Wireless smart home controller
US20180131576A1 (en) * 2016-11-10 2018-05-10 Sap Se Thing modeler for internet of things
CN108173874A (en) * 2018-01-29 2018-06-15 海尔优家智能科技(北京)有限公司 A kind of intelligent device management method, platform, system, medium and equipment
CN108345449A (en) * 2017-12-25 2018-07-31 海尔优家智能科技(北京)有限公司 A kind of information processing method, device, storage medium and computer equipment
CN109343366A (en) * 2018-11-30 2019-02-15 上海上实龙创智慧能源科技股份有限公司 A kind of smart home configuration system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180131576A1 (en) * 2016-11-10 2018-05-10 Sap Se Thing modeler for internet of things
CN106569471A (en) * 2016-11-11 2017-04-19 上海电机学院 Wireless smart home controller
CN108345449A (en) * 2017-12-25 2018-07-31 海尔优家智能科技(北京)有限公司 A kind of information processing method, device, storage medium and computer equipment
CN108173874A (en) * 2018-01-29 2018-06-15 海尔优家智能科技(北京)有限公司 A kind of intelligent device management method, platform, system, medium and equipment
CN109343366A (en) * 2018-11-30 2019-02-15 上海上实龙创智慧能源科技股份有限公司 A kind of smart home configuration system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352596A (en) * 2020-03-03 2020-06-30 广州致远电子有限公司 Method, device and equipment for driving micro printer and storage medium
CN111352596B (en) * 2020-03-03 2024-03-29 广州致远电子股份有限公司 Micro printer driving method, apparatus, device and storage medium

Similar Documents

Publication Publication Date Title
CN110058856A (en) Page configuration method and device
CN107341109B (en) Test data generation method and system
CN105005532A (en) System for automatically testing stability of application program interface and method
CN103186457A (en) Method and device for automatically generating test case
CN104932480A (en) Automobile diagnostic system design method and apparatus
CN106201481A (en) Assembly management method and apparatus in application development system
CN107122175B (en) Interface creating method and device
CN108363684A (en) List creation method, device and server
CN111880904A (en) Method, system and related device for arranging virtualization platform resources
CN106886434A (en) A kind of Distributed Application installation method and device
CN109558380B (en) Method and system for processing engineering objects in an industrial automation environment
CN109447820A (en) Data processing method, device, computer equipment and storage medium
CN104133676A (en) Function execution method and function execution device based on scripts
CN105867944A (en) Web front-end terminal operating layer and implementing method thereof
US11315208B2 (en) Conceptual representation of business processes for cross-domain mapping
CN113794581B (en) Distributed CP unified deployment method, network equipment and storage medium
CN110008038A (en) Control method, apparatus, equipment and the storage medium of household appliance
CN106293658A (en) A kind of interface assembly generates method and equipment thereof
CN104239072B (en) The generation method and device of the program code of software
CN107832092A (en) Suitable for the software platform and processing method of individual demand
CN110163564B (en) Method, system and storage medium for generating item service based on item model
CN103561113A (en) Web Service interface generating method and device
CN103326957A (en) Browser and method for controlling flow of browser
CN116466915A (en) MVP architecture-based iOS development framework construction method and device
CN105824608B (en) Processing, plug-in unit generation method and the device of process object

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190712

RJ01 Rejection of invention patent application after publication