CN110347396B - System construction method, control method, device, control system and computing equipment - Google Patents

System construction method, control method, device, control system and computing equipment Download PDF

Info

Publication number
CN110347396B
CN110347396B CN201810290597.6A CN201810290597A CN110347396B CN 110347396 B CN110347396 B CN 110347396B CN 201810290597 A CN201810290597 A CN 201810290597A CN 110347396 B CN110347396 B CN 110347396B
Authority
CN
China
Prior art keywords
code
program
message
server
control
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.)
Active
Application number
CN201810290597.6A
Other languages
Chinese (zh)
Other versions
CN110347396A (en
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810290597.6A priority Critical patent/CN110347396B/en
Publication of CN110347396A publication Critical patent/CN110347396A/en
Application granted granted Critical
Publication of CN110347396B publication Critical patent/CN110347396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The embodiment of the application provides a system construction method, a control method, a device, a control system and computing equipment. The method comprises the steps of writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language; compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively, wherein the first server side program, the first message proxy program, the first control center program and the first user side program are deployed in corresponding equipment respectively to form a control system for controlling at least one electrical equipment; the technical scheme provided by the embodiment of the application reduces the development difficulty and the development cost and improves the development efficiency.

Description

System construction method, control method, device, control system and computing equipment
Technical Field
The embodiment of the application relates to the technical field of computer application, in particular to a system construction method, a control method, a system construction device, a control system and computing equipment.
Background
The intelligent home is an embodiment of the Internet of things under the influence of the Internet, various electrical equipment in the home are connected together through the Internet of things technology, and the living environment such as safety, convenience, comfort and the like is provided for a user by controlling the various electrical equipment.
In order to control electrical equipment in home conveniently, an intelligent home control system needs to be developed, but the development process of the existing intelligent home control system is complex, so that the development cost is high and the development time is slow.
Disclosure of Invention
The embodiment of the application provides a system construction method, a control method, a device and a control system, which are used for solving the technical problems of complex development process, high development cost and slow development time of a control system in the prior art.
In a first aspect, an embodiment of the present application provides a system construction method, including:
writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language;
compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively;
Deploying the first server program, the first message broker program, the first control center program and the first user end program into respective corresponding devices to form a control system;
the first control center program is used for connecting at least one electrical equipment and issuing first state information of each electrical equipment to a first message agency program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
Optionally, the first service end code, the first message proxy code, the first control center code and the first user end code are written in the same programming language;
generating a first service end initial code, a first message agent initial code, a first control center initial code and a first user end initial code by using a first pre-configured code framework;
And obtaining a first server side code, a first message proxy code, a first control center code and a first user side code based on modification operations or confirmation operations respectively aiming at the first server side initial code, the first message proxy initial code and the first user side initial code.
Optionally, writing the first service end code, the first message broker code, the first control center code and the first user end code in the same programming language includes:
based on the message queue telemetry transmission MQTT communication protocol, the first service end code, the first message proxy code, the first control center code and the first user end code are written by adopting the same programming language;
the first message agent program is respectively communicated with the first server program, the first user program and the first control center program according to the MQTT communication protocol.
Optionally, the method further comprises:
receiving a control demand for the at least one electrical device;
the writing of the first service end code, the first message proxy code, the first control center code and the first user end code by adopting the same programming language comprises the following steps:
and writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language based on the control requirement of the at least one electrical equipment.
Optionally, the first user end program is a web control page; the first service end program is a web service program;
the web control page is deployed in the same web server as the web service program, and the web server is used for providing the web control page to a web client.
In a second aspect, in an embodiment of the present application, a system construction method is provided, including:
writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language;
compiling the second server side code, the second message proxy code and the second user side code respectively to obtain a second server side program, a second message proxy program and a second user side program respectively;
deploying the second server program, the second message proxy program and the second user program to respective corresponding devices to form a control system;
the second message program is used for accessing at least one electrical equipment and receiving second state information respectively issued by the at least one electrical equipment; the second state information is used for being acquired by a second server program; the first user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the first control information is used for being acquired and executed by any one of the electrical equipment.
Optionally, the second server code, the second message proxy code and the second user code written in the same programming language;
generating a server initial code, a message proxy initial code and a user initial code by using a pre-configured code framework;
and obtaining a second server side code, a second message proxy code and a second user side code based on modification operation or confirmation operation respectively aiming at the server side initial code, the message proxy initial code and the user side initial code.
Optionally, writing the second service end code, the second message proxy code and the second user end code in the same programming language includes:
based on the MQTT communication protocol, writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language;
the second message agent program is respectively communicated with the second server program, the second user program and the at least one electrical device according to the MQTT communication protocol.
Optionally, the method further comprises:
receiving a control demand for the at least one electrical device;
the writing the second service end code, the second message proxy code and the second user end code by adopting the same programming language comprises the following steps:
And writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language based on the control requirement of the at least one electrical equipment.
Optionally, the second user side program is a web control page; the second server program is a web service program;
the web control page is deployed in the same web server as the web service program, and the web server is used for providing the web control page to a web client.
In a third aspect, a control system is provided in an embodiment of the present application, including a first server, a first message broker device, a first control center device, and a first user device that are developed using the same programming language; wherein, at least one electrical equipment is connected with the first control center equipment through a local area network;
the first server is used for acquiring the respective state information of the at least one electrical equipment issued by the first control center equipment from the first message proxy equipment;
the first message proxy device is configured to receive first status information of each of the at least one electrical device issued by the first control center device; receiving first control information issued by the first user equipment aiming at any electrical equipment;
The first user equipment is used for acquiring first state information of any electrical equipment from the first server; issuing first control information for any one of the electrical equipment to the first message broker equipment;
the first control center device is used for receiving the first state information sent by the at least one electrical device respectively and issuing the first state information of the at least one electrical device to the first message proxy device; acquiring the first control information issued by the first user equipment from the first message proxy equipment; and sending the first control information to any one of the electrical equipment so that the any one of the electrical equipment can execute control operation according to the first control information.
Optionally, the first server is further configured to determine, according to the second status information of each of the at least one electrical apparatus, whether the at least one electrical apparatus meets the corresponding processing condition; issuing a corresponding first processing instruction to the first message proxy equipment aiming at first target electrical equipment meeting corresponding processing conditions;
the first control center device is further configured to obtain a processing instruction corresponding to the first target electrical device from the first message proxy device, and send the first processing instruction to the first target electrical device, so that the first target electrical device executes the first processing instruction to implement corresponding control processing.
Optionally, the first server is a web server, and provides a web control page;
the first user equipment acquires first state information of any electrical equipment from the first server by running the web control page; and issuing first control information aiming at any electrical equipment to the first message proxy equipment.
Optionally, the first message proxy device establishes communication connection with the first control center device, the first user device and the first server based on MQTT communication protocol.
Optionally, the first control center device is a Ruff-based electronic device.
In a fourth aspect, in an embodiment of the present application, a control system is provided, including a second server, a second message broker device, and a second user device that are developed using the same programming language; wherein the second message broker device is connected to at least one electrical device;
the second message proxy equipment is used for receiving second state information respectively issued by the at least one electrical equipment; receiving second control information issued by the second user equipment aiming at any electrical equipment;
the second server is used for acquiring second state information respectively issued by the at least one electrical equipment from the second message proxy equipment;
The second user equipment is used for acquiring second state information of any electrical equipment from the server; and issuing second control information aiming at any one of the electrical equipment to the second message proxy equipment so that the any one of the electrical equipment can acquire the second control information from the second message proxy equipment, and executing control operation according to the second control information.
Optionally, the second server is further configured to determine, according to the second status information of each of the at least one electrical apparatus, whether the at least one electrical apparatus meets the corresponding processing condition; and for the second target electrical equipment meeting the corresponding processing conditions, issuing a corresponding second processing instruction to the second message proxy equipment so that the second target electrical equipment obtains the second processing instruction from the second message proxy equipment and executes the second processing instruction.
Optionally, the second server is a web server, and provides a web control page;
the second user equipment acquires second state information of any electrical equipment from the second server by running the web control page; and issuing second control information aiming at any electrical equipment to the message proxy equipment.
Optionally, the second message proxy device establishes communication connection with the at least one electrical device, the second user device and the second server based on MQTT communication protocol.
In a fifth aspect, in an embodiment of the present application, a control method is provided, where the control method is applied to a control system developed in the same programming language, and the method includes:
the method comprises the steps that a first control center device obtains respective state information of at least one electrical device and issues the respective state information of the at least one electrical device to a first message agency device;
the first server acquires respective state information of the at least one electrical equipment from the first message proxy equipment;
the first user equipment acquires state information of any one of the electrical equipment from the first server side and transmits first control information aiming at the any one of the electrical equipment to the first message proxy equipment;
the first control center device obtains the first control information from the first message proxy device and sends the first control information to any one of the electrical equipment for the any one of the electrical equipment to obtain and execute.
In a sixth aspect, in an embodiment of the present application, a control method is provided, where the control method is applied to a control system developed in the same programming language, and the method includes:
The second message proxy equipment receives second state information respectively issued by at least one electrical equipment;
a second server acquires respective state information of the at least one electrical equipment from the second message proxy equipment;
and the second user equipment acquires the state information of any electrical equipment from the second service end, and distributes second control information aiming at any electrical equipment to the second message proxy equipment so as to be acquired and executed by any electrical equipment.
In a seventh aspect, in an embodiment of the present application, there is provided a system building apparatus, including:
the first code determining module is used for compiling a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language based on the control requirement of at least one electrical equipment;
the first code compiling module is used for compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively;
The first system construction module is used for deploying the first server program, the first message agent program, the first control center program and the first user end program into respective corresponding devices so as to form a control system;
the first control center program is used for connecting at least one electrical equipment and issuing first state information of each electrical equipment to a first message agency program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
In an eighth aspect, in an embodiment of the present application, there is provided a system building apparatus, including:
the second code determining module is used for compiling a second service end code, a second message proxy code and a second user end code by adopting the same programming language based on the control requirement of at least one electrical equipment;
The second code compiling module is used for compiling the second service end code, the second message agency code and the second user end code respectively so as to obtain a second service end program, a second message agency program and a second user end program respectively;
the second system construction module is used for deploying the second server program, the second message proxy program and the second user program into respective corresponding devices so as to form a control system;
the second message program is used for accessing at least one electrical equipment and receiving second state information respectively issued by the at least one electrical equipment; the second state information is used for being acquired by a second server program; the first user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the first control information is used for being acquired and executed by any one of the electrical equipment.
In a ninth aspect, embodiments of the present application provide a computing device, including a storage component and a processing component;
the storage component stores one or more computer program instructions for the processing component to call and execute;
The processing assembly is configured to:
writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language;
compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively;
deploying the first server program, the first message broker program, the first control center program and the first user end program into respective corresponding devices to form a control system;
the first control center program is used for connecting at least one electrical equipment and issuing first state information of each electrical equipment to a first message agency program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
In a tenth aspect, embodiments of the present application provide a computing device including a storage component and a processing component;
the storage component stores one or more computer program instructions for the processing component to call and execute;
the processing assembly is configured to:
writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language;
compiling the second server side code, the second message proxy code and the second user side code respectively to obtain a second server side program, a second message proxy program and a second user side program respectively;
deploying the second server program, the second message broker program and the second client program into respective devices to form a control system;
the second message program is used for accessing at least one electrical equipment and receiving second state information respectively issued by the at least one electrical equipment; the second state information is used for being acquired by a second server program; the first user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the first control information is used for being acquired and executed by any one of the electrical equipment.
In the embodiment of the application, the first service end code, the first message proxy code, the first control center code and the first user end code are written by adopting the same programming language; compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively, wherein the first server side program, the first message proxy program, the first control center program and the first user side program are deployed in corresponding equipment respectively to form a control system for controlling at least one electrical equipment; the technical scheme provided by the embodiment of the application reduces the development difficulty and the development cost and improves the development efficiency.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a flow chart of one embodiment of a system construction method provided herein;
FIG. 2 illustrates a schematic diagram of one embodiment of a control system provided herein;
FIG. 3 illustrates a flow chart of yet another embodiment of a system construction method provided herein;
FIG. 4 is a schematic diagram of a control system according to another embodiment of the present application;
FIG. 5 illustrates a flow chart of one embodiment of a control method provided herein;
FIG. 6 illustrates a flow chart of yet another embodiment of a control method provided herein;
FIG. 7 is a schematic diagram illustrating the construction of one embodiment of a system building apparatus provided herein;
FIG. 8 illustrates a schematic diagram of one embodiment of a computing device provided herein;
FIG. 9 is a schematic diagram showing the construction of a further embodiment of a system building apparatus provided herein;
fig. 10 illustrates a schematic diagram of a configuration of yet another embodiment of a computing device provided herein.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application.
In some of the flows described in the specification and claims of this application and in the foregoing figures, a number of operations are included that occur in a particular order, but it should be understood that the operations may be performed in other than the order in which they occur or in parallel, that the order of operations such as 101, 102, etc. is merely for distinguishing between the various operations, and that the order of execution is not by itself represented by any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
The technical scheme of the embodiment of the application can be applied to an application scene of controlling at least one electrical equipment, for example, controlling at least one electrical equipment in a residence, so as to realize the purpose of intelligent home.
Taking an intelligent home control system as an example, the current intelligent home control system is generally composed of a server side and a user side, and is built by adopting a traditional embedded technology and a server side technology, for example, the server side generally adopts java language to develop a server side program, and the user side relates to an app (application program).
In order to save development cost, improve development efficiency and simplify development of a control system, the inventor provides a technical scheme of the application through a series of researches, and in the embodiment of the application, a server side code, a message agency code, a control center code and a user side code are written by adopting the same programming language; compiling the server side code, the message proxy code, the control center code and the user side code respectively to obtain a server side program, a message proxy program, a control center program and a user side program respectively; the server program, the message broker program, the control center program and the user program are deployed to respective corresponding devices to form a control system, wherein the first control center program is used for connecting at least one electrical device and publishing respective first state information of the at least one electrical device to the first message broker program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and the electrical equipment is used for the first control center program. The control system service end and the hardware end provided by the embodiment of the application are developed and obtained by adopting the same program language, the technical stack is unified, the development difficulty is reduced, the development efficiency can be improved, a developer can quickly get on hand, and the development cost is reduced.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Fig. 1 is a flowchart of an embodiment of a system construction method provided in an embodiment of the present application, where the method may include the following steps:
101: the first service end code, the first message proxy code, the first control center code and the first user end code are written in the same programming language.
Alternatively, the same programming language may be JavaScript.
The code may be written by a developer, but may be implemented in other ways, which will be described in detail in the following embodiments.
Alternatively, the first service side code, the first message broker code, the first control center code and the first user side code may be written in the same programming language based on the control requirements of the at least one electrical device.
Thus, the method may further comprise:
a control demand for the at least one electrical device is received. Therefore, the control system built by the embodiment of the application can realize the control requirement on at least one electrical equipment.
102: compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively.
The first server code, the first message proxy code, the first control center code and the first user code are all source codes, and are required to be compiled and converted into target codes, namely machine languages, so that equipment can be conveniently identified and operated.
Because the first service end code, the first message proxy code, the first control center code and the first user end code are all written in the same programming language, the same compiler can be used for compiling, cross compiling is avoided, and development efficiency is greatly improved.
103: and deploying the first server program, the first message agency program, the first control center program and the first user end program to respective corresponding devices.
Thus, a control system can be constructed based on the corresponding devices of the first service end program, the first message broker program, the first control center program and the first user end program; the control system may include at least devices for deploying a first server program, the first message broker program, the first control center program, and the first client program, respectively.
The first server program, the first message broker program, the first control center program and the first user program run in respective corresponding devices, so that the first control center program can be connected with at least one electrical device, and issue respective first state information of the at least one electrical device to the first message broker program; the first status information is sent to be acquired by the first service end program; the first user end program can acquire first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
The first state information may include an operation state, for example, start-up, shutdown, dormancy, or failure, and collected environmental data, for example, including temperature, humidity, or light intensity.
The first control information may be user-triggered, and include a control instruction, and the electrical apparatus may implement automatic control by executing the control instruction, for example, starting operation.
The first client program may also acquire the first status information of any electrical appliance from the first server program based on a user request.
In addition, the first service end program may further perform data analysis on the respective first status information of at least one electrical apparatus, determine whether the at least one electrical apparatus meets respective corresponding processing conditions, and issue a corresponding processing instruction to a first message broker program for a first target electrical apparatus that meets the corresponding processing conditions, where the first control center program may acquire and send the processing instruction to the first target electrical apparatus, so that the first target electrical apparatus executes the processing instruction to implement control processing on the first target electrical apparatus.
The first status information may for example comprise temperature data, the processing conditions may for example be that the temperature data is higher than a set threshold value or the like.
The control process for the electrical equipment is the same as that in the prior art, and will not be described herein.
Because the first service end program, the first message broker program, the first control center program, and the first user end program are used to realize the control requirement on at least one electrical device, for example, when the at least one electrical device is a home device, that is, for the purpose of smart home, in order to further improve the development efficiency and reduce the development cost and the development difficulty, in some embodiments, writing the first service end code, the first message broker code, the first control center code, and the first user end code in the same programming language may include:
generating a server side initial code, a message proxy initial code, a control center initial code and a user side initial code by utilizing a pre-configured code framework;
and obtaining a first server side code, a first message proxy code, a first control information code and a first user side code based on modification operations or confirmation operations respectively aiming at the server side initial code, the message proxy initial code, the control center initial code and the user side initial code.
The preconfigured code framework can be obtained by preconfiguring based on control requirements of at least one electrical device, and can comprise a preconfigured service side initial code, a message agency initial code, a first control center code and a user side initial code.
Alternatively, the service side initial code, the message proxy initial code, the first control center code, or the user side initial code may be used as the first service side code, the first message proxy code, the first control information code, and the first user side code, respectively.
In addition, the developer can modify the server side initial code, the message proxy initial code, the first control center code or the user side initial code based on development requirements to obtain a first server side code, a first message proxy code, a first control information code and a first user side code.
Therefore, the first server side code, the first message proxy code, the first control information code and the first user side code can be obtained based on the modification operation or the confirmation operation for the server side initial code, the message proxy initial code, the control center initial code and the user side initial code, respectively.
In order to reduce the communication cost and reduce the operation overhead, in some embodiments, the writing the first service end code, the first message broker code, the first control center code, and the first user end code in the same programming language includes:
Based on an MQTT (Message Queuing Telemetry Transport, message queue telemetry transmission) communication protocol, writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language;
therefore, the first message agent program can respectively communicate with the first server program, the first user program and the first control center program according to the MQTT communication protocol.
The first message broker is the MQTT broker.
MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol), a "lightweight" communication protocol based on publish/subscribe (TCP/IP) mode, built on TCP/IP (Transmission Control Protocol/Internet Protocol ) protocols. The biggest advantage of MQTT is that it can provide real-time reliable messaging services to connected remote devices with very little code and limited bandwidth. As an instant messaging protocol with low cost and low bandwidth occupation, the method has wider application in the aspects of Internet of things, small-sized equipment, mobile application and the like.
The MQTT is an instant messaging protocol with limited weight, simplicity, openness, ease of implementation, etc., and small transmission, with little overhead (2 bytes for fixed length header), and minimal protocol exchanges to reduce network traffic. In which one-to-many message publication is provided in a publish/subscribe message mode.
In practical application, a first service end program is deployed in corresponding equipment to obtain a server; the first message agent program is deployed in the corresponding equipment to obtain message agent equipment; the first control center program is deployed in its corresponding device to obtain a control center device. In practical application, the control center device and at least one electrical device can be deployed in the same local area network, and can be used as a routing device for connecting at least one electrical device and accessing the internet.
Alternatively, the first client program may be an app, and the first client program is specifically configured to be downloaded and installed by the user device, and implement a corresponding function with the first client program.
Alternatively, the first client program may be a web (web page) control page, so that the first client program is deployed in the same web server as the first server program, and the web server is configured to provide the web control page to the web client.
The web client may be, for example, a browser (browser) as a presentation tool for web control pages.
When the first user-side program is a web control page, javaScript development is adopted, the web control page is used as a control display layer, and the web page development can provide rich UI components, so that the display form of the web control page can be enriched.
Corresponding to the system construction method provided in fig. 1, the embodiment of the present application further provides a control system, as shown in fig. 2, where the control system may include a first server 201, a first message broker device 202, a first control center device 203, and a first user device 204 that are developed using the same programming language; wherein at least one electrical device 205 is connected to the first control center device 203 through a local area network;
the first control center device 203 may have a routing function, at least one electrical device 205 and the first control center device 203 are located in the same local area network, and the first server 201 and the first message broker device 202 may be deployed at a network end through the first control center device 203 accessing the internet.
In practical applications, the control system may be an intelligent home control system, and the at least one electrical device may be a home device, such as a refrigerator, a television, an air conditioner, a washing machine, a microwave oven, a curtain control device, and the like.
The first server 201 is configured to obtain, from the first message broker device 202, first status information of each of the at least one electrical device issued by the first control center device 203;
the first message broker device 202 is configured to receive first status information of each of the at least one electrical device 205 issued by the first control center device 203; receiving first control information issued by the first user equipment aiming at any electrical equipment;
the first user device 204 is configured to obtain first status information of any electrical device 205 from the first server 201; issuing first control information for the any one of the appliances 205 to the first message broker device 202;
the first control center device 203 is configured to receive first status information sent by the at least one electrical device 205, and issue the first status information of each of the at least one electrical device 205 to the first message broker device 202; acquiring first control information, issued by the first user equipment, for any one of the electrical appliances 205 from the first message broker device 202; the first control information is sent to the any one of the electrical apparatuses 205, so that the any one of the electrical apparatuses 205 obtains the first control information from the first message broker apparatus 202, and performs a control operation according to the first control information.
Optionally, the first server is further configured to determine, according to the first status information of each of the at least one electrical apparatus, whether the at least one electrical apparatus meets the corresponding processing condition; issuing a corresponding first processing instruction to a first message proxy device aiming at a first target electrical device meeting corresponding processing conditions;
the first control center device is further configured to obtain a first processing instruction corresponding to the first target electrical device from the first message broker device; and sending the first processing instruction to the first target electrical equipment so that the first target electrical equipment executes the first processing instruction to realize corresponding control processing.
In addition, the first server may further perform big data analysis based on the respective status information of the at least one electrical apparatus, and send the analysis result to the first user equipment.
In an actual application, the first server is a web server and provides a web control page; the first user equipment acquires first state information of any electrical equipment from the first server by running the web control page; and issuing first control information aiming at any electrical equipment to the first message proxy equipment.
Specifically, the first user equipment may run the web control page, and issue the first control information for any one of the electrical apparatuses to the first message broker equipment in response to a control request triggered by the user through the web control page.
In some embodiments, the first message broker device may establish a communication connection with the first control center device, the first user device, and the first server, respectively, based on an MQTT communication protocol.
The first message proxy device is an MQTT reader device.
The first control center device may publish the respective first status information of the at least one electrical device to a first subscription topic, and the first server may obtain the respective first status information of the at least one electrical device by monitoring the first subscription topic at the first message broker device.
The first user equipment can publish first control information aiming at any one piece of electrical equipment to a second subscription theme; the first control center device can obtain the first control information aiming at any one of the electrical equipment by monitoring the second subscription theme.
The MQTT is adopted for communication, and the protocol is concise, small and exquisite and has strong expandability, so that the flow and the electric quantity can be saved, and the performance of each device can be improved.
Alternatively, the same programming language may be JavaScript.
The first control center device may be a Ruff-based electronic device, where Ruf is an operating system supporting JavaScript development applications, which may provide a JavaScript runtime environment, designed specifically for hardware development. The method abstracts hardware, uses an event-driven asynchronous I/O-based model, enables hardware development to become light and efficient, and can adopt JavaScript as a development language.
If at least one electrical device is an intelligent device, the intelligent device can be connected with the Internet autonomously, and can communicate with the server by adopting a corresponding communication protocol, and a control center device can be omitted.
Thus, as shown in fig. 3, a flowchart of yet another embodiment of a system building method according to an embodiment of the present application may include the following steps:
301: and writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language.
Alternatively, the same programming language may be JavaScript.
The code may be written by a developer, but may be implemented in other ways, which will be described in detail in the following embodiments.
Optionally, the second service end code, the second message broker code, the second control center code and the second user end code may be written in the same programming language based on the control requirements of the at least one electrical device.
Thus, the method may further comprise:
a control demand for the at least one electrical device is received. Therefore, the control system built by the embodiment of the application can realize the control requirement on at least one electrical equipment.
302: and compiling the second server side code, the second message proxy code and the second user side code respectively to obtain a second server side program, a second message proxy program and a second user side program respectively.
303: and deploying the second server program, the second message proxy program and the second user program into respective devices to form a control system.
The control system may at least include the second server program, the second message broker program, and the second client program respectively corresponding to the devices.
The second server program, the second message agent program and the second user program run in respective corresponding devices, so that the second message program can be connected to at least one electrical device and receive second state information respectively issued by the at least one electrical device; the second state information is used for being acquired by a second server program; the first user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the first control information is used for being acquired and executed by any one of the electrical equipment.
The second state information may include an operation state, for example, start-up, shutdown, sleep, or failure, and collected environmental data, for example, including temperature, humidity, or light intensity.
The second control information may be user-triggered, and include a control instruction, and the electrical apparatus may implement automatic control by executing the control instruction, for example, starting operation.
In addition, the second server program may further perform data analysis on the second status information of each of the at least one electrical apparatus, determine whether the at least one electrical apparatus meets the corresponding processing condition, and issue a corresponding second processing instruction to the second message broker program for the target electrical apparatus that meets the corresponding processing condition, where the target electrical apparatus may obtain the second processing instruction from the second message broker program, and implement control processing on the target electrical apparatus by executing the second processing instruction.
The second state information may for example comprise temperature data, the processing conditions may for example be that the temperature data is higher than a set threshold value or the like.
In order to further improve the development efficiency and reduce the development cost and development difficulty, in some embodiments, writing the second service side code, the second message broker code, and the second user side code in the same programming language may include:
Generating a server initial code, a message proxy initial code and a user initial code by using a pre-configured code framework;
and obtaining a second server side code, a second message proxy code and a second user side code based on modification operation or confirmation operation respectively aiming at the server side initial code, the message proxy initial code and the user side initial code.
The preconfigured code framework can be obtained by preconfiguring based on control requirements of at least one electrical device, and can comprise a preconfigured service side initial code, a message agent initial code and a user side initial code.
Alternatively, the server side initial code, the message proxy initial code or the client side initial code may be used as the second server side code, the second message proxy code and the second client side code respectively corresponding to each other.
In addition, the developer can modify the server initial code, the message proxy initial code or the user initial code based on development requirements to obtain a second server code, a second message proxy code, a second control information code and a second user code.
Therefore, the second server side code, the second message proxy code, the second control information code and the second user side code can be obtained based on the modification operation or the confirmation operation for the server side initial code, the message proxy initial code and the user side initial code, respectively.
In order to reduce the communication cost and reduce the operation overhead, in some embodiments, the writing the second service side code, the second message proxy code, the control center code and the second user side code using the same program language includes:
based on an MQTT (Message Queuing Telemetry Transport, message queue telemetry transmission) communication protocol, writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language;
so that the second message broker program can communicate with the second server program, the second client program and the at least one electrical device according to the MQTT communication protocol, respectively.
The second message broker is the MQTT broker.
The MQTT is adopted for communication, and the protocol is concise, small and exquisite and has strong expandability, so that the flow and the electric quantity can be saved, and the performance of each device can be improved.
Furthermore, in certain embodiments, the method may further comprise:
and deploying the second server program, the second message proxy program and the second user program into respective corresponding devices, so as to obtain a control system.
The second server program is deployed in the corresponding equipment to obtain a server; the second message broker deployment obtains the message broker device in its corresponding device.
As an alternative, the second client program may be an app, and the second client program is specifically configured to be downloaded and installed by the user device, and implement the corresponding function with the second client program.
Alternatively, the second client program may be a web control page, so that the second client program and the second server program are deployed in the same server, and the server is configured to provide the web control page by using the user device.
Wherein a web client, such as a browser, may be run in the user device as a presentation tool for web control pages.
When the second user side program is a web control page, javaScript development is adopted, the web control page is used as a control display layer, and the web page development can provide rich UI components, so that the display form of the web control page can be enriched.
Corresponding to the system construction method provided in fig. 3, the embodiment of the present application further provides a control system, as shown in fig. 4, which is a schematic structural diagram of another embodiment of the control system provided in the embodiment of the present application, where the system may include a second server 401, a second message broker device 402, and a second user device 403 that are developed in the same programming language; wherein the second message broker device 402 is connected to at least one electrical device 404.
In practical applications, the control system may be an intelligent home control system, and the at least one electrical device may be a home device, such as a refrigerator, a television, an air conditioner, or the like.
The second message broker device 402 is configured to receive second status information respectively issued by the at least one electrical device 404; receiving second control information issued by the second user equipment 403 for any electrical equipment;
the second server 401 is configured to obtain, from the second message broker device 402, second status information respectively issued by the at least one electrical device 404;
the second user device 403 is configured to obtain second status information of any electrical device 404 from the server 401; and issuing second control information for any one of the electrical equipment 404 to the second message broker equipment 402, so that the any one of the electrical equipment 404 monitors and obtains the second control information from the second message broker equipment 402, and executes control operation according to the second control information.
Optionally, the second server is further configured to determine, according to the second status information of each of the at least one electrical apparatus, whether the at least one electrical apparatus meets the corresponding processing condition; and for the second target electrical equipment meeting the corresponding processing conditions, issuing a corresponding second processing instruction to the second message proxy equipment so that the second target electrical equipment obtains the second processing instruction from the second message proxy equipment and executes the second processing instruction.
In addition, the second server may further perform big data analysis based on the respective status information of the at least one electrical apparatus, and send the analysis result to the second user equipment.
In an actual application, the second server is a web server and provides a web control page;
the second user equipment acquires second state information of any electrical equipment from the second server by running the web control page; and issuing second control information aiming at any electrical equipment to the message proxy equipment.
Specifically, the second user equipment may run the web control page, and issue second control information for any one of the electrical apparatuses to the second message broker equipment in response to a control request triggered by the user through the web control page.
The second user equipment runs the web control page through a web client, the web client can be a browser, and the second user equipment can be portable equipment such as a mobile phone and a tablet personal computer.
In some embodiments, the second message broker device may establish a communication connection with the at least one appliance device, the user device, and the server, respectively, based on an MQTT communication protocol.
The second message proxy device is an MQTT reader device.
The at least one electrical device may send the respective second status information to the corresponding subscription topics, and the first server may obtain the respective second status information of the at least one electrical device from the subscription topics by monitoring the subscription topics.
The second user equipment can also publish second control information for any one of the electrical equipment to the corresponding subscription topic, and the any one of the electrical equipment can monitor and obtain the second control information by subscribing to the subscription topic.
The MQTT is adopted for communication, and the protocol is concise, small and exquisite and has strong expandability, so that the flow and the electric quantity can be saved, and the performance of each device can be improved.
Alternatively, the same programming language may be JavaScript.
Corresponding to the control system shown in fig. 2, the embodiment of the present application further provides a control method, as shown in fig. 5, which may include the following steps:
501: the first control center device obtains respective state information of at least one electrical device, and issues the respective state information of the at least one electrical device to the first message broker device.
502: the first server obtains respective status information of the at least one electrical device from the first message broker device.
503: the first user equipment acquires the state information of any one of the electrical equipment from the first server side and transmits first control information aiming at any one of the electrical equipment to the first message proxy equipment.
504: the first control center device obtains the first control information from the first message proxy device and sends the first control information to any one of the electrical equipment for the any one of the electrical equipment to obtain and execute.
Corresponding to the control system shown in fig. 4, the embodiment of the present application further provides a control method, as shown in fig. 6, which may include the following steps:
601: the second message broker device receives second status information respectively issued by the at least one electrical device.
602: and the second server acquires the respective state information of the at least one electrical equipment from the second message proxy equipment.
603: and the second user equipment acquires the state information of any electrical equipment from the second service end, and distributes second control information aiming at any electrical equipment to the second message proxy equipment so as to be acquired and executed by any electrical equipment.
Fig. 7 is a schematic structural diagram of an embodiment of a system building apparatus provided in an embodiment of the present application, where the apparatus may include:
A first code determining module 701, configured to write a first service end code, a first message broker code, a first control center code, and a first user end code in the same programming language based on a control requirement for at least one electrical device;
a first code compiling module 702, configured to compile the first server code, the first message broker code, the first control center code, and the first client code, respectively, to obtain a first server program, a first message broker program, a first control center program, and a first client program, respectively;
a first system building module 703, configured to deploy the first server program, the first message broker program, the first control center program, and the first client program to respective corresponding devices, so as to form a control system;
the first control center program is used for connecting at least one electrical equipment and issuing first state information of each electrical equipment to a first message agency program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
In some embodiments, the first code determining module is specifically configured to generate a first service side initial code, a first message proxy initial code, a first control center initial code, and a first user side initial code by using a first preconfigured code framework;
and obtaining a first server side code, a first message proxy code, a first control center code and a first user side code based on modification operations or confirmation operations respectively aiming at the first server side initial code, the first message proxy initial code and the first user side initial code.
In some embodiments, the first code determining module is specifically configured to write the first service end code, the first message broker code, the first control center code, and the first user end code in the same programming language based on the MQTT communication protocol;
the first message agent program is respectively communicated with the first server program, the first user program and the first control center program according to the MQTT communication protocol.
In some embodiments, the first client program is a web control page; the first service end program is a web service program;
the web control page and the web service program are deployed in the same server, and the server is used for providing the web control page by user equipment.
Alternatively, the same programming language may be JavaScript.
In one possible design, the system building apparatus of the embodiment shown in fig. 7 may be implemented as a computing device, which may include a storage component 801 and a processing component 802, as shown in fig. 8;
the storage component 801 stores one or more computer program instructions for the processing component to call and execute;
the processing component 802 is configured to:
writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language;
compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively;
deploying the first server program, the first message broker program, the first control center program and the first user end program into respective corresponding devices to form a control system;
the first control center program is used for connecting at least one electrical equipment and issuing first state information of each electrical equipment to a first message agency program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
Wherein the processing component 802 may include one or more processors to execute computer instructions to perform all or part of the steps in the methods described above. Of course, the processing component may also be implemented as one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the methods described above.
The storage component 801 is configured to store various types of data to support operations at the computing device. The memory component may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
Of course, the computing device may necessarily include other components, such as input/output interfaces, communication components, and so forth, which are not described in detail herein.
The embodiment of the application further provides a computer readable storage medium, and a computer program is stored, and when the computer program is executed by a computer, the system construction method of the embodiment shown in fig. 1 can be realized.
Fig. 9 is a schematic structural diagram of another embodiment of a system building apparatus provided in an embodiment of the present application, where the apparatus may include:
a second code determining module 901, configured to write a second service end code, a second message proxy code, and a second user end code in the same programming language based on a control requirement for at least one electrical device;
a second code compiling module 902, configured to compile the second server code, the second message broker code, and the second client code, respectively, so as to obtain a second server program, a second message broker program, and a second client program, respectively;
the second system construction module is used for deploying the second server program, the second message proxy program and the second user program into respective corresponding devices so as to form a control system;
the second message program is used for accessing at least one electrical equipment and receiving second state information respectively issued by the at least one electrical equipment; the second state information is used for being acquired by a second server program; the first user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the first control information is used for being acquired and executed by any one of the electrical equipment.
In some embodiments, the second code determining module may be specifically configured to generate a server side initial code, a message broker initial code, and a user side initial code using a preconfigured code framework;
and obtaining a second server side code, a second message proxy code and a second user side code based on modification operation or confirmation operation respectively aiming at the server side initial code, the message proxy initial code and the user side initial code.
In some embodiments, the second code determining module may be specifically configured to write the second server side code, the second message broker code, and the second client code in the same programming language based on the MQTT communication protocol;
the second message agent program is respectively communicated with the second server program, the second user program and the at least one electrical device according to the MQTT communication protocol.
In some embodiments, the second client program is a web control page; the second server program is a web service program;
the web control page is deployed in the same server as the web service program, and the server is used for providing the web control page to a web client.
Alternatively, the same programming language may be JavaScript.
In one possible design, the system building apparatus of the embodiment shown in fig. 9 may be implemented as a computing device, which may include a storage component 1001 and a processing component 1002 as shown in fig. 10;
the storage component 1001 stores one or more computer program instructions for the processing component to call and execute;
the processing component 1002 is configured to:
based on the control requirement for at least one electrical equipment, writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language;
compiling the second server side code, the second message proxy code and the second user side code respectively to obtain a second server side program, a second message proxy program and a second user side program respectively;
deploying the second server program, the second message broker program and the second client program into respective devices to form a control system;
the second message program is used for accessing at least one electrical equipment and receiving second state information respectively issued by the at least one electrical equipment; the second state information is used for being acquired by a second server program; the first user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the first control information is used for being acquired and executed by any one of the electrical equipment.
Wherein the processing component 1002 can include one or more processors to execute computer instructions to perform all or part of the steps in the methods described above. Of course, the processing component may also be implemented as one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the methods described above.
The storage component 1001 is configured to store various types of data to support operations at a computing device. The memory component may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
Of course, the computing device may necessarily include other components, such as input/output interfaces, communication components, and so forth, which are not described in detail herein.
The embodiment of the application further provides a computer readable storage medium, and a computer program is stored, and when the computer program is executed by a computer, the system construction method of the embodiment shown in fig. 3 can be realized.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (18)

1. A system construction method, comprising:
writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language;
compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively;
deploying the first server program, the first message broker program, the first control center program and the first user end program into respective corresponding devices to form a control system;
The first control center program is used for connecting at least one electrical equipment and issuing first state information of each electrical equipment to a first message agency program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
2. The method of claim 1, wherein the first service side code, the first message broker code, the first control center code, and the first user side code are written in the same programming language;
generating a first service end initial code, a first message agent initial code, a first control center initial code and a first user end initial code by using a first pre-configured code framework;
and obtaining a first server side code, a first message proxy code, a first control center code and a first user side code based on modification operations or confirmation operations respectively aiming at the first server side initial code, the first message proxy initial code and the first user side initial code.
3. The method of claim 1, wherein writing the first service side code, the first message broker code, the first control center code, and the first user side code in the same programming language comprises:
based on the message queue telemetry transmission MQTT communication protocol, the first service end code, the first message proxy code, the first control center code and the first user end code are written by adopting the same programming language;
the first message agent program is respectively communicated with the first server program, the first user program and the first control center program according to the MQTT communication protocol.
4. The method as recited in claim 1, further comprising:
receiving a control demand for the at least one electrical device;
the writing of the first service end code, the first message proxy code, the first control center code and the first user end code by adopting the same programming language comprises the following steps:
and writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language based on the control requirement of the at least one electrical equipment.
5. The method of claim 1, wherein the first client program is a web page control page; the first service end program is a web service program;
The web control page is deployed in the same web server as the web service program, and the web server is used for providing the web control page to a web client.
6. A system construction method, comprising:
writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language;
compiling the second server side code, the second message proxy code and the second user side code respectively to obtain a second server side program, a second message proxy program and a second user side program respectively;
deploying the second server program, the second message proxy program and the second user program to respective corresponding devices to form a control system;
the second message agent program is used for accessing at least one electrical equipment and receiving second state information respectively issued by the at least one electrical equipment; the second state information is used for being acquired by a second server program; the second user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the second control information is used for being acquired and executed by any one of the electrical equipment.
7. The method of claim 6, wherein the second server code, the second message broker code, and the second client code are written in the same programming language;
generating a server initial code, a message proxy initial code and a user initial code by using a pre-configured code framework;
and obtaining a second server side code, a second message proxy code and a second user side code based on modification operation or confirmation operation respectively aiming at the server side initial code, the message proxy initial code and the user side initial code.
8. The method of claim 6, wherein writing the second server code, the second message broker code, and the second client code in the same programming language comprises:
based on the MQTT communication protocol, writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language;
the second message agent program is respectively communicated with the second server program, the second user program and the at least one electrical device according to the MQTT communication protocol.
9. The method as recited in claim 6, further comprising:
Receiving a control demand for the at least one electrical device;
the writing the second service end code, the second message proxy code and the second user end code by adopting the same programming language comprises the following steps:
and writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language based on the control requirement of the at least one electrical equipment.
10. The method of claim 6, wherein the second client program is a web control page; the second server program is a web service program;
the web control page is deployed in the same web server as the web service program, and the web server is used for providing the web control page to a web client.
11. The control system is characterized by comprising a first server, a first message proxy device, a first control center device and a first user device which are developed by adopting the same programming language; wherein, at least one electrical equipment is connected with the first control center equipment through a local area network;
the first server is used for acquiring the respective state information of the at least one electrical equipment issued by the first control center equipment from the first message proxy equipment;
The first message proxy device is configured to receive first status information of each of the at least one electrical device issued by the first control center device; receiving first control information issued by the first user equipment aiming at any electrical equipment;
the first user equipment is used for acquiring first state information of any electrical equipment from the first server; issuing first control information for any one of the electrical equipment to the first message broker equipment;
the first control center device is used for receiving the first state information sent by the at least one electrical device respectively and issuing the first state information of the at least one electrical device to the first message proxy device; acquiring the first control information issued by the first user equipment from the first message proxy equipment; and sending the first control information to any one of the electrical equipment so that the any one of the electrical equipment can execute control operation according to the first control information.
12. The control system is characterized by comprising a second server, a second message proxy device and a second user device which are developed by adopting the same programming language; wherein the second message broker device is connected to at least one electrical device;
The second message proxy equipment is used for receiving second state information respectively issued by the at least one electrical equipment; receiving second control information issued by the second user equipment aiming at any electrical equipment;
the second server is used for acquiring second state information respectively issued by the at least one electrical equipment from the second message proxy equipment;
the second user equipment is used for acquiring second state information of any electrical equipment from the second server; and issuing second control information aiming at any one of the electrical equipment to the second message proxy equipment so that the any one of the electrical equipment can acquire the second control information from the second message proxy equipment, and executing control operation according to the second control information.
13. A control method applied to a control system developed in the same programming language, the method comprising:
the method comprises the steps that a first control center device obtains respective state information of at least one electrical device and issues the respective state information of the at least one electrical device to a first message agency device;
the first server acquires respective state information of the at least one electrical equipment from the first message proxy equipment;
The method comprises the steps that first user equipment obtains state information of any electrical equipment from a first server and sends first control information aiming at any electrical equipment to first message proxy equipment;
the first control center device obtains the first control information from the first message proxy device and sends the first control information to any one of the electrical equipment for the any one of the electrical equipment to obtain and execute.
14. A control method applied to a control system developed in the same programming language, the method comprising:
the second message proxy equipment receives second state information respectively issued by at least one electrical equipment;
a second server acquires respective state information of the at least one electrical equipment from the second message proxy equipment;
and the second user equipment acquires the state information of any electrical equipment from the second server and distributes second control information aiming at any electrical equipment to the second message proxy equipment so as to be acquired and executed by any electrical equipment.
15. A system building apparatus, comprising:
the first code determining module is used for compiling a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language based on the control requirement of at least one electrical equipment;
The first code compiling module is used for compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively;
the first system construction module is used for deploying the first server program, the first message agent program, the first control center program and the first user end program into respective corresponding devices so as to form a control system;
the first control center program is used for connecting at least one electrical equipment and issuing first state information of each electrical equipment to a first message agency program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
16. A system building apparatus, comprising:
the second code determining module is used for compiling a second service end code, a second message proxy code and a second user end code by adopting the same programming language based on the control requirement of at least one electrical equipment;
the second code compiling module is used for compiling the second service end code, the second message agency code and the second user end code respectively so as to obtain a second service end program, a second message agency program and a second user end program respectively;
the second system construction module is used for deploying the second server program, the second message proxy program and the second user program into respective corresponding devices so as to form a control system;
the second message agent program is used for accessing at least one electrical equipment and receiving second state information respectively issued by the at least one electrical equipment; the second state information is used for being acquired by a second server program; the second user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the second control information is used for being acquired and executed by any one of the electrical equipment.
17. A computing device comprising a storage component and a processing component;
the storage component stores one or more computer program instructions for the processing component to call and execute;
the processing assembly is configured to:
writing a first service end code, a first message proxy code, a first control center code and a first user end code by adopting the same programming language;
compiling the first server side code, the first message proxy code, the first control center code and the first user side code respectively to obtain a first server side program, a first message proxy program, a first control center program and a first user side program respectively;
deploying the first server program, the first message broker program, the first control center program and the first user end program into respective corresponding devices to form a control system;
the first control center program is used for connecting at least one electrical equipment and issuing first state information of each electrical equipment to a first message agency program; the first status information is sent to be acquired by the first service end program; the first user end program is used for acquiring first state information of any electrical equipment from the first server end program; issuing first control information for any one of the electrical devices to the first message broker; the first control information is used for being acquired by a first control center program and provided for any one of the electrical equipment, and is executed by the any one of the electrical equipment.
18. A computing device comprising a storage component and a processing component;
the storage component stores one or more computer program instructions for the processing component to call and execute;
the processing assembly is configured to:
writing a second service end code, a second message proxy code and a second user end code by adopting the same programming language;
compiling the second server side code, the second message proxy code and the second user side code respectively to obtain a second server side program, a second message proxy program and a second user side program respectively;
deploying the second server program, the second message broker program and the second client program into respective devices to form a control system;
the second message agent program is used for accessing at least one electrical equipment and receiving second state information respectively issued by the at least one electrical equipment; the second state information is used for being acquired by a second server program; the second user end program is used for acquiring second state information of any electrical equipment from the second server end program; issuing second control information for the any one of the electrical devices to the second message broker; the second control information is used for being acquired and executed by any one of the electrical equipment.
CN201810290597.6A 2018-04-03 2018-04-03 System construction method, control method, device, control system and computing equipment Active CN110347396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810290597.6A CN110347396B (en) 2018-04-03 2018-04-03 System construction method, control method, device, control system and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810290597.6A CN110347396B (en) 2018-04-03 2018-04-03 System construction method, control method, device, control system and computing equipment

Publications (2)

Publication Number Publication Date
CN110347396A CN110347396A (en) 2019-10-18
CN110347396B true CN110347396B (en) 2023-05-26

Family

ID=68173782

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810290597.6A Active CN110347396B (en) 2018-04-03 2018-04-03 System construction method, control method, device, control system and computing equipment

Country Status (1)

Country Link
CN (1) CN110347396B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190147B (en) * 2022-06-29 2024-03-22 北京奕斯伟计算技术股份有限公司 Intelligent device control method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103238137A (en) * 2010-11-24 2013-08-07 国际商业机器公司 Transactional messaging support in connected messaging networks
CN103916442A (en) * 2013-01-07 2014-07-09 阿里巴巴集团控股有限公司 Message pushing achieving method, mobile terminal and message pushing system
CN105376589A (en) * 2015-10-27 2016-03-02 上海斐讯数据通信技术有限公司 Intelligent TV message push device and method based on MQTT

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130013767A1 (en) * 2011-07-05 2013-01-10 International Business Machines Corporation System and method for managing software provided as cloud service
CN103593173B (en) * 2012-10-29 2017-07-25 百度在线网络技术(北京)有限公司 A kind of integrated development system of application program, method and device
US9747096B2 (en) * 2014-07-07 2017-08-29 Harman Connected Services, Inc. Remote embedded device update platform apparatuses, methods and systems
EP3433711A4 (en) * 2016-03-23 2019-11-20 Foghorn Systems, Inc. Tools and methods for real-time dataflow programming language
CN106686074A (en) * 2016-12-20 2017-05-17 深圳矽递科技股份有限公司 System and method for quickly constructing IOT (Internet of Things) application
CN107066255A (en) * 2017-03-03 2017-08-18 海尔优家智能科技(北京)有限公司 A kind of the Internet of Things apparatus control method and device of shared Internet of Things apparatus logic

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103238137A (en) * 2010-11-24 2013-08-07 国际商业机器公司 Transactional messaging support in connected messaging networks
CN103916442A (en) * 2013-01-07 2014-07-09 阿里巴巴集团控股有限公司 Message pushing achieving method, mobile terminal and message pushing system
CN105376589A (en) * 2015-10-27 2016-03-02 上海斐讯数据通信技术有限公司 Intelligent TV message push device and method based on MQTT

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WebSocket与MQTT在Web即时通信系统中的应用;刘峰;陈朴;贾军营;;计算机系统应用(第05期);全文 *
关于物联网云平台的技术探讨与实施;江鹏;冯永强;钟良骥;;湖北科技学院学报(第S1期);全文 *

Also Published As

Publication number Publication date
CN110347396A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
US11184227B2 (en) Method and apparatus for updating configuration object
CN112087454B (en) Communication method, device, equipment and storage medium of Internet of things gateway equipment
CN112995348B (en) Control method, device and system of Internet of things equipment
US10949255B2 (en) Compact schedules for resource-constrained devices
CN110908879A (en) Method, device, terminal and storage medium for reporting buried point data
Anwaarullah et al. RTOS based home automation system using Android
JP2021513174A (en) Reconfigurable built-in rules engine for Internet of Things (IoT) devices
CN105049339A (en) Method and device for loading control interface of intelligent device
CN110347396B (en) System construction method, control method, device, control system and computing equipment
Yalçınkaya et al. IoT based smart home testbed using MQTT communication protocol
Krainyk et al. Configurable control node for wireless sensor network
Sai et al. Smart Home Messenger Notifications System using IoT
US20160352577A1 (en) Multiple gateway virtualization
Singh et al. Smart home automation deployment on third party cloud using internet of things
KR20090039904A (en) Wireless network system and method of controlling device therein
Yang et al. The PnP Web Tag: A plug-and-play programming model for connecting IoT devices to the web of things
Padilla Self-adaptation for Internet of things applications
Dibaba IoT Implementation with Cayenne Platform
KR101399800B1 (en) Service providing method and system for instance hosting
Walcher et al. KNX to MQTT/AMQP
Goud et al. Spectate home appliances by internet of things using MQTT and IFTTT through Google Assistant
JP2017516239A (en) Method and apparatus for controlling smart objects with a collage user interface using normalized user interface descriptors
CN103412914A (en) Network client side
Agarwal et al. Internet of Things (IoT) based switchbox using MQTT Protocol
Willoughby et al. An IoT-Based Home Automation and Weather Monitoring System

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
GR01 Patent grant
GR01 Patent grant