CN110798471B - Air conditioner management method and related device - Google Patents
Air conditioner management method and related device Download PDFInfo
- Publication number
- CN110798471B CN110798471B CN201911054919.8A CN201911054919A CN110798471B CN 110798471 B CN110798471 B CN 110798471B CN 201911054919 A CN201911054919 A CN 201911054919A CN 110798471 B CN110798471 B CN 110798471B
- Authority
- CN
- China
- Prior art keywords
- air conditioner
- user
- subscription
- equipment
- cloud server
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Power Engineering (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Air Conditioning Control Device (AREA)
Abstract
The invention provides an air conditioner management method and a related device, and relates to the field of air conditioner control. The method comprises the following steps: receiving an air conditioner control instruction sent by the terminal equipment, wherein the air conditioner control instruction comprises a subscription ID and a unique identifier of target air conditioner equipment bound by a user of the terminal equipment, and the subscription ID is generated by the centralized control server after the equipment state subscription authority of the user is successfully authenticated and is used for representing that the user of the terminal equipment successfully subscribes the state information of the target air conditioner equipment; and after the equipment control authority of the user is successfully authenticated, sending the air conditioner control instruction to the cloud server, so that the cloud server sends the air conditioner control instruction to the target air conditioner equipment according to the unique identifier of the target air conditioner equipment, and when receiving an instruction receiving success message returned by the cloud server based on the subscription ID, pushing the instruction to the terminal equipment to send the success message. Therefore, not only is remote centralized management and control of the air conditioning equipment realized, but also traceability of air conditioning control instructions is realized.
Description
Technical Field
The invention relates to the field of air conditioner control, in particular to an air conditioner management method and a related device.
Background
With the development of social economy, air conditioners are more and more popular, and more schools and enterprises select to install household air conditioners such as wall-mounted units, cabinet units and the like. For example, on-hook air conditioners are installed in each classroom and dormitory of a school. Because each air conditioner is independent, whether each air conditioner is closed or not needs to be checked manually, when the air conditioners are controlled, the air conditioners need to be operated manually one by one, although the central air conditioner can realize centralized control, the central air conditioner cannot be installed in some scenes due to limitations of space, structure and the like, and therefore centralized management and control of all the air conditioners are difficult to realize.
Disclosure of Invention
The problem to be solved by the invention is how to carry out centralized management and control on each air conditioner which are independent from each other.
In order to solve the problems, the technical scheme adopted by the invention is as follows:
in a first aspect, an embodiment of the present invention provides an air conditioner management method, which is applied to a centralized control server, where the centralized control server is in communication connection with both a terminal device and a cloud server, and the cloud server is in communication connection with an air conditioner device, and the method includes:
receiving an air conditioner control instruction sent by the terminal equipment, wherein the air conditioner control instruction comprises a subscription ID and a unique identifier of a target air conditioner bound by a user of the terminal equipment; the subscription ID is generated by the centralized control server after the authentication of the equipment state subscription authority of the user is successful, and is used for representing that the user of the terminal equipment successfully subscribes the state information of the target air conditioning equipment;
after the equipment control authority of the user is successfully authenticated, the air conditioner control instruction is sent to the cloud server, so that the cloud server can send the air conditioner control instruction to the target air conditioner equipment according to the unique identifier of the target air conditioner equipment;
and when receiving a successful message received by the cloud server based on the instruction returned by the subscription ID, pushing an instruction to the terminal equipment to send the successful message.
In the air conditioner management method provided by the embodiment of the invention, the centralized control server receives the air conditioner control instruction sent by the terminal equipment, after the equipment control authority of the user is successfully authenticated, the air conditioner control instruction is sent to the cloud server, because the air conditioner control instruction comprises the subscription ID and the unique identification of the target air conditioner bound by the user of the terminal equipment, after the cloud server receives the air conditioner control instruction, the air-conditioning control instruction can be sent to the target air-conditioning equipment according to the unique identifier of the target air-conditioning equipment, thereby realizing the control of the target air-conditioning equipment, according to the subscription ID, the air conditioner control instruction is sent by the centralized control server, so that an instruction receiving success message is returned to the centralized control server, after the centralized control server receives the instruction receiving success message, the instruction is pushed to the terminal equipment to send a success message, so that the user of the terminal equipment can know that the air conditioner control instruction is successfully sent. Therefore, remote centralized management and control of the air conditioning equipment are achieved, the cloud server can clearly know that the air conditioning control command is sent by the centralized control server according to the subscription ID, and is not sent by other platforms, and traceability of the air conditioning control command is achieved.
In an optional embodiment, before the step of receiving the air conditioner control instruction sent by the terminal device, the method further includes:
when the user of the terminal equipment successfully logs in the centralized control server and the user binds the target air conditioning equipment, authenticating the equipment state subscription authority of the user;
and after the equipment state subscription authority of the user is successfully authenticated, generating the subscription ID, and returning the subscription ID and the unique identifier of the target air conditioning equipment to the terminal equipment.
In the invention, after successfully authenticating the equipment state subscription authority of the user, the centralized control server generates the subscription ID and returns the subscription ID and the unique identifier of the target air conditioning equipment to the terminal equipment, thereby greatly facilitating the traceability of the air conditioning control instruction and the monitoring of the state information of the target air conditioning equipment.
In an alternative embodiment, the method further comprises:
and when receiving the equipment state information pushed by the cloud server, if the equipment state information is subscribed by the user, pushing the equipment state information to the terminal equipment.
In the invention, when monitoring that the state of the air conditioning equipment changes, the cloud server actively pushes corresponding equipment state information to the centralized control server, after receiving the equipment state information, the centralized control server judges whether a user subscribes the state information of the air conditioning equipment, and if so, the equipment state information is pushed to the terminal equipment corresponding to the user.
In an alternative embodiment, the method further comprises:
when the device state information pushed by the cloud server is received, if the device state information is not subscribed by any user, the device state information is discarded.
In the invention, when monitoring that the state of the air conditioning equipment changes, the cloud server actively pushes corresponding equipment state information to the centralized control server, after receiving the equipment state information, the centralized control server judges whether a user subscribes the state information of the air conditioning equipment, and if not, the equipment state information is actively discarded.
In an alternative embodiment, the method further comprises:
before processing each received service request, recording first log information according to the service request;
before returning a service processing result based on the service request, recording second log information according to the service processing result; wherein the first log information and the second log information include a same trace ID.
In the invention, the centralized control server intercepts the service request and the service processing result respectively before each service request enters actual processing and before the service request is processed and returns a service processing result, and records corresponding first log information and second log information, and keeps the tracking IDs in the first log information and the second log information consistent, so that the first log information and the second log information can be associated according to the tracking ID, the full link tracking of the service processing of the centralized control server is realized, and the problem is convenient to be solved.
In a second aspect, an embodiment of the present invention provides an air conditioner management apparatus, which is applied to a centralized control server, where the centralized control server is in communication connection with both a terminal device and a cloud server, and the cloud server is in communication connection with an air conditioner device, and the apparatus includes:
the receiving module is used for receiving an air conditioner control instruction sent by the terminal equipment, wherein the air conditioner control instruction comprises a subscription ID and a unique identifier of a target air conditioner bound by a user of the terminal equipment; the subscription ID is generated by the centralized control server after the authentication of the equipment state subscription authority of the user is successful, and is used for representing that the user of the terminal equipment successfully subscribes the state information of the target air conditioning equipment;
the sending module is used for sending the air conditioner control instruction to the cloud server after the equipment control authority of the user is successfully authenticated, so that the cloud server can send the air conditioner control instruction to the target air conditioner equipment according to the unique identifier of the target air conditioner equipment;
the sending module is further configured to push an instruction to the terminal device to send a success message when receiving a success message received by the cloud server based on the instruction returned by the subscription ID.
In an alternative embodiment, the apparatus further comprises:
the authentication module is used for authenticating the equipment state subscription authority of the user when the user of the terminal equipment successfully logs in the centralized control server and the user is bound with the target air conditioning equipment;
and the subscription ID generation module is used for generating the subscription ID after the equipment state subscription authority of the user is successfully authenticated, and returning the subscription ID and the unique identifier of the target air conditioning equipment to the terminal equipment.
In an optional implementation manner, the sending module is further configured to, when receiving the device state information pushed by the cloud server, if the device state information is subscribed by the user, push the device state information to the terminal device.
In an alternative embodiment, the apparatus further comprises:
and the information discarding module is used for discarding the equipment state information if the equipment state information is not subscribed by any user when the equipment state information pushed by the cloud server is received.
In an alternative embodiment, the apparatus further comprises:
the log recording module is used for recording first log information according to the service request before processing each received service request; before returning a service processing result based on the service request, recording second log information according to the service processing result; wherein the first log information and the second log information include a same trace ID.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is read and executed by a processor, the computer program implements the method according to any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present invention provides a centralized control server, which includes a memory storing a computer program and a processor, where the computer program is read by the processor and executed to implement the method according to any one of the foregoing embodiments.
In a fifth aspect, an embodiment of the present invention provides an air conditioner management system, which includes a terminal device and the centralized control server as described in the foregoing embodiments.
Drawings
Fig. 1 is a schematic view of an application environment of an air conditioning management system provided by the present invention;
FIG. 2 is a block diagram of a centralized control server according to the present invention;
FIG. 3 is a schematic flow chart of an air conditioner management method according to the present invention;
FIG. 4 is a schematic flow chart of another air conditioner management method according to the present invention;
FIG. 5 is a schematic flow chart of an air conditioner management method according to another embodiment of the present invention;
FIG. 6 is a schematic flow chart of an air conditioner management method according to another embodiment of the present invention;
FIG. 7 is a schematic flow chart illustrating a method for managing air conditioners according to another embodiment of the present invention;
fig. 8 is a schematic diagram of a functional module of the air conditioning management device according to the present invention.
Description of reference numerals:
10-an air conditioning management system; 100-centralized control server; 600-air conditioning management device; 200-a terminal device; 20-a cloud server; 30-air conditioning equipment; 110-a memory; 120-a processor; 130-a communication module; 610-an authentication module; 620-subscription ID generation module; 630-a receiving module; 640-a sending module; 650-information discard module; 660-logging module.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Fig. 1 is a schematic diagram of an application environment of an air conditioning management system 10 according to the present invention. The air-conditioning management system 10 comprises a centralized control server 100 and a terminal device 200, wherein the centralized control server 100, the terminal device 200 and a cloud server 20 are in communication connection, and the cloud server 20 is in communication connection with one or more air-conditioning devices 30.
In this embodiment, the terminal device 200 may include, but is not limited to, a smart phone, a Personal Computer (PC), a tablet PC, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the like.
In this embodiment, an API (Application Programming Interface) gateway and a websocket gateway are disposed in the centralized control server 100, and the centralized control server 100 may perform communication or data interaction with the terminal device 200 through the API gateway and the websocket gateway. For example, the API gateway may perform communication or data interaction with an App (Application) installed in the terminal device 200, and the websocket gateway may perform communication or data interaction with an internal management platform or an external management platform of the PC.
Fig. 2 is a block diagram of a centralized control server 100 according to the present invention. The centralized control server 100 may include a memory 110, a processor 120, and a communication module 130, wherein the elements of the memory 110, the processor 120, and the communication module 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 110 is used for storing programs or data, such as program instructions/modules corresponding to the air conditioner management method and apparatus provided by the present invention. The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions.
The communication module 130 is used for establishing a communication connection between the centralized control server 100 and other communication terminals (e.g., the terminal device 200, the cloud server 20), and for transceiving data.
It is to be understood that the configuration shown in fig. 2 is merely exemplary, and that the centralized server 100 may include more or fewer components than shown in fig. 2, or have a different configuration than shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
Fig. 3 is a schematic flow chart of an air conditioner management method according to the present invention. It should be noted that the air conditioning management method of the present invention is not limited to fig. 3 and the following specific procedure. It should be understood that in other embodiments, the order of some steps in the air conditioning management method of the present invention may be interchanged according to actual needs, or some steps may be omitted or deleted. The air conditioner management method can be applied to the centralized control server 100, and the specific process shown in fig. 3 will be described in detail below.
Step S201, receiving an air conditioner control instruction sent by a terminal device, wherein the air conditioner control instruction comprises a subscription ID and a unique identifier of a target air conditioner bound by a user of the terminal device; the subscription ID is generated by the centralized control server after the device state subscription authority of the user is successfully authenticated and is used for representing the state information that the user of the terminal device successfully subscribes the target air conditioning device.
In this embodiment, the unique identifier of the target air conditioner is generated by the centralized control server 100 when the user of the terminal device 200 is bound to the target air conditioner. For example, after the target air conditioner is registered in the cloud server 20, the cloud server 20 may generate an equipment identifier of the target air conditioner and report the equipment identifier to the centralized control server 100, and when the user of the terminal device 200 is bound to the target air conditioner, the centralized control server 100 may generate a unique identifier of the target air conditioner according to the equipment identifier of the target air conditioner. It can be understood that the unique identifier of the target air conditioner recorded in the centralized control server 100 is to add a special identifier on the basis of the device identifier of the target air conditioner recorded in the cloud server 20, and it can be known that the target air conditioner belongs to the air conditioners 30 to be managed in the air conditioner management system 10 through the special identifier.
Step S202, after the equipment control authority of the user is successfully authenticated, the air conditioner control instruction is sent to the cloud server, so that the cloud server can send the air conditioner control instruction to the target air conditioner equipment according to the unique identification of the target air conditioner equipment.
In this embodiment, after receiving the air conditioner control instruction, the centralized control server 100 first needs to check whether the user has the device control authority, that is, authenticate the device control authority of the user. The authentication process comprises the following steps: the centralized control server 100 queries a corresponding authority list according to the account ID of the user, and if the authority list has the device control authority, it indicates that the authentication is successful. After the authentication is successful, the centralized control server 100 will continue to send the air conditioner control instruction to the cloud server 20, and after the cloud server 20 receives the air conditioner control instruction, it can know that the air conditioner control instruction is sent by the centralized control server 100 according to the subscription ID in the air conditioner control instruction, so that an instruction receiving success message is returned to the centralized control server 100, and the corresponding equipment identifier can be matched according to the unique identifier in the air conditioner control instruction, so as to determine to send the air conditioner control instruction to the target air conditioner equipment. When the authentication fails, the centralized control server 100 sends failure information to the terminal device 200.
Step S203, when receiving a successful receiving message of the instruction returned by the cloud server based on the subscription ID, pushing the instruction to the terminal device to send the successful message.
In this embodiment, after receiving the instruction receiving success message returned by the cloud server 20, the centralized control server 100 pushes an instruction sending success message to the corresponding terminal device 200 according to the subscription ID, so that the user of the terminal device 200 can know that the air conditioner control instruction has been successfully sent.
It should be noted that, in this embodiment, the centralized control server 100 performs authority management based on resources, where the resources may be understood as authorities for device control, status query, device locking, and the like, and by performing authority management directly according to the resources, the authority management is more direct, convenient, and flexible compared with the common authority management based on roles, and does not need to create roles and associate authority resources before allocation. The method specifically comprises the following advantages: 1. equipment resources needing to be managed are clearer, and developers can develop more conveniently; 2. the structure is flexible, management based on resources is more basic, and the cooperation with roles or groups is more convenient; 3. the authority authentication of the air-conditioning management system 10 is more independent, and is convenient to combine with other modules in the air-conditioning management system 10, for example, the authority authentication can be combined with an equipment real-time control and reporting module to achieve the purpose of equipment authentication; 4. can be integrated with other security frameworks such as shiro and the like, and achieves dynamic management of the authority.
As can be seen, in the present embodiment, the centralized control server 100 receives the air-conditioning control instruction sent by the terminal device 200, after the device control authority of the user is successfully authenticated, the air conditioner control instruction is sent to the cloud server 20, since the air-conditioning control command includes the subscription ID and the unique identifier of the target air-conditioning device bound by the user of the terminal device 200, after the cloud server 20 receives the air-conditioning control command, the air-conditioning control instruction can be sent to the target air-conditioning equipment according to the unique identifier of the target air-conditioning equipment, thereby realizing the control of the target air-conditioning equipment, since it can be known from the subscription ID that the air-conditioning control command is sent by the central control server 100, a command reception success message is returned to the central control server 100, and after the central control server 100 receives the command reception success message, a command transmission success message is pushed to the terminal device 200 so that the user of the terminal device 200 can know that the air conditioner control command has been successfully transmitted. In this way, not only is remote centralized management and control of the air-conditioning equipment 30 achieved, but also the cloud server 20 can clearly know from the subscription ID that the air-conditioning control command is sent by the air-conditioning management system 10, rather than being sent by other platforms, and traceability of the air-conditioning control command is achieved.
Optionally, as shown in fig. 4, before step S201, the method may further include:
step S301, when the user of the terminal device successfully logs in the centralized control server and the user binds the target air conditioning device, the device state subscription authority of the user is authenticated.
In this embodiment, when the user of the terminal device 200 logs in the centralized control server 100, the user needs to carry a token (token) generated by the centralized control server 100, and after the token is successfully verified, the user logs in successfully, and if the token is failed in verification, the user logs in unsuccessfully. After the user successfully logs in, whether the bound air-conditioning equipment 30 exists is inquired according to the account ID of the user, if the target air-conditioning equipment is bound under the account ID of the user, the centralized control server 100 authenticates the equipment state subscription authority of the user, and the authentication process is similar to that of the equipment control authority. The centralized control server 100 queries a corresponding authority list according to the account ID of the user, if the authority list has an equipment state subscription authority, it indicates that the authentication is successful, the user has a state information subscription authority of the target air conditioning equipment, and successfully subscribes the state information of the target air conditioning equipment, and if the authority list does not have the equipment state subscription authority, it indicates that the authentication is failed, and the centralized control server 100 may actively close the communication connection with the terminal equipment 200.
Step S302, after the device state subscription authority of the user is successfully authenticated, a subscription ID is generated, and the subscription ID and the unique identifier of the target air conditioning device are returned to the terminal device.
In this embodiment, after the device status subscription authority of the user is successfully authenticated, the centralized control server 100 generates a globally unique subscription ID and returns the globally unique subscription ID and the unique identifier of the target air conditioning device to the terminal device 200, thereby greatly facilitating traceability of the air conditioning control instruction and monitoring of the status information of the target air conditioning device.
Optionally, after the user successfully subscribes to the state information of the target air conditioner, once the centralized control server 100 receives the state information of the target air conditioner reported by the cloud server 20, the state information of the target air conditioner is pushed to the terminal device 200. Based on this, referring to fig. 5, on the basis of fig. 3, the method may further include:
step S401, when receiving the device state information pushed by the cloud server, if the device state information is subscribed by the user, pushing the device state information to the terminal device.
In this embodiment, when monitoring that the state of the air-conditioning device 30 changes, the cloud server 20 actively pushes the corresponding device state information to the centralized control server 100, and after receiving the device state information, the centralized control server 100 determines whether a user subscribes to the state information of the air-conditioning device 30, and if so, pushes the device state information to the terminal device 200 corresponding to the user. The device status information carries a device identifier of the air conditioning device 30, and after receiving the device status information, the centralized control server 100 determines whether a user subscribes to the corresponding air conditioning device 30 according to the device identifier.
For example, when the centralized control server 100 matches the unique identifier of the target air conditioning device according to the device identifier and determines that the state information of the target air conditioning device is subscribed by the user, the device state information is pushed to the terminal device 200 corresponding to the user, so that the device state can be seen in real time.
Further, referring to fig. 6 on the basis of fig. 3, the method may further include:
step S501, when receiving the device state information pushed by the cloud server, if the device state information is not subscribed by any user, discarding the device state information.
That is to say, when monitoring that the state of the air conditioning device 30 changes, the cloud server 20 actively pushes the corresponding device state information to the centralized control server 100, and after receiving the device state information, the centralized control server 100 determines whether there is a user subscribing to the state information of the air conditioning device 30, and if there is no user subscribing, actively discards the device state information.
Further, referring to fig. 7 based on fig. 3, the method may further include:
step S601, before processing each received service request, recording first log information according to the service request;
step S602, before returning a service processing result based on the service request, recording second log information according to the service processing result; wherein the first log information and the second log information include the same tracking ID.
In this embodiment, before each service request enters actual processing and before the service request is processed and a service processing result is returned after the service request is processed, the centralized control server 100 intercepts the service request and the service processing result respectively, records corresponding first log information and second log information, and keeps the tracking IDs in the first log information and the second log information consistent, so that the first log information and the second log information can be associated according to the tracking ID, thereby implementing full link tracking of service processing of the centralized control server 100 and facilitating troubleshooting.
For example, the first log information may be recorded in a traceId (i.e., tracking ID) + url address + method name + request parameter, the second log information may be recorded in a traceId + time + url address + method name + response result, the traceids may be kept consistent, and a uuid + timestamp may be used to ensure that each service request can obtain a different value.
It should be noted that, in this embodiment, the terminal device 200 may actively send a ping message to the centralized control server 100 at regular intervals (for example, 30 seconds), the centralized control server 100 may send a pong message to the terminal device 200 after receiving the ping message, when the terminal device 200 does not receive the pong message, a failure log may be recorded, when a plurality of (for example, 3 times) the terminal device 200 receives the pong message continuously, the terminal device 200 may actively disconnect from the centralized control server 100, and when the centralized control server 100 does not receive the ping message sent by the terminal device 200 within a period of time (for example, 1 minute), the connection with the terminal device 200 may also be actively disconnected. When the user logs out from the terminal device 200 or directly closes the browser, the connection between the terminal device 200 and the centralized control server 100 is actively disconnected.
It should be further noted that in this embodiment, a websocket communication mode is adopted between the centralized control server 100 and the terminal device 200 and the cloud server 20, so that the interaction between the centralized control server 100 and the terminal device 200 and the cloud server 20 is real-time, and the user experience is improved; the protocol format is adopted for transmitting the instruction or the data packet, compared with a JSON or XML transmission mode, the transmission speed is higher, the volume of the data packet is smaller, and meanwhile, the SM2 encryption mode is adopted for encrypting the channel link, so that the communication safety is improved.
Fig. 8 is a schematic functional block diagram of an air conditioning management apparatus 600 according to the present invention. It should be noted that the basic principle and the technical effects of the air conditioning management device 600 according to the embodiment of the present invention are the same as those of the foregoing method embodiment, and for the sake of brief description, the corresponding contents of the foregoing method embodiment can be referred to for the parts not mentioned in the embodiment. The air-conditioning management device 600 may be applied to the centralized control server 100, and includes an authentication module 610, a subscription ID generation module 620, a receiving module 630, a transmitting module 640, an information discarding module 650, and a log recording module 660.
Alternatively, the modules may be stored in the memory 110 shown in fig. 2 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the centralized control server 100, and may be executed by the processor 120 in fig. 2. Meanwhile, data, codes of programs, and the like required to execute the above-described modules may be stored in the memory 110.
The authentication module 610 is configured to authenticate the device status subscription right of the user when the user of the terminal device 200 successfully logs in the centralized control server 100 and the user binds the target air conditioning device.
It is understood that the authentication module 610 may perform the above step S301.
The subscription ID generation module 620 is configured to generate a subscription ID after the device status subscription authority of the user is successfully authenticated, and return the subscription ID and the unique identifier of the target air conditioner to the terminal device 200.
It is understood that the subscription ID generation module 620 may perform the above step S302.
The receiving module 630 is configured to receive an air conditioner control instruction sent by the terminal device 200, where the air conditioner control instruction includes a subscription ID and a unique identifier of a target air conditioner bound by a user of the terminal device 200; the subscription ID is generated by the centralized control server 100 after successfully authenticating the device state subscription authority of the user, and is used to represent that the user of the terminal device 200 has successfully subscribed to the state information of the target air conditioner.
It is understood that the receiving module 630 may perform the step S201.
The sending module 640 is configured to send the air conditioner control instruction to the cloud server 20 after the device control authority of the user is successfully authenticated, so that the cloud server 20 sends the air conditioner control instruction to the target air conditioner according to the unique identifier of the target air conditioner.
It is understood that the sending module 640 may execute the step S202.
The sending module 640 is further configured to, when receiving an instruction receiving success message returned by the cloud server 20 based on the subscription ID, push the instruction sending success message to the terminal device 200.
It is understood that the sending module 640 may also execute the step S203.
The sending module 640 is further configured to, when receiving the device status information pushed by the cloud server 20, if the device status information is subscribed by the user, push the device status information to the terminal device 200.
It is understood that the sending module 640 may also execute the step S401.
The information discarding module 650 is configured to discard the device state information, when receiving the device state information pushed by the cloud server 20, if the device state information is not subscribed by any user.
It is understood that the information discarding module 650 may perform the above step S501.
The log recording module 660 is configured to record first log information according to the service request before processing each received service request; before returning a service processing result based on the service request, recording second log information according to the service processing result; wherein the first log information and the second log information include the same tracking ID.
It is understood that the logging module 660 can perform the above steps S601 and S602.
In summary, according to the air-conditioning management method and the related apparatus provided by the present invention, the centralized control server receives the air-conditioning control command sent by the terminal device, after the equipment control authority of the user is successfully authenticated, the air conditioner control instruction is sent to the cloud server, because the air conditioner control instruction comprises the subscription ID and the unique identification of the target air conditioner bound by the user of the terminal equipment, after the cloud server receives the air conditioner control instruction, the air-conditioning control instruction can be sent to the target air-conditioning equipment according to the unique identifier of the target air-conditioning equipment, thereby realizing the control of the target air-conditioning equipment, according to the subscription ID, the air conditioner control instruction is sent by the centralized control server, so that an instruction receiving success message is returned to the centralized control server, after the centralized control server receives the instruction receiving success message, the instruction is pushed to the terminal equipment to send a success message, so that the user of the terminal equipment can know that the air conditioner control instruction is successfully sent. Therefore, remote centralized management and control of the air conditioning equipment are achieved, the cloud server can clearly know that the air conditioning control command is sent by the centralized control server according to the subscription ID, and is not sent by other platforms, and traceability of the air conditioning control command is achieved. In addition, the user of the terminal equipment logs in the centralized control server and subscribes the state information of the air conditioning equipment, so that the centralized control server actively pushes the state information of the air conditioning equipment to the user after acquiring the equipment state information of the air conditioning equipment, and the real-time visibility of the state of the air conditioning equipment is realized; the centralized control server intercepts the service requests and the service processing results respectively before each service request enters actual processing and before the service requests are processed and service processing results are returned, and records corresponding log information, so that tracking IDs are kept consistent, full-link tracking of service processing of the centralized control server is realized, and problems are conveniently checked.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (13)
1. An air conditioner management method is applied to a centralized control server (100), wherein the centralized control server (100) is in communication connection with both a terminal device (200) and a cloud server (20), and the cloud server (20) is in communication connection with an air conditioner (30), and the method comprises the following steps:
receiving an air-conditioning control instruction sent by the terminal equipment (200), wherein the air-conditioning control instruction comprises a subscription ID and a unique identifier of a target air-conditioning equipment (30) bound by a user of the terminal equipment (200); the subscription ID is generated by the centralized control server (100) after the authentication of the device state subscription authority of the user is successful, and is used for representing that the user of the terminal device (200) has successfully subscribed to the state information of the target air-conditioning device (30);
after the equipment control authority of the user is successfully authenticated, the air conditioner control instruction is sent to the cloud server (20), so that the cloud server (20) sends the air conditioner control instruction to the target air conditioner equipment (30) according to the unique identification of the target air conditioner equipment (30);
when receiving a successful receiving message of an instruction returned by the cloud server (20) based on the subscription ID, pushing the instruction to the terminal equipment (200) to send the successful message.
2. The method according to claim 1, wherein before the step of receiving the air-conditioning control command sent by the terminal device (200), the method further comprises:
when the user of the terminal equipment (200) successfully logs in the centralized control server (100) and the user binds the target air-conditioning equipment (30), authenticating the equipment state subscription authority of the user;
and after the device state subscription authority authentication of the user is successful, generating the subscription ID, and returning the subscription ID and the unique identifier of the target air conditioning device (30) to the terminal device (200).
3. The method of claim 1, further comprising:
when receiving the device state information pushed by the cloud server (20), if the device state information is subscribed by the user, pushing the device state information to the terminal device (200).
4. The method of claim 1, further comprising:
when the device state information pushed by the cloud server (20) is received, if the device state information is not subscribed by any user, the device state information is discarded.
5. The method of claim 1, further comprising:
before processing each received service request, recording first log information according to the service request; before returning a service processing result based on the service request, recording second log information according to the service processing result; wherein the first log information and the second log information include a same trace ID.
6. An air conditioner management device is applied to a centralized control server (100), wherein the centralized control server (100) is in communication connection with a terminal device (200) and a cloud server (20), the cloud server (20) is in communication connection with an air conditioner (30), and the air conditioner management device comprises:
a receiving module (630) configured to receive an air-conditioning control instruction sent by the terminal device (200), where the air-conditioning control instruction includes a subscription ID and a unique identifier of a target air-conditioning device (30) bound by a user of the terminal device (200); the subscription ID is generated by the centralized control server (100) after the authentication of the device state subscription authority of the user is successful, and is used for representing that the user of the terminal device (200) has successfully subscribed to the state information of the target air-conditioning device (30);
a sending module (640) configured to send the air conditioner control instruction to the cloud server (20) after the device control authority of the user is successfully authenticated, so that the cloud server (20) sends the air conditioner control instruction to the target air conditioner device (30) according to the unique identifier of the target air conditioner device (30);
the sending module (640) is further configured to, when receiving a successful message received by the cloud server (20) based on the instruction returned by the subscription ID, push an instruction to the terminal device (200) to send the successful message.
7. The apparatus of claim 6, further comprising:
an authentication module (610) for authenticating the device state subscription authority of the user when the user of the terminal device (200) successfully logs in the centralized control server (100) and the user binds the target air conditioner device (30);
and the subscription ID generation module (620) is used for generating the subscription ID after the equipment state subscription authority authentication of the user is successful, and returning the subscription ID and the unique identifier of the target air conditioning equipment (30) to the terminal equipment (200).
8. The apparatus according to claim 6, wherein the sending module (640) is further configured to, when receiving the device status information pushed by the cloud server (20), push the device status information to the terminal device (200) if the device status information is subscribed by the user.
9. The apparatus of claim 6, further comprising:
the information discarding module (650) is configured to discard the device state information, when receiving the device state information pushed by the cloud server (20), if the device state information is not subscribed by any user.
10. The apparatus of claim 6, further comprising:
the log recording module is used for recording first log information according to the service request before processing each received service request; before returning a service processing result based on the service request, recording second log information according to the service processing result; wherein the first log information and the second log information include a same trace ID.
11. A computer-readable storage medium, on which a computer program is stored which, when read and executed by a processor (120), implements the method according to any one of claims 1-5.
12. A centralized control server, characterized by comprising a memory (110) and a processor (120) storing a computer program, which when read and executed by the processor (120) implements the method according to any one of claims 1-5.
13. An air conditioning management system, characterized by comprising a terminal device (200) and a centralized control server (100) according to claim 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911054919.8A CN110798471B (en) | 2019-10-31 | 2019-10-31 | Air conditioner management method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911054919.8A CN110798471B (en) | 2019-10-31 | 2019-10-31 | Air conditioner management method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110798471A CN110798471A (en) | 2020-02-14 |
CN110798471B true CN110798471B (en) | 2022-01-25 |
Family
ID=69442432
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911054919.8A Active CN110798471B (en) | 2019-10-31 | 2019-10-31 | Air conditioner management method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110798471B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021232197A1 (en) * | 2020-05-18 | 2021-11-25 | Oppo广东移动通信有限公司 | Method and apparatus for monitoring device state, device, and storage medium |
CN111750493B (en) * | 2020-06-24 | 2021-08-13 | 珠海格力电器股份有限公司 | Control method, control device and cloud control system |
CN112099968B (en) * | 2020-08-26 | 2024-09-24 | 珠海格力电器股份有限公司 | Control method and device of electronic equipment, system, storage medium and electronic device |
CN112378051A (en) * | 2020-11-03 | 2021-02-19 | 珠海格力电器股份有限公司 | Air conditioner control method and device, storage medium and air conditioner |
CN112751872B (en) * | 2020-12-30 | 2023-05-23 | Tcl空调器(中山)有限公司 | Control method of air conditioner, control authority request method, air conditioner and communication module |
CN113055591B (en) * | 2021-03-08 | 2023-04-07 | 深圳创维-Rgb电子有限公司 | Multi-machine position wireless control method, system, device and readable storage medium thereof |
CN113010789A (en) * | 2021-03-24 | 2021-06-22 | 珠海格力电器股份有限公司 | Air conditioning unit data pushing method and device, computer equipment and storage medium |
CN113114753A (en) * | 2021-04-07 | 2021-07-13 | 北京金山云网络技术有限公司 | Equipment control method, device and system, storage medium and electronic device |
CN113285994A (en) * | 2021-05-17 | 2021-08-20 | 深圳市欧瑞博科技股份有限公司 | Message sending method, device, server and storage medium |
CN114283571A (en) * | 2021-12-14 | 2022-04-05 | 广东芬尼克兹节能设备有限公司 | Centralized control communication method and device for cooling and heating equipment, centralized controller and storage medium |
WO2023108653A1 (en) * | 2021-12-17 | 2023-06-22 | Oppo广东移动通信有限公司 | Subscription access information processing method and apparatus, computer device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004046812A (en) * | 2002-05-21 | 2004-02-12 | Daikin Ind Ltd | Equipment controller, and equipment management system |
CN107277038A (en) * | 2017-07-18 | 2017-10-20 | 北京微影时代科技有限公司 | Access control method, device and system |
CN107995215A (en) * | 2017-12-20 | 2018-05-04 | 青岛海信智慧家居系统股份有限公司 | Control method, device and the cloud platform server of smart home device |
CN108521457A (en) * | 2018-03-30 | 2018-09-11 | 三盟科技股份有限公司 | A kind of tracking and system of equipment control command |
CN109521703A (en) * | 2017-09-19 | 2019-03-26 | 芜湖美的厨卫电器制造有限公司 | The control method of purifying drinking appliance |
CN110247829A (en) * | 2018-08-02 | 2019-09-17 | 无锡小天鹅电器有限公司 | Appliances equipment control method, device, electronic equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107388500B (en) * | 2017-07-31 | 2020-03-27 | 四川虹美智能科技有限公司 | Method for controlling intelligent air conditioner, centralized management platform and air conditioner management system |
-
2019
- 2019-10-31 CN CN201911054919.8A patent/CN110798471B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004046812A (en) * | 2002-05-21 | 2004-02-12 | Daikin Ind Ltd | Equipment controller, and equipment management system |
CN107277038A (en) * | 2017-07-18 | 2017-10-20 | 北京微影时代科技有限公司 | Access control method, device and system |
CN109521703A (en) * | 2017-09-19 | 2019-03-26 | 芜湖美的厨卫电器制造有限公司 | The control method of purifying drinking appliance |
CN107995215A (en) * | 2017-12-20 | 2018-05-04 | 青岛海信智慧家居系统股份有限公司 | Control method, device and the cloud platform server of smart home device |
CN108521457A (en) * | 2018-03-30 | 2018-09-11 | 三盟科技股份有限公司 | A kind of tracking and system of equipment control command |
CN110247829A (en) * | 2018-08-02 | 2019-09-17 | 无锡小天鹅电器有限公司 | Appliances equipment control method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110798471A (en) | 2020-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110798471B (en) | Air conditioner management method and related device | |
CN112738805B (en) | Device control method and apparatus, storage medium, and electronic device | |
US9762586B2 (en) | System and method for controlling mutual access of smart devices | |
US20160007070A1 (en) | Remote Control Processing Method, Device and System | |
CN111176794B (en) | Container management method, device and readable storage medium | |
CN110677383B (en) | Firewall wall opening method and device, storage medium and computer equipment | |
CN110636063B (en) | Method and device for controlling secure interaction of equipment, electronic equipment and storage medium | |
CN109996219B (en) | Internet of things authentication method, network equipment and terminal | |
CN114745431B (en) | Non-invasive authority authentication method, system, medium and equipment based on side car technology | |
CN104660409A (en) | System login method in cluster environment and authentication server cluster | |
CN113225351B (en) | Request processing method and device, storage medium and electronic equipment | |
CN105812413B (en) | Communication method and device | |
CN106453349A (en) | An account number login method and apparatus | |
CN111241523B (en) | Authentication processing method, device, equipment and storage medium | |
CN109495458A (en) | A kind of method, system and the associated component of data transmission | |
CN106789987B (en) | Method and system for single sign-on of multi-service interconnection APP (application) of mobile terminal | |
CN106254328A (en) | A kind of access control method and device | |
CN111147950A (en) | Remote screen projection method and system for set top box | |
US11095460B2 (en) | Certificate application operations | |
CN111147285B (en) | Cloud security product unified management method | |
CN105721274A (en) | Method and device for integrating variety of instant messaging | |
KR101236500B1 (en) | Apparatus for social network service relay service for small embedded apparatus and method thereof | |
CN108418824A (en) | Access the method, apparatus and terminal device of internet | |
CN111918268B (en) | Control method and device of intelligent equipment, electronic equipment and storage medium | |
CN115525442A (en) | Remote command execution method and device |
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 |