CN113760581A - MQTT-based method and system for synchronizing attribute information of intelligent terminal - Google Patents

MQTT-based method and system for synchronizing attribute information of intelligent terminal Download PDF

Info

Publication number
CN113760581A
CN113760581A CN202111054854.4A CN202111054854A CN113760581A CN 113760581 A CN113760581 A CN 113760581A CN 202111054854 A CN202111054854 A CN 202111054854A CN 113760581 A CN113760581 A CN 113760581A
Authority
CN
China
Prior art keywords
user
attribute information
mqtt
target
intelligent terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111054854.4A
Other languages
Chinese (zh)
Inventor
朱堂华
陈良
邓宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Hongmei Intelligent Technology Co Ltd
Original Assignee
Sichuan Hongmei Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Hongmei Intelligent Technology Co Ltd filed Critical Sichuan Hongmei Intelligent Technology Co Ltd
Priority to CN202111054854.4A priority Critical patent/CN113760581A/en
Publication of CN113760581A publication Critical patent/CN113760581A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a method and a system for synchronizing attribute information of an intelligent terminal based on MQTT, comprising the following steps: after a first user terminal logs in a target APP, an MQTT service is initialized, and after the first user terminal controls and processes a target intelligent terminal based on the target APP, attribute information of the target intelligent terminal is updated in a local target APP; the first user terminal reports recently updated attribute information of the target intelligent terminal to the cloud; the cloud end determines other second user terminals bound with the target intelligent terminal and issues an MQTT message to the other second user terminals; after receiving the MQTT message, the other second user terminals respectively update the attribute information of the synchronous target intelligent terminal in the local target APP, so that the other second user terminals can immediately and accurately synchronize the latest updated attribute information on the local target APP, the uniform and accurate attribute information on the target APPs of all the user terminals associated with the target intelligent terminal is ensured, and the user control experience is improved.

Description

MQTT-based method and system for synchronizing attribute information of intelligent terminal
Technical Field
The document relates to the technical field of the Internet of things, in particular to a method and a system for synchronizing attribute information of an intelligent terminal based on MQTT.
Background
Along with the development of smart homes, the use of smart devices is more and more common, and the operation of the devices by users is more and more convenient due to the intellectualization of the devices. In the process that a user operates the intelligent device through the mobile phone APP, the user satisfaction degree is improved, and it is particularly important to increase the user viscosity.
At present, the technology that a plurality of users APP control the same intelligent device can be realized, however, when the user operates the APP to control the intelligent device, the attribute information corresponding to the intelligent device on the APP can be refreshed immediately after the operation is successful, and the device information on the APP of other users bound with the intelligent device can not be refreshed immediately. Referring to fig. 1a, generally, APPs of other users actively enter a control interface to obtain or detect a current attribute state of the smart device, so as to update attribute information on the APPs of the other users.
However, the existing method for synchronizing the attribute information is not immediate, and it is easy for a non-operating user (other user) to obtain the attribute information of the smart device inaccurately.
Disclosure of Invention
The invention provides a method and a system for synchronizing attribute information of an intelligent terminal based on MQTT, which can synchronously update the attribute information of the intelligent terminal on other non-operation users APP in real time when the attribute information of the intelligent terminal is updated on the operation user APP, ensure the synchronous instantaneity and accuracy of the attribute information of the intelligent terminal, and improve the user experience.
To solve the above technical problem, one or more embodiments of the present specification are implemented as follows:
in a first aspect, a method for synchronizing attribute information of an intelligent terminal based on MQTT is provided, which includes:
initializing Message Queue Telemetry Transmission (MQTT) service deployed among all user terminals provided with a target APP after a first user terminal logs in the target APP, wherein the target APP is an application program used for controlling a target intelligent terminal;
after the first user terminal controls and processes the target intelligent terminal based on the target APP, updating attribute information of the target intelligent terminal related to control and processing operation in the local target APP;
the first user terminal calls a cloud interface and reports the recently updated attribute information of the target intelligent terminal to a cloud;
the cloud determines other second user terminals bound with the target intelligent terminal, and sends the attribute information to the other second user terminals in an MQTT message;
and after receiving the MQTT message, the other second user terminals respectively update and synchronize the attribute information of the target intelligent terminal in the local target APP.
In a second aspect, a system for synchronizing attribute information of an intelligent terminal based on MQTT is provided, which includes: the system comprises a first user terminal, other second user terminals, a cloud terminal and a target intelligent terminal; target APPs used for controlling the target intelligent terminal are installed on the first user terminal and the other second user terminals;
initializing Message Queue Telemetry Transmission (MQTT) service deployed among all user terminals provided with a target APP after a first user terminal logs in the target APP, wherein the target APP is an application program used for controlling a target intelligent terminal;
after the first user terminal controls and processes the target intelligent terminal based on the target APP, updating attribute information of the target intelligent terminal related to control and processing operation in the local target APP;
the first user terminal calls a cloud interface and reports the recently updated attribute information of the target intelligent terminal to a cloud;
the cloud determines other second user terminals bound with the target intelligent terminal, and sends the attribute information to the other second user terminals in an MQTT message;
and after receiving the MQTT message, the other second user terminals respectively update and synchronize the attribute information of the target intelligent terminal in the local target APP.
In a third aspect, an electronic device is provided, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method steps performed by the execution body as referred to in the second aspect.
In a fourth aspect, a computer-readable storage medium is presented, storing one or more programs which, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method steps performed by the execution body of the second aspect.
As can be seen from the technical solutions provided in one or more embodiments of the present specification, after a first user terminal logs in a target APP, a message queue telemetry transmission MQTT service deployed among all user terminals installed with the target APP is initialized, where the target APP is an application program for controlling a target intelligent terminal; after the first user terminal controls and processes the target intelligent terminal based on the target APP, updating attribute information of the target intelligent terminal related to control and processing operation in the local target APP; the first user terminal calls a cloud interface and reports the recently updated attribute information of the target intelligent terminal to a cloud; the cloud determines other second user terminals bound with the target intelligent terminal, and sends the attribute information to the other second user terminals in an MQTT message; and after receiving the MQTT message, the other second user terminals respectively update and synchronize the attribute information of the target intelligent terminal in the local target APP. So that other second user terminals can immediately and accurately synchronize the latest updated attribute information of the target intelligent terminal on the local target APP, the uniformity and accuracy of the attribute information on the target APPs of all the user terminals associated with the target intelligent terminal are ensured, and the user control experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1a is a schematic flow chart of an attribute information synchronization scheme of an intelligent terminal in the prior art.
Fig. 1b is a schematic view of a scene architecture of a scheme for synchronizing attribute information of an intelligent terminal based on MQTT according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram illustrating steps of a method for synchronizing attribute information of an intelligent terminal based on MQTT according to an embodiment of the present invention.
Fig. 3 is a schematic flowchart of a scheme for synchronizing attribute information of an intelligent terminal based on MQTT according to an embodiment of the present disclosure.
Fig. 4 is a schematic structural diagram of a system for synchronizing attribute information of an intelligent terminal based on MQTT according to an embodiment of the present specification.
Fig. 5 is an architecture diagram of an instantiated system for synchronizing attribute information of a smart terminal based on MQTT according to an embodiment of the present specification.
Fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of this specification.
Detailed Description
In order to make the technical solutions in the present specification better understood, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the accompanying drawings in one or more embodiments of the present specification, and it is obvious that the one or more embodiments described are only a part of the embodiments of the present specification, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from one or more of the embodiments described herein without making any inventive step shall fall within the scope of protection of this document.
The target intelligent device related to the embodiment of the present specification refers to any device, instrument or machine with computing and processing capabilities, and has a sensitive and accurate sensing function, a correct thinking and judging function and an effective execution function. The intelligent refrigerator can be an intelligent refrigerator, an intelligent air conditioner and the like.
The cloud end, namely the cloud server, provides an interface for the intelligent terminal to query data and process data and the like.
Target APP, software installed on a user terminal, has functions of user login, device binding (target intelligent device), and MQTT integration.
MySQL database, a relational database management system, stores data in different tables instead of putting all data in one large repository, which increases speed and flexibility.
The Redis database, namely REmote DIctionary Server (Redis), is a key-value storage system which runs based on memory and has high performance efficiency.
MQTT (Message Queuing Telemetry Transport) is a "lightweight" communication protocol based on publish/subscribe (publish/subscribe) mode. The intelligent device receives and pushes the message published by the management platform in real time through the MQTT in a mode of subscribing by taking user information as a theme.
In order to solve the technical problem in the background art, an embodiment of the present specification provides a scheme for synchronizing attribute information of an intelligent terminal based on a message queue telemetry transmission MQTT technology. When the user passes through APP controlgear, when local APP refreshes equipment information, other controllers/binding persons of the equipment are informed through the mode of MQTT push/notification, equipment information is refreshed immediately on other APPs through the mode, instant synchronization of information is achieved, and user experience is improved.
Referring to fig. 1b, a schematic view of a scene architecture applicable to a scheme for synchronizing attribute information of an intelligent terminal based on MQTT according to an embodiment of the present specification is shown. In the scenario architecture, the method can include: the system comprises a plurality of user terminals 102 provided with target APP, a cloud server 104, a database 106, an MQTT service platform 108 and a target intelligent terminal 110. Wherein, one user terminal 102 of the plurality of user terminals 102 controls the target intelligent terminal 110 by using the target APP under the operation of the user, and updates the attribute information of the target intelligent terminal 110 on the local target APP. Meanwhile, the updated attribute information is uploaded to the cloud server 104, so that the cloud server 104 determines other user terminals 102 associated with the target smart terminal 110 according to the target smart terminal 110. Then, the cloud server 104 packages the received attribute information into MQTT messages and issues the MQTT messages to the other user terminals 102, so that the other user terminals 102 update and synchronize the attribute information of the target intelligent terminal 110 on the local target APP.
In this way, unique identifiers of a plurality of user terminals bound with (i.e. installed with) the target intelligent terminal 110 are stored on the cloud server 104, so that the binding relationship is not required to be stored among the user terminals and updated attribute information is directly transmitted, only the cloud server 104 is required to assist transmission, and the cloud server 104 immediately issues the acquired updated attribute information of the target intelligent terminal to other user terminals in an MQTT message manner, so that other user terminals can immediately and accurately synchronize the latest updated attribute information of the target intelligent terminal on the local target APP, uniform and accurate attribute information on the target APPs of all user terminals associated with the target intelligent terminal is ensured, and user control experience is improved.
The following is a detailed description of the examples of the present specification.
Referring to fig. 2, a schematic diagram of steps of a method for synchronizing attribute information of an intelligent terminal based on MQTT provided in an embodiment of the present description is shown, where the method includes:
step 202: after a first user terminal logs in a target APP, initializing Message Queue Telemetry Transmission (MQTT) services deployed among all user terminals provided with the target APP, wherein the target APP is an application program used for controlling a target intelligent terminal.
Optionally, in step 202, when initializing a message queue telemetry transmission MQTT service deployed among all user terminals installed with the target APP, the first user terminal specifically subscribes to the MQTT service based on user information of the first user terminal, where the MQTT service is deployed among all user terminals installed with the target APP, and the user information at least includes: and (4) identifying the user. Therefore, the first user terminal initiating the control request can initiate the subscription of the MQTT service in the local target APP, and after the subscription is successful, the MQTT messages can be instantly transmitted between the plurality of user terminals deploying the MQTT service and the cloud.
Step 204: and after the first user terminal controls and processes the target intelligent terminal based on the target APP, updating the attribute information of the target intelligent terminal related to the control processing operation in the local target APP.
The first user terminal performs control processing on the target intelligent terminal based on the target APP, and the control processing may include: controlling the target intelligent terminal to adjust the equipment state and controlling the target intelligent terminal to alarm equipment; for example, when the target intelligent terminal is an intelligent refrigerator, the intelligent refrigerator can be controlled to automatically adjust the temperature of the refrigerator body, or the intelligent refrigerator can be controlled to automatically shut down or start up. Correspondingly, the attribute information of the target intelligent terminal at least comprises: alarm information, equipment state update information and fault information.
Step 206: and the first user terminal calls a cloud interface and reports the recently updated attribute information of the target intelligent terminal to a cloud.
Step 208: and the cloud determines other second user terminals bound with the target intelligent terminal, and sends the attribute information to the other second user terminals in the form of MQTT messages.
Optionally, when the cloud determines another second user terminal bound to the target intelligent terminal, specifically, based on the unique identifier of the target intelligent terminal corresponding to the received attribute information, it may be determined whether another user identifier associated with the unique identifier exists in a Redis database; if the user terminal corresponding to the other user identification is found in the Redis database, determining the user terminal corresponding to the other user identification as other second user terminals; if the unique identifier is not found in the Redis database, further searching whether other user identifiers related to the unique identifier exist in the Mysql database; and if the user terminal corresponding to the other searched user identifier is found in the Mysql database, determining the user terminal corresponding to the other searched user identifier as the other second user terminal, and if the user terminal is not found in the Mysql database, not processing the user terminal.
Further, when the cloud sends the attribute information to the other second user terminals in the MQTT message, service data may be specifically encapsulated based on an operation instruction corresponding to service processing content included in the attribute information; and issuing the MQTT message obtained after encapsulation to the other second user terminals.
Step 210: and after receiving the MQTT message, the other second user terminals respectively update and synchronize the attribute information of the target intelligent terminal in the local target APP.
And after receiving the MQTT message, other second user terminals analyze the MQTT message. When the message instruction is an alarm reminding service, the user can be reminded by popping up the frame and then informed. When the device information updating service is used, the cloud interface is triggered and called to refresh the current page data, so that the consistency of the device information of the local target APP page and the target APP page of another control device is ensured, the purpose of information synchronization is achieved, and the user experience is improved.
Further, referring to fig. 3, a schematic flow chart of a scheme for synchronizing attribute information of the intelligent terminal based on MQTT is shown.
The method comprises the following steps: after logging in the APP, a user initializes the MQTT service, subscribes the MQTT message by taking a/CID/i (which can be agreed according to the situation and is based on CID) as a theme, and monitors the MQTT message published by the theme in real time if the subscription is successful. When the CID is used for logging in by the user, the cloud generates a character string with unique identification on the basis of the user information, and the character string is used as a unique identification of the user at the cloud.
Secondly, the step of: after the user adopts the APP to control/manage the equipment, the interface can be updated in real time, and the interface is reported to the cloud end interface in real time to push, so that other users related to the equipment are reminded. For example: device information updates, service triggered alert alerts, etc.
③: and after the cloud receives and reports, the user information associated with the equipment is acquired from the Redis database through the unique equipment identifier.
Fourthly, the method comprises the following steps: and if the relevant user information of the intelligent equipment is not acquired in the Redis database, acquiring the user information from the Mysql database.
Fifthly: after the user information is obtained, the service data (including specific service processing instructions such as alarm reminding, equipment information updating and the like) is packaged, and the MQTT message is issued according to the theme of d/CID/i. At this point, a message is pushed to both the associated users of the device.
Sixthly, the method comprises the following steps: the associated user monitors the MQTT message of the current user theme as described in the first step, and once the theme message of the current user is pushed by the cloud, the associated user can immediately receive the MQTT push message at the APP terminal. And after receiving the message, analyzing the message. When the message instruction is an alarm reminding service, the user can be reminded by popping up the frame and then informed. When the device information updating service is used, the cloud interface is triggered and called to refresh the current page data, so that the information of the device information of the current page is ensured to be consistent with the information of the APP management page of another control device, the purpose of information synchronization is achieved, and the user experience is improved.
Referring to fig. 4, for the system for synchronizing attribute information of an intelligent terminal based on MQTT provided in the embodiment of the present specification, the system 400 may include: a first user terminal 402, other second user terminals 404, a cloud 406, a target intelligent terminal 408; and target APPs for controlling the target intelligent terminal are installed on the first user terminal 402 and the other second user terminals 404. The synchronization system of the embodiment of the present specification will be described with reference to the architecture diagram of the system instantiation shown in fig. 5.
After a first user terminal 402 logs in a target APP, initializing Message Queue Telemetry Transmission (MQTT) services deployed among all user terminals (including the first user terminal 402 and other second user terminals 404) provided with the target APP, wherein the target APP is an application program used for controlling a target intelligent terminal 408;
after the first user terminal 402 performs control processing on the target intelligent terminal 408 based on the target APP, updating attribute information of the target intelligent terminal 408 related to control processing operation in the local target APP;
the first user terminal 402 calls a cloud interface, and reports the latest updated attribute information of the target intelligent terminal 408 to a cloud 406;
the cloud 406 determines other second user terminals 404 bound with the target intelligent terminal 408, and sends the attribute information to the other second user terminals 404 in MQTT messages;
after receiving the MQTT message, the other second user terminals 404 update and synchronize the attribute information of the target intelligent terminal 408 in the local target APP, respectively.
Optionally, as an embodiment, when initializing the message queue telemetry transmission MQTT service deployed between all the user terminals installed with the target APP, the first user terminal is specifically configured to: subscribing to an MQTT service based on the user information of the first user terminal, wherein the MQTT service is deployed among all user terminals installed with the target APP, and the user information at least includes: and (4) identifying the user.
In a specific implementation manner of the embodiment of the present specification, the cloud is further configured with a Redis database and a Mysql database; when determining other second user terminals bound with the target intelligent terminal, the cloud is specifically configured to search whether other user identifiers associated with the unique identifiers exist in a Redis database based on the unique identifiers of the target intelligent terminal corresponding to the received attribute information; if the user terminal corresponding to the other user identification is found in the Redis database, determining the user terminal corresponding to the other user identification as other second user terminals; if the unique identifier is not found in the Redis database, further searching whether other user identifiers related to the unique identifier exist in the Mysql database; and if the user terminal corresponding to the other searched user identifier is found in the Mysql database, determining the user terminal corresponding to the other searched user identifier as the other second user terminal, and if the user terminal is not found in the Mysql database, not processing the user terminal.
In another specific implementation manner of the embodiment of this specification, the attribute information of the target intelligent terminal at least includes: alarm information, equipment state update information and fault information.
In another specific implementation manner of the embodiment of the present specification, when sending the attribute information to the other second user terminals in an MQTT message, the cloud is specifically configured to perform service data encapsulation based on an operation instruction corresponding to service processing content included in the attribute information; and issuing the MQTT message obtained after encapsulation to the other second user terminals.
In the embodiment of the specification, the target APP is integrated with an executable MQTT component. The cloud end is integrated with executable MQTT and Redis components. The MQTT push message body contains keys required for service processing to specify processing of targeted services. The MQTT push message body contains a value required by service processing and is used for appointing a certain appointed function (triggering and loading certain service data related to equipment, carrying out alarm reminding and the like) under the key.
It should be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the above-described synchronization system. In other embodiments of the invention, the synchronization system may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
An embodiment of the present invention further provides an electronic device, shown in fig. 6, including: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is used for calling the machine readable program to execute the method for synchronizing the attribute information of the intelligent terminal based on the MQTT in any embodiment of the invention.
The embodiment of the present invention further provides a computer readable medium, where the computer readable medium stores computer instructions, and when the computer instructions are executed by a processor, the processor is enabled to execute the method for synchronizing the attribute information of the intelligent terminal based on MQTT in any embodiment of the present invention. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Through the technical scheme, after a first user terminal logs in a target APP, message queue telemetry transmission MQTT service deployed among all user terminals provided with the target APP is initialized, wherein the target APP is an application program used for controlling a target intelligent terminal; after the first user terminal controls and processes the target intelligent terminal based on the target APP, updating attribute information of the target intelligent terminal related to control and processing operation in the local target APP; the first user terminal calls a cloud interface and reports the recently updated attribute information of the target intelligent terminal to a cloud; the cloud determines other second user terminals bound with the target intelligent terminal, and sends the attribute information to the other second user terminals in an MQTT message; and after receiving the MQTT message, the other second user terminals respectively update and synchronize the attribute information of the target intelligent terminal in the local target APP. So that other second user terminals can immediately and accurately synchronize the latest updated attribute information of the target intelligent terminal on the local target APP, the uniformity and accuracy of the attribute information on the target APPs of all the user terminals associated with the target intelligent terminal are ensured, and the user control experience is improved.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
It should be noted that not all steps and modules in the above flows and system structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
In the above embodiments, the hardware unit may be implemented mechanically or electrically. For example, a hardware element may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware elements may also comprise programmable logic or circuitry, such as a general purpose processor or other programmable processor, that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that various combinations of the code auditing means in the various embodiments described above may be used to obtain further embodiments of the invention, which are also within the scope of the invention.

Claims (10)

1. A method for synchronizing attribute information of an intelligent terminal based on MQTT is characterized by comprising the following steps:
initializing Message Queue Telemetry Transmission (MQTT) service deployed among all user terminals provided with a target APP after a first user terminal logs in the target APP, wherein the target APP is an application program used for controlling a target intelligent terminal;
after the first user terminal controls and processes the target intelligent terminal based on the target APP, updating attribute information of the target intelligent terminal related to control and processing operation in the local target APP;
the first user terminal calls a cloud interface and reports the recently updated attribute information of the target intelligent terminal to a cloud;
the cloud determines other second user terminals bound with the target intelligent terminal, and sends the attribute information to the other second user terminals in an MQTT message;
and after receiving the MQTT message, the other second user terminals respectively update and synchronize the attribute information of the target intelligent terminal in the local target APP.
2. The method for synchronizing the attribute information of the intelligent terminal based on MQTT according to claim 1, wherein initializing message queue telemetry transmission MQTT services deployed among all user terminals installed with the target APP comprises:
subscribing to an MQTT service based on the user information of the first user terminal, wherein the MQTT service is deployed among all user terminals installed with the target APP, and the user information at least includes: and (4) identifying the user.
3. The method for synchronizing attribute information of smart terminals based on MQTT according to claim 1, wherein the cloud determines other second user terminals bound to the target smart terminal, and specifically includes:
the cloud end searches whether other user identifications related to the unique identification exist in a Redis database based on the unique identification of the target intelligent terminal corresponding to the received attribute information;
if the user terminal corresponding to the other user identification is found in the Redis database, determining the user terminal corresponding to the other user identification as other second user terminals;
if the unique identifier is not found in the Redis database, further searching whether other user identifiers related to the unique identifier exist in the Mysql database; and if the user terminal corresponding to the other searched user identifier is found in the Mysql database, determining the user terminal corresponding to the other searched user identifier as the other second user terminal, and if the user terminal is not found in the Mysql database, not processing the user terminal.
4. The method for synchronizing the attribute information of the intelligent terminals based on the MQTT according to any one of claims 1 to 3, wherein the attribute information of the target intelligent terminal at least comprises:
alarm information, equipment state update information and fault information.
5. The method for synchronizing the attribute information of the intelligent terminal based on the MQTT according to claim 1, wherein the cloud sends the attribute information to the other second user terminals in MQTT messages, specifically comprising:
the cloud end packages the service data based on the operation instruction corresponding to the service processing content contained in the attribute information;
and the cloud end issues the MQTT message obtained after encapsulation to other second user terminals.
6. A system for synchronizing attribute information of an intelligent terminal based on MQTT is characterized by comprising the following steps: the system comprises a first user terminal, other second user terminals, a cloud terminal and a target intelligent terminal; target APPs used for controlling the target intelligent terminal are installed on the first user terminal and the other second user terminals;
initializing Message Queue Telemetry Transmission (MQTT) service deployed among all user terminals provided with a target APP after a first user terminal logs in the target APP, wherein the target APP is an application program used for controlling a target intelligent terminal;
after the first user terminal controls and processes the target intelligent terminal based on the target APP, updating attribute information of the target intelligent terminal related to control and processing operation in the local target APP;
the first user terminal calls a cloud interface and reports the recently updated attribute information of the target intelligent terminal to a cloud;
the cloud determines other second user terminals bound with the target intelligent terminal, and sends the attribute information to the other second user terminals in an MQTT message;
and after receiving the MQTT message, the other second user terminals respectively update and synchronize the attribute information of the target intelligent terminal in the local target APP.
7. The system for synchronizing attribute information of intelligent terminals based on MQTT according to claim 6, wherein the first user terminal, when initializing message queue telemetry transmission MQTT services deployed among all user terminals installed with the target APP, is specifically configured to:
subscribing to an MQTT service based on the user information of the first user terminal, wherein the MQTT service is deployed among all user terminals installed with the target APP, and the user information at least includes: and (4) identifying the user.
8. The system for synchronizing the attribute information of the intelligent terminal based on the MQTT according to claim 6, wherein a Redis database and a Mysql database are further deployed at the cloud; when determining other second user terminals bound to the target intelligent terminal, the cloud is specifically configured to:
based on the unique identifier of the target intelligent terminal corresponding to the received attribute information, searching whether other user identifiers related to the unique identifier exist in a Redis database;
if the user terminal corresponding to the other user identification is found in the Redis database, determining the user terminal corresponding to the other user identification as other second user terminals;
if the unique identifier is not found in the Redis database, further searching whether other user identifiers related to the unique identifier exist in the Mysql database; and if the user terminal corresponding to the other searched user identifier is found in the Mysql database, determining the user terminal corresponding to the other searched user identifier as the other second user terminal, and if the user terminal is not found in the Mysql database, not processing the user terminal.
9. The system for synchronizing the attribute information of the intelligent terminals based on the MQTT according to any one of claims 6 to 8, wherein the attribute information of the target intelligent terminal at least comprises:
alarm information, equipment state update information and fault information.
10. The MQTT-based system for synchronizing the attribute information of the smart terminal according to claim 6, wherein the cloud, when sending the attribute information to the other second user terminals in MQTT messages, is specifically configured to:
performing service data encapsulation based on an operation instruction corresponding to the service processing content contained in the attribute information;
and issuing the MQTT message obtained after encapsulation to the other second user terminals.
CN202111054854.4A 2021-09-09 2021-09-09 MQTT-based method and system for synchronizing attribute information of intelligent terminal Pending CN113760581A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111054854.4A CN113760581A (en) 2021-09-09 2021-09-09 MQTT-based method and system for synchronizing attribute information of intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111054854.4A CN113760581A (en) 2021-09-09 2021-09-09 MQTT-based method and system for synchronizing attribute information of intelligent terminal

Publications (1)

Publication Number Publication Date
CN113760581A true CN113760581A (en) 2021-12-07

Family

ID=78794228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111054854.4A Pending CN113760581A (en) 2021-09-09 2021-09-09 MQTT-based method and system for synchronizing attribute information of intelligent terminal

Country Status (1)

Country Link
CN (1) CN113760581A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174297A (en) * 2022-05-30 2022-10-11 青岛海尔科技有限公司 Attribute information updating method and device, storage medium and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103558836A (en) * 2013-11-19 2014-02-05 海信集团有限公司 Method for synchronously controlling device status and household appliance
CN106302055A (en) * 2016-09-26 2017-01-04 Tcl集团股份有限公司 The synchronous updating method of a kind of smart machine state and system
CN106899464A (en) * 2017-02-28 2017-06-27 杭州古北电子科技有限公司 Intelligent home furnishing control method
CN110034983A (en) * 2019-03-08 2019-07-19 佛山市云米电器科技有限公司 Home equipment interlock method and system based on Publish-subscribe message processing facility
CN110545310A (en) * 2019-08-12 2019-12-06 安徽云探索网络科技有限公司 Intelligent home system and data information coordination and synchronization updating method thereof
CN110716439A (en) * 2019-10-21 2020-01-21 合肥美的电冰箱有限公司 Household appliance state synchronization method, household appliance and medium
CN113067882A (en) * 2021-03-31 2021-07-02 建信金融科技有限责任公司 Message processing method and device, electronic equipment and medium
CN113177093A (en) * 2021-05-24 2021-07-27 商汤国际私人有限公司 Data synchronization method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103558836A (en) * 2013-11-19 2014-02-05 海信集团有限公司 Method for synchronously controlling device status and household appliance
CN106302055A (en) * 2016-09-26 2017-01-04 Tcl集团股份有限公司 The synchronous updating method of a kind of smart machine state and system
CN106899464A (en) * 2017-02-28 2017-06-27 杭州古北电子科技有限公司 Intelligent home furnishing control method
CN110034983A (en) * 2019-03-08 2019-07-19 佛山市云米电器科技有限公司 Home equipment interlock method and system based on Publish-subscribe message processing facility
CN110545310A (en) * 2019-08-12 2019-12-06 安徽云探索网络科技有限公司 Intelligent home system and data information coordination and synchronization updating method thereof
CN110716439A (en) * 2019-10-21 2020-01-21 合肥美的电冰箱有限公司 Household appliance state synchronization method, household appliance and medium
CN113067882A (en) * 2021-03-31 2021-07-02 建信金融科技有限责任公司 Message processing method and device, electronic equipment and medium
CN113177093A (en) * 2021-05-24 2021-07-27 商汤国际私人有限公司 Data synchronization method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174297A (en) * 2022-05-30 2022-10-11 青岛海尔科技有限公司 Attribute information updating method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US9525587B2 (en) Updating web resources
US9792623B2 (en) Advertisement processing method and apparatus
CN107741844B (en) Method and device for generating application installation package
US11360737B2 (en) Method and apparatus for providing speech service
WO2016202000A1 (en) Differential rollback upgrading method and apparatus
CN111090533B (en) Bulletin information sending method, bulletin information sending device, electronic equipment and storage medium
CN111726456A (en) Data processing method and related device
CN113779422B (en) Method and device for realizing relationship chain label, electronic equipment and storage medium
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
CN112256451A (en) Timing service message generation method and device, electronic equipment and storage medium
CN113760581A (en) MQTT-based method and system for synchronizing attribute information of intelligent terminal
CN111107147B (en) Message pushing method and device
US20180300122A1 (en) Data processing method and system, and server
CN113656091B (en) Method for realizing independent open program process, related device and equipment
CN113452776B (en) PaaS platform service scheduling method and device and PaaS platform
CN113434233B (en) Interface jump method and device, storage medium and electronic device
CN111679842A (en) Application program hot update processing method, device and system
CN112000618B (en) File change management method, device, equipment and storage medium for cluster nodes
CN110768811A (en) Method, device and system for updating YANG model file library
CN114610366A (en) Difference package upgrading method and system, intelligent electronic equipment and storage medium
CN114610446A (en) Method, device and system for automatically injecting probe
US20220150348A1 (en) Method for Service Decision Distribution Among Multiple Terminal Devices and System
CN112083945A (en) NPM installation package update prompting method and device, electronic equipment and storage medium
CN112328245A (en) Page display method, system, electronic equipment and storage medium
CN111489540A (en) Intelligent device control method and device, computer readable medium and electronic 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20211207