Information updating method, intelligent device, Internet of Things platform, device and medium
By self-monitoring and updating information when the smart device restarts, the problem that smart devices cannot obtain the latest information of the IoT platform in time is solved, and the information is updated in a timely manner and accuracy is achieved.
Patent Information
- Application Number
- CN202410716647.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-11-22
AI Technical Summary
After restarting, smart devices cannot obtain the latest information on the Internet of Things platform in time, resulting in untimely updates of information.
When a smart device detects a restart signal, it obtains the latest information stored in advance, sends it to the Internet of Things platform for comparison, and updates it if the information is inconsistent to ensure the latest information.
Through the self-monitoring and information update mechanism of smart devices, we ensure that smart devices can promptly obtain the latest news of the Internet of Things platform after restarting, avoid information update delays, and ensure the accuracy and real-time information.
Smart Images

Figure CN119012140A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and specifically, to an information updating method, a smart device, an Internet of Things platform, a device and a medium. Background Art
[0002] In the prior art, smart devices usually connect to the IoT platform through the network to obtain the latest information on the IoT platform, and then display the latest information or perform corresponding operations based on the latest information through the built-in devices. At the same time, in order to ensure the real-time and accuracy of various information, the IoT platform will continuously update the information and send the latest information to the smart device. However, due to the restart of the smart device, the smart device has the problem of not being able to obtain the latest information in time. Summary of the invention
[0003] The embodiments of the present application provide an information updating method, a smart device, an Internet of Things platform, a device and a storage medium, which are used to solve the technical problem of being unable to obtain the latest information in a timely manner.
[0004] According to a first aspect of an embodiment of the present application, a method for updating information is provided, which is applied to a smart device, and the method includes: If it is detected that the smart device is powered on again, a restart signal is generated and the pre-stored first information is obtained; the restart signal is used to indicate that the smart device has restarted, and the first information includes the latest message of at least one target category stored in the smart device; each latest message of the target category corresponds to an operation; Sending the restart signal and the first information to the IoT platform, so that the IoT platform determines the second information, and for each target category, compares the second information corresponding to the same target category with the first information; the second information is the latest news of each target category stored in the IoT platform; Receive second information corresponding to the target category sent by the Internet of Things platform when determining that the first information and the second information corresponding to the same target category are inconsistent, and perform a corresponding operation based on the second information.
[0005] In a possible implementation, the smart device includes an electric control board and a wireless communication module. If the electric control board detects that it is powered on again, it generates a restart signal in a first format, obtains pre-stored first information in a first format, and sends the restart signal in the first format and the first information in the first format to the wireless communication module; The wireless communication module performs format conversion on the restart signal and the first information in the first format to obtain the restart signal in the second format and the first information in the second format; The wireless communication module sends a restart signal in a second format and first information in a second format to the Internet of Things platform; The wireless communication module receives the second information in the second format transmitted by the Internet of Things platform, performs format conversion on the second information in the second format to obtain the second information in the first format, and sends the second information in the first format to the electric control board; The electric control board stores the second information in the first format and performs a corresponding operation based on the second information.
[0006] In another possible implementation, the distance between the external antenna of the wireless communication module and the electric control board is greater than a preset distance threshold.
[0007] In yet another possible implementation, if the latest message of any target category sent by the IoT platform through a preset communication channel is received after power-on, the stored first message of the target category is replaced with the latest message; Perform corresponding operations based on the latest news; Among them, the preset communication channel is built based on the MQTT protocol.
[0008] In yet another possible implementation, when the target category of the second information is weather information, the second information is converted into a corresponding target text; Displaying the target text in the first area and announcing the target text by voice; The first area is used to display weather information.
[0009] According to a second aspect of an embodiment of the present application, a method for updating information is provided, which is applied to an Internet of Things platform, and the method includes: If a restart signal and first information sent by the smart device are received, the second information is determined according to the first information; the restart signal is used to indicate that the smart device has restarted, the first information includes the latest message of at least one target category stored in the smart device; the second information is the latest message of each target category stored in the Internet of Things platform, and each latest message of the target category corresponds to an operation; For each target category, comparing the first information corresponding to the target category with the second information corresponding to the target category; If it is determined that the first information corresponding to the target category is inconsistent with the second information corresponding to the target category, the second information corresponding to the target category is sent to the smart device, so that the smart device performs a corresponding operation based on the second information.
[0010] In a possible implementation, if the latest message of any target category is obtained, the latest message is stored in at least two preset nodes; Sending the latest message to the smart device through a preset communication channel, so that the smart device replaces the first message of the target category stored in the smart device with the latest message; Among them, the preset communication channel is built based on the MQTT protocol.
[0011] According to a third aspect of an embodiment of the present application, a smart device is provided, the device comprising: an acquisition module, for generating a restart signal and acquiring pre-stored first information if it is detected that the smart device has been powered on again; the restart signal is used to indicate that the smart device has restarted, and the first information includes the latest message of at least one target category stored in the smart device; each latest message of the target category corresponds to an operation; A sending module, used to send the restart signal and the first information to the Internet of Things platform, so that the Internet of Things platform determines the second information, and for each target category, compares the second information corresponding to the target category with the first information corresponding to the target category, wherein the second information is the latest message of each target category stored in the Internet of Things platform; The processing module is used to receive the second information corresponding to the target category sent by the Internet of Things platform when it is determined that the first information corresponding to the target category is inconsistent with the second information corresponding to the target category, and perform a corresponding operation based on the second information.
[0012] According to a fourth aspect of an embodiment of the present application, an Internet of Things platform is provided, the device comprising: A determination module, configured to determine second information according to the first information if a restart signal and first information sent by a smart device are received; the restart signal is used to indicate that the smart device has restarted, the first information includes the latest message of at least one target category stored in the smart device; the second information is the latest message of each target category stored in the Internet of Things platform, and each latest message of the target category corresponds to an operation; a comparison module, for comparing, for each target category, first information corresponding to the target category with second information corresponding to the target category; The transmission module is used to send the second information corresponding to the target category to the smart device if it is determined that the first information corresponding to the target category is inconsistent with the second information corresponding to the target category, so that the smart device performs a corresponding operation based on the second information.
[0013] According to a fifth aspect of an embodiment of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory, and when the processor executes the program, the steps of the method provided in the first aspect or the second aspect are implemented.
[0014] According to a sixth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in the first aspect or the second aspect are implemented.
[0015] According to the seventh aspect of the embodiments of the present application, a computer program product is provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. When a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the computer device performs the steps of implementing the method provided in the first aspect or the second aspect.
[0016] The beneficial effects of the technical solution provided by the embodiment of the present application are: The information updating method provided in the embodiment of the present application performs self-monitoring through a smart device, and when detecting that it is powered on again, obtains a restart signal representing the restart behavior of the smart device and first information representing the latest message stored in the smart device, and sends them together to the Internet of Things platform, so that when the Internet of Things platform determines that the smart device has restarted based on the received restart signal, the first information representing the latest message of the target category stored in the smart information storage is compared with the second information representing the latest message of the target category stored in the Internet of Things platform. When the Internet of Things platform determines that the first information is inconsistent with the second information, the smart device receives the second information sent by the Internet of Things platform, so that the Internet of Things platform can perform corresponding operations based on the latest message, avoiding the inability of the smart device to obtain the latest message stored in the Internet of Things platform in time due to the restart of the smart device, and ensuring that the Internet of Things platform can perform corresponding operations according to the latest message. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0018] Figure 1 A schematic diagram of the system architecture of a method for updating information provided in an embodiment of the present application; Figure 2 A flowchart of a method for updating information of a smart device provided in an embodiment of the present application; Figure 3 A flowchart of a method for updating information provided in an embodiment of the present application; Figure 4 A flowchart of a method for updating information applied to an Internet of Things platform provided in an embodiment of the present application; Figure 5 A schematic diagram of an interactive process of an information updating method provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of a smart device provided in an embodiment of the present application; Figure 7 A schematic diagram of the structure of an Internet of Things platform provided in an embodiment of the present application; Figure 8A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0020] Those skilled in the art will appreciate that, unless expressly stated, the singular forms "one", "an", "" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or may refer to the one element and the other element establishing a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" may be implemented as "A", or as "B", or as "A and B".
[0021] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0022] The following is an explanation of the relevant technology: In the relevant technology, the heartbeat mechanism is used to determine the online status of the smart device and to promptly detect whether the connection is disconnected. However, when the smart device responds to the heartbeat response sent by the IoT platform before and after the restart, the IoT platform will not be able to detect that the smart device has restarted, nor will it know that the smart device has lost the latest message, and thus will not be able to send the latest message to the smart device.
[0023] In response to at least one of the above-mentioned technical problems or areas that need improvement in the relevant technology, the present application proposes an information updating method, in which a smart device performs self-monitoring, and when it detects that it has been powered on again, obtains a restart signal representing its own restart behavior and first information representing the latest message stored in the smart device, and sends them together to an Internet of Things platform, so that when the Internet of Things platform determines that the smart device has restarted based on the received restart signal, it compares the first information representing the latest message of the target category stored in the smart information with the second information representing the latest message of the target category stored in the Internet of Things platform. When the Internet of Things platform determines that the first information is inconsistent with the second information, the smart device receives the second information sent by the Internet of Things platform, so that the Internet of Things platform can perform corresponding operations based on the latest message, avoiding the inability of the smart device to obtain the latest message stored in the Internet of Things platform in time due to the restart of the smart device, and ensuring that the Internet of Things platform can perform corresponding operations according to the latest message.
[0024] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0025] Figure 1 A schematic diagram of a system architecture for implementing an information updating method provided in an embodiment of the present application, wherein the system architecture includes: a smart device 120 and an Internet of Things platform 140.
[0026] The smart device 120 installs and runs an application program having an information updating method, and the smart device 120 is used to interact with the IoT platform to obtain the latest information.
[0027] The smart device 120 is connected to the Internet of Things platform 140 via a wireless network or a wired network.
[0028] The Internet of Things platform 140 includes at least one of an Internet of Things platform, multiple Internet of Things platforms, a cloud computing platform, and a virtualization center. Schematically, the Internet of Things platform 140 includes a processor 144 and a memory 142, and the memory 142 includes a display module 1421, a control module 1422, and a receiving module 1423. The Internet of Things platform 140 is used to provide background services for the application of the information update method. Optionally, the Internet of Things platform 140 undertakes the main computing work and the smart device 120 undertakes the secondary computing work; or, the Internet of Things platform 140 undertakes the secondary computing work and the smart device 120 undertakes the main computing work; or, the Internet of Things platform 140 and the smart device 120 adopt a distributed computing architecture for collaborative computing.
[0029] Those skilled in the art will appreciate that the number of the above-mentioned smart devices may be more or less. For example, the above-mentioned smart device may be only one, or the above-mentioned smart devices may be dozens or hundreds, or more. The embodiment of the present application does not limit the number and device type of the smart devices.
[0030] The present application provides an information updating method, which is applied to a smart device, such as Figure 2 As shown, the method includes: S101, if it is detected that the smart device is powered on again, a restart signal is generated and the first information stored in advance is obtained; the restart signal is used to indicate that the smart device has restarted, and the first information includes the latest message of at least one target category stored in the smart device; the latest message of each target category corresponds to an operation.
[0031] In the embodiments of the present application, a smart device refers to a device that integrates computing, communication, and control technologies, can communicate and interact with other devices or systems through the Internet or other networks, and has a certain degree of automation and intelligent functions. The smart device can be a smart home, such as a clothes dryer, a smart speaker, a smart lamp, a smart door lock, etc., a smart watch, a smart vehicle, etc.
[0032] In an embodiment of the present application, the restart signal is a signal used to characterize that a smart device has restarted; the first information is the latest message of at least one target category stored in the smart device. Each time the latest message of each target category is transmitted to the smart device by the Internet of Things platform, the latest message will be stored locally by the smart device. The first information may be the latest weather information, the latest temperature information, the latest page layout information, and other information. That is to say, the target categories in the above first information are weather information, temperature information, and page layout information.
[0033] In an embodiment of the present application, when a restart behavior of the electric control board is detected and a restart signal is generated as follows: when the electric control board is restarted, the startup sequence number stored in the RAM is usually cleared, while the startup sequence number stored in the ROM will not be affected. Each time the electric control board is powered on, it will automatically generate a startup sequence number and store it in the RAM, and then compare the startup sequence number in the ROM with the startup sequence number on the RAM. If the startup sequence numbers are inconsistent, it is considered that the electric control board has restarted, and then the startup sequence number in the ROM is updated at the same time, and the value of the register corresponding to the restart signal is changed from 0 to 1.
[0034] In an embodiment of the present application, each latest message of a target category has a corresponding operation, and the operation here refers to the operation performed by the smart device. Since the latest messages are sent to the smart device by the Internet of Things platform, the Internet of Things platform can instruct the smart device to perform corresponding operations according to the latest messages by sending the latest messages to the smart device. For example, the operation corresponding to the latest message of weather information is to update the weather information to the latest message of weather information. Then, when the smart device receives the latest message of weather information sent by the Internet of Things platform, the latest message of weather information will be displayed in the display area of the weather information. For example, the operation corresponding to the latest message of page layout information is to update the page layout of the visual interface of the smart device. Then, the smart device will adjust the page layout of the visual interface of the smart device according to the latest message of page layout information received.
[0035] In the embodiment of the present application, when the smart device monitors that it is powered on again, it indicates that the smart device has been restarted, and therefore, a restart signal and the latest message of at least one target category are generated.
[0036] In an embodiment of the present application, the smart device includes an electronic control board and a wireless communication module. The electronic control board is used to control various functions and operations of the device. The electronic control board realizes the intelligent functions of the smart device by receiving data, processing information and executing control instructions; the wireless communication module can connect the smart device to a wireless local area network, which is used to realize wireless communication between the Internet and the smart device.
[0037] In an embodiment of the present application, when the electric control board detects that the power supply is reconnected, it obtains a pre-stored restart signal and the first information. A power detection circuit or capacitor can be set on the electric control board to detect whether the smart device is powered on again.
[0038] In the embodiment of the present application, the distance between the external antenna of the wireless communication module and the electric control board is greater than a preset distance threshold.
[0039] In an embodiment of the present application, the external antenna of the wireless communication module is used to enhance the communication effect between the wireless communication module and the Internet of Things platform, and to improve the signal transmission distance and stability. In order to ensure the best reception and transmission effect of the signal, the external antenna is set at a position greater than a preset distance threshold from the electric control board, that is, the external antenna is kept as far away from the electric control board as possible to avoid interference with the wireless signal by wireless protocols such as Bluetooth emitted by the electric control board. In addition, the distance between the external antenna and the metal parts of the smart device is set to be greater than the preset distance threshold to avoid interference with the wireless signal by the metal parts of the smart device.
[0040] S102, sending the restart signal and the first information to the Internet of Things platform, so that the Internet of Things platform determines the second information, and for each target category, compares the second information corresponding to the same target category with the first information, the second information being the latest message of each target category stored in the Internet of Things platform.
[0041] In an embodiment of the present application, after the smart device obtains the restart signal and the first information, it sends the restart signal and the first information together to the Internet of Things platform, so that when the Internet of Things platform receives the restart signal, the Internet of Things platform determines that the smart device has restarted, and therefore determines the latest message (second message) of each target category stored in the Internet of Things platform, and compares the latest message of at least one target category stored in the smart device with the latest message of each target category stored in the Internet of Things platform, that is, compares the second information with the second information, so that the Internet of Things platform determines whether the latest message of each target category currently stored in the smart device is the latest message stored in the Internet of Things platform. In an embodiment of the present application, the second information is the latest message of each target category stored in the Internet of Things platform. Since each message will be first stored in the Internet of Things platform after being updated, and then sent to the smart device, that is to say, the second message is also the latest message of each target category.
[0042] In one example, the first information includes the latest messages of Class A, Class B, and Class C stored in the smart device. After the smart device sends the first information to the Internet of Things platform, the Internet of Things platform determines that the messages in the first information are the latest messages of Class A, Class B, and Class C after receiving the first information. Therefore, the Internet of Things platform obtains the second messages corresponding to Class A, Class B, and Class C from the stored latest messages, and then compares the first message corresponding to Class A with the second message, compares the first message corresponding to Class B with the second message, and compares the first message corresponding to Class C with the second message.
[0043] In an embodiment of the present application, after the electric control board obtains the restart signal and the first information, it first sends the restart signal to the wireless communication module, and then the wireless communication module sends the restart signal and the first information to the Internet of Things platform.
[0044] S103, receiving the second information sent by the Internet of Things platform when determining that the first information and the second information corresponding to the same target category are inconsistent, and performing a corresponding operation based on the second information.
[0045] In an embodiment of the present application, since the second information is sent when the Internet of Things platform determines that the first information is inconsistent with the second, if the smart device receives the second information sent by the Internet of Things platform, it means that the latest message of at least one target category currently stored in the smart device is not the latest message of the target category, and the received second information is stored locally as the latest message of the above-mentioned target category, and the corresponding operation is performed based on the second information.
[0046] In an example, the IoT platform compares the first message corresponding to Class A with the second message, the first message corresponding to Class B with the second message, and the first message corresponding to Class C with the second message. If the smart device receives the second message corresponding to Class A, it means that the IoT platform determines that the latest message corresponding to Class A stored in the smart device is inconsistent with the latest message corresponding to Class A stored in the IoT platform.
[0047] The smart device sends a restart signal and the first information to the IoT platform when it restarts, ensuring that in the event of data loss or the currently acquired information of each target category is not the latest information, the smart device obtains the latest information of each target category stored in the IoT platform through the restart signal and the first information, thereby ensuring that the smart device performs corresponding operations according to the current latest information, thereby ensuring the accuracy of each operation and information of the smart device.
[0048] In an embodiment of the present application, the operation corresponding to the second information varies according to the target category. For example, when the second information is the latest news of weather information, the corresponding operation is to display the second information in the weather display area. Then, when the smart device receives the second information whose target category is weather information, the above second information is displayed in the weather display area.
[0049] refer to Figure 3 , which exemplarily shows a flow chart of a method for updating information, the specific contents are as follows: S201, if the electric control board detects that it is powered on again, it generates a restart signal in a first format, obtains pre-stored first information in a first format, and sends the restart signal in the first format and the first information in the first format to the wireless communication module; S202, the wireless communication module performs format conversion on the restart signal in the first format and the first information in the first format to obtain the restart signal in the second format and the first information in the second format; S203, the wireless communication module sends a restart signal in a second format and first information in a second format to the Internet of Things platform; S204, the wireless communication module receives the second information in the second format transmitted by the Internet of Things platform, performs format conversion on the second information in the second format to obtain the second information in the first format, and sends the second information in the first format to the electric control board; S205, the electric control board stores the second information in the first format, and performs a corresponding operation based on the second information.
[0050] In an embodiment of the present application, the first format is the format of data for communication between the electronic control board and the wireless communication module. The first format can be hexadecimal. Hexadecimal data is usually more compact than data in other formats, and can use fewer bits to represent the same information. Less storage resources and bandwidth are required, and the data transmission speed can also be improved. The first format can also be binary data. Since binary data is a commonly used raw data representation format inside the computer, it can be directly mapped to hardware operations and processing without the need for additional data format conversion. Therefore, the efficiency of data conversion can be improved.
[0051] It should be noted that which format is selected as the first format depends on the application scenario, communication protocol and data transmission requirements of the smart device.
[0052] In an embodiment of the present application, the second format is the format of data for communication between the wireless communication module and the Internet of Things platform. The second format can be a JSON format. Data in JSON format is lightweight data. The data is easy to read and write, which reduces the complexity of data interaction and has good compatibility between different platforms and programming languages. It can meet the data interaction in various scenarios; the second format can also be an XML format. Data in XML format can be used to represent complex data structures and has certain flexibility and scalability.
[0053] In an embodiment of the present application, the electric control board and the wireless communication module of the smart device can communicate through hexadecimal instructions transmitted through the serial port. Serial port transmission can achieve efficient data transmission, and hexadecimal instructions can represent data more compactly, reduce the overhead of data transmission, and improve transmission efficiency. Serial port transmission usually also has high stability and reliability, which can ensure accurate transmission of data. By using hexadecimal instructions for communication, errors and interference in data transmission can be reduced, and the reliability of communication can be improved.
[0054] In S201 of the embodiment of the present application, when the electric control board detects that it is powered on again, it generates a restart signal in a first format, obtains first information in a first format, and then sends a restart signal in a first format and the first information in a first format to the wireless communication module.
[0055] In S202 of an embodiment of the present application, after the wireless communication module receives a restart signal in a first format and a first message in a first format, the restart signal and the first message in the first format are format-converted to obtain a restart signal and the first message in a second format. For example, the Internet of Things platform receives a restart signal in hexadecimal and a first message in hexadecimal, and then converts the restart signal and the first message into a restart signal and the first message in JSON format.
[0056] In the embodiment of the present application, the communication protocol between the wireless communication module and the IoT platform is a JSON-formatted object model, which is a commonly used communication protocol in the IoT field and is used to describe the communication data format and specifications between smart devices and IoT platforms. The JSON-formatted object model is usually based on the JSON format and is used to define information such as device properties, states, commands, and events, so that data exchange and communication can be carried out between the device and the IoT platform.
[0057] In an example, the restart signal in the first format is 0x61, and the first information in the first format is 0x62. According to the pre-generated object model mapping table of the smart device, the restart signal and the first information in the first format are converted into the JSON format {"restart":1, "WSN":"1711364615044"}. The object model mapping table can define how to understand hexadecimal data, and then map the hexadecimal data to the field in the JSON format. That is, the role of the object model mapping table is to determine a conversion rule, and then the conversion rule converts the obtained hexadecimal data into the JSON format.
[0058] In S203 of the embodiment of the present application, the wireless communication module sends the restart signal in the second format and the first information to the Internet of Things platform.
[0059] In S204 of the embodiment of the present application, when the wireless communication module receives the second information in the second format sent by the Internet of Things platform, it indicates that the first information is not the latest message of the target category. Since the wireless communication module interacts with the electric control board through information in the first format, the second information in the second format is converted into the second information in the first format, and then the second information in the first format is sent to the electric control board.
[0060] In S205 of the embodiment of the present application, the electric control board receives the second information in the first format sent by the wireless communication module, and determines that the latest message of the target category currently stored in the electric control board is the latest message, and therefore, performs a corresponding operation based on the second information.
[0061] The electric control board uses the first format to store the restart signal and the latest message of each target category, which can more effectively utilize the less storage space of the electric control board. Before sending the restart signal and the first message to the IoT platform, the wireless communication module converts the message into the second format to ensure the consistency and comprehensibility of the data during transmission. This helps the interoperability between different devices and platforms, so that the data can be effectively received and processed by the IoT platform.
[0062] In an embodiment of the present application, if the latest message of any target category is received from the Internet of Things platform through a preset communication channel after power-on, the stored first message of the target category is replaced with the latest message; the corresponding operation is performed based on the latest message; wherein the preset communication channel is constructed based on the MQTT (Message Queuing TelemetryTransport) protocol.
[0063] In the embodiment of the present application, when the latest message of any target category is updated, the IoT platform will send the latest message of the target category to the smart device. When the smart device receives the latest message sent by the IoT platform, it will replace the stored message of the target category with the latest message according to the target category of the latest message, and then perform the corresponding operation based on the latest message. For example, the latest message sent by the IoT platform is the latest message of the weather message, and the latest message of the weather message is "Tomorrow's weather is sunny", and the latest message of the weather information stored by the smart device is "Tomorrow's light rain", then after the smart device receives the above latest message sent by the IoT platform, it will clear the stored "Tomorrow's light rain" and store "Tomorrow's weather is sunny".
[0064] In the embodiment of the present application, the interaction between the Internet of Things platform and the wireless communication module is carried out based on the MQTT protocol. The MQTT protocol has a small communication overhead and is suitable for use in environments with limited bandwidth and unstable network connections. Therefore, the MQTT protocol ensures that smart devices can receive the latest messages of any target category transmitted by the Internet of Things platform even when the network is unstable, ensuring that smart devices can be updated in time according to the latest messages.
[0065] When a smart device receives the latest message, it first replaces the first message of the corresponding target category that has been stored with the latest message according to the target category of the latest message, and performs corresponding operations based on the latest message, ensuring that the latest messages of each target category stored in the smart device are updated in a timely manner. Receiving the latest message through the channel built by the MQTT protocol can ensure reliable data transmission.
[0066] In an embodiment of the present application, when the target category of the second information is weather information, the second information is converted into a corresponding target text; the target text is displayed in the first area, and the target text is announced by voice; wherein the first area is used to display weather information.
[0067] In the embodiment of the present application, the first area is used to display the target text of the weather information, and the operation corresponding to the latest news of the weather information is to display the target text of the weather information in the first area, and play the target text by voice broadcast. Therefore, when the target category of the second information received by the smart device is weather information, the second information is first converted into the corresponding target text, and then the target text is displayed in the first area. For example, the second information is represented by hexadecimal data, and according to the predetermined conversion rules, the second information is converted into a target text that can be understood by the user, that is, text, and then the smart device displays the converted target text in the area used to display weather information and plays the target text.
[0068] In an embodiment of the present application, the corresponding operation also includes pushing the target text to the terminal associated with the smart device. For example, after converting the second information into the target text, the target text is pushed to the smart device so that the user of the smart device can receive the latest news in time.
[0069] The information updating method applied to smart devices provided in the embodiment of the present application performs self-monitoring through the smart device, and when it detects that it is powered on again, obtains a restart signal representing the restart behavior of itself and a first information representing the latest message stored in the smart device, and sends them together to the Internet of Things platform, so that when the Internet of Things platform determines that the smart device has restarted based on the received restart signal, the first information representing the latest message of the target category stored in the smart information is compared with the second information representing the latest message of the target category stored in the Internet of Things platform, and the smart device receives the second information sent by the Internet of Things platform when the Internet of Things platform determines that the first information is inconsistent with the second information, so that the Internet of Things platform can perform corresponding operations based on the latest message, avoiding the inability of the smart device to obtain the latest message stored in the Internet of Things platform in time due to the restart of the smart device, and ensuring that the Internet of Things platform can perform corresponding operations according to the latest message. In addition, the smart device builds a communication channel with the Internet of Things platform through the MQTT protocol to ensure that the latest message of each target category sent by the Internet of Things platform can be received even in the case of unstable network, and after the smart device restarts, by sending the restart signal and the first information, the smart device can still obtain the weather information of each target category of the Internet of Things platform, avoiding the problem that the smart device cannot obtain the latest message when it restarts.
[0070] The present application also provides an information updating method, which is applied to an Internet of Things platform, such as Figure 4 As shown, the method includes: S301, if a restart signal and first information sent by a smart device are received, the second information is determined according to the first information; the restart signal is used to characterize that the smart device has restarted, and the first information includes the latest message of at least one target category stored in the smart device; the second information is the latest message of each target category stored in the Internet of Things platform, and each target category's latest message corresponds to an operation.
[0071] In an embodiment of the present application, a restart signal is a signal used to characterize that a smart device has restarted. When the Internet of Things platform receives the restart signal sent by the smart device, it indicates that the smart device has restarted once. Therefore, it is necessary to determine whether the latest message of at least one target category stored in the current smart device is consistent with the latest message of the corresponding target category stored in the Internet of Things platform. Therefore, the Internet of Things platform determines the second information based on the target category of the first information.
[0072] In an example, the target category of the first information is weather information, then the Internet of Things platform obtains the latest message of weather information from the latest messages of each stored target category, and uses the stored latest message of weather information as the second information.
[0073] S302: For each target category, compare first information corresponding to the target category with second information corresponding to the target category.
[0074] In an embodiment of the present application, the target categories of the first information include Class A, Class B and Class C. Therefore, the Internet of Things platform obtains the latest stored messages of Class A, Class B and Class C, compares the first information corresponding to Class A with the second information, compares the first information corresponding to Class B with the second information, and compares the first information corresponding to Class C with the second information.
[0075] In an embodiment of the present application, the first information sent to the Internet of Things platform has the same format as the second information obtained by the Internet of Things platform. When the format of the first information and the second information is in JSON format, the character strings of the first information and the second information are compared. If the two character strings are exactly the same, the first information is considered to be the same as the second information.
[0076] S303: If it is determined that the first information and the second information corresponding to the same target category are inconsistent, the second information corresponding to the target category is sent to the smart device, so that the smart device performs a corresponding operation based on the second information.
[0077] In an embodiment of the present application, when the character string of the first information is different from the character string of the second information, it is considered that the latest message of the target category currently stored in the smart device is not the latest message of the target category. Since the latest message of each target category stored in the Internet of Things platform is the latest message of the target category, the second information is sent to the smart device for the smart device to perform corresponding operations based on the second information.
[0078] In one example, the IoT platform determines that the first message and the second message corresponding to class A are consistent, and the first message and the second message corresponding to class B are inconsistent, then sends the second message corresponding to class B to the server, so that the smart device performs the corresponding operation based on the second message corresponding to class B.
[0079] In an embodiment of the present application, when the character string of the first information is exactly the same as the character string of the second information, it is considered that the latest message of the target category currently stored in the smart device is the latest message of the target category, and the Internet of Things platform returns a notification message to the smart device, notifying the smart device that the latest message of the target category has been currently stored.
[0080] In an embodiment of the present application, if the latest message of any target category is obtained, the latest message is stored in at least two preset nodes; the latest message is sent to the smart device through a preset communication channel so that the smart device replaces the stored first message of the target category with the latest message; wherein the preset communication channel is constructed based on the MQTT protocol.
[0081] In an embodiment of the present application, the latest message of each target category will be first sent to the Internet of Things platform, and then transmitted to the smart device by the Internet of Things platform. When the Internet of Things platform receives the latest message of any target category, it will store the latest message in at least two nodes to ensure that when any node has a problem and cannot obtain the latest message, the latest message can be obtained in time, and then the latest message is sent to the smart device through a preset communication channel, so that the smart device can obtain the latest message in time when the latest message of the target category is updated, and according to the target category of the latest message, the stored latest message of the target category is replaced with the latest message sent by the Internet of Things platform.
[0082] In an embodiment of the present application, the Internet of Things platform will back up multiple copies of the latest messages of each target category, each copy of the latest message of each target category is the same, and for the latest message of each target category, generally only one copy is retained at the same time, and multiple copies of the latest message of each target category are stored on multiple deployed nodes.
[0083] In the embodiment of the present application, the communication channel between the Internet of Things platform and the smart device is constructed through the MQTT protocol. The MQTT protocol has a small communication overhead and is suitable for use in environments with limited bandwidth and unstable network connections. Therefore, the MQTT protocol ensures that the Internet of Things platform can transmit the latest messages of any target category to the smart device even when the network is unstable, ensuring that the smart device can be updated in time according to the latest messages.
[0084] The information updating method applied to the Internet of Things platform provided in the embodiment of the present application determines that the smart device has restarted at this time by receiving the restart signal sent by the smart device. In order to avoid that the messages of each target category currently stored and used by the smart device are not the latest messages, the Internet of Things platform compares the first information sent by the smart device with the latest message of the corresponding target category stored by the Internet of Things platform, thereby determining whether the information currently used by the smart device is the latest. If it is not the latest message, the latest message is immediately sent to the smart device so that the smart device can update the information in time. In addition, the Internet of Things platform synchronizes the latest updated latest messages of each target category in real time, and synchronizes the updated weather information of each target category to the smart device through the communication channel created based on the MQTT protocol, so that the smart device can obtain the latest message in time and perform corresponding operations based on the latest message. In addition, when the Internet of Things platform receives the latest message of any target category, it stores the latest message in at least two nodes to ensure that when any node has a problem and cannot obtain the latest message, the latest message can be obtained in time.
[0085] refer to Figure 5 As shown, it exemplarily shows a schematic diagram of an interactive process of an information updating method, and the specific contents are as follows: S401: If the electric control board detects that it is powered on again, it generates a restart signal in a first format and obtains first information in a first format that is pre-stored; S402, the electric control board sends a restart signal in a first format and first information in a first format to the wireless communication module; S403, the wireless communication module performs format conversion on the restart signal in the first format and the first information in the first format to obtain the restart signal in the second format and the first information in the second format; S404, the wireless communication module sends the restart signal in the second format and the first information in the second format to the Internet of Things platform; S405. When the Internet of Things platform receives the restart signal, the second information in the second format is acquired according to the target category of the first information. S406. The Internet of Things platform compares the second information in the second format with the first information in the second format; S407: For each target category, if the IoT platform determines that the second information in the second format of the same target category is inconsistent with the first information in the second format, the second information in the second format of the target category is sent to the wireless communication module; S408. When receiving the second information in the second format, the wireless communication module converts the second information in the second format into the second information in the first format; S409, the wireless communication module sends the second information in the first format to the electric control board; S410: The electric control board replaces the latest message of the target category that has been stored with the second information according to the target category of the second information.
[0086] S411. The electric control board performs a corresponding operation based on the second information.
[0087] The present application embodiment provides a smart device, such as Figure 6 As shown, the smart device 60 may include: an acquisition module 601, a sending module 602 and a processing module 603, wherein: The acquisition module 601 is used to generate a restart signal and acquire pre-stored first information if it is detected that the smart device has been powered on again; the restart signal is used to indicate that the smart device has restarted, and the first information includes the latest message of at least one target category stored in the smart device; each latest message of the target category corresponds to an operation; The sending module 602 is used to send the restart signal and the first information to the Internet of Things platform, so that the Internet of Things platform determines the second information, and for each target category, compares the second information corresponding to the target category with the first information corresponding to the target category, wherein the second information is the latest message of each target category stored in the Internet of Things platform; The processing module 603 is used to receive the second information corresponding to the target category sent by the Internet of Things platform when it is determined that the first information corresponding to the target category is inconsistent with the second information corresponding to the target category, and perform a corresponding operation based on the second information.
[0088] The smart device provided in the embodiment of the present application performs self-monitoring through the smart device, and when detecting that it is powered on again, obtains a restart signal representing its own restart behavior and first information representing the latest message stored in the smart device, and sends them together to the Internet of Things platform, so that when the Internet of Things platform determines that the smart device has restarted based on the received restart signal, the first information representing the latest message of the target category stored in the smart information storage is compared with the second information representing the latest message of the target category stored in the Internet of Things platform. When the Internet of Things platform determines that the first information is inconsistent with the second information, the smart device receives the second information sent by the Internet of Things platform, so that the Internet of Things platform can perform corresponding operations based on the latest message, avoiding the inability of the smart device to obtain the latest message stored in the Internet of Things platform in time due to the restart of the smart device, and ensuring that the Internet of Things platform can perform corresponding operations according to the latest message.
[0089] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0090] Further, in a possible implementation, the smart device includes an electric control board and a wireless communication module. If the electric control board detects that it is powered on again, it generates a restart signal in a first format, obtains pre-stored first information in a first format, and sends the restart signal in the first format and the first information in the first format to the wireless communication module; The wireless communication module performs format conversion on the restart signal and the first information in the first format to obtain the restart signal in the second format and the first information in the second format; The wireless communication module sends a restart signal in a second format and first information in a second format to the Internet of Things platform; The wireless communication module receives the second information in the second format transmitted by the Internet of Things platform, performs format conversion on the second information in the second format to obtain the second information in the first format, and sends the second information in the first format to the electric control board; The electric control board stores the second information in the first format and performs a corresponding operation based on the second information.
[0091] In another possible implementation, the distance between the external antenna of the wireless communication module and the electric control board is greater than a preset distance threshold.
[0092] In yet another possible implementation, if the latest message of any target category sent by the IoT platform through a preset communication channel is received after power-on, the stored first message of the target category is replaced with the latest message; Perform corresponding operations based on the latest news; Among them, the preset communication channel is built based on the MQTT protocol.
[0093] In yet another possible implementation, when the target category of the second information is weather information, the second information is converted into a corresponding target text; Displaying the target text in the first area and announcing the target text by voice; The first area is used to display weather information.
[0094] The present application embodiment provides an Internet of Things platform, such as Figure 7 As shown, the smart device 70 may include: a determination module 701, a comparison module 702 and a transmission module 703, wherein: The determination module 701 is used to determine the second information according to the first information if a restart signal and first information sent by the smart device are received; the restart signal is used to indicate that the smart device has restarted, the first information includes the latest message of at least one target category stored in the smart device; the second information is the latest message of each target category stored in the Internet of Things platform, and each latest message of the target category corresponds to an operation; A comparison module 702, for comparing, for each target category, first information corresponding to the target category with second information corresponding to the target category; The transmission module 703 is used to send the second information corresponding to the target category to the smart device if it is determined that the first information corresponding to the target category is inconsistent with the second information corresponding to the target category, so that the smart device performs a corresponding operation based on the second information.
[0095] The Internet of Things platform provided in the embodiment of the present application determines that the smart device has restarted at this time by receiving the restart signal sent by the smart device. In order to avoid the messages of each target category currently stored and used by the smart device not being the latest messages, the Internet of Things platform compares the first information sent by the smart device with the latest message of the corresponding target category stored in the Internet of Things platform to determine whether the information currently used by the smart device is the latest. If it is not the latest message, the latest message is immediately sent to the smart device so that the smart device can update the latest message of the target category in time.
[0096] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0097] Further, in a possible implementation, if the latest message of any target category is obtained, the latest message is stored in at least two preset nodes; Sending the latest message to the smart device through a preset communication channel, so that the smart device replaces the first message of the target category stored in the smart device with the latest message; Among them, the preset communication channel is built based on the MQTT protocol.
[0098] In an embodiment of the present application, an electronic device (computer device / equipment / system) is provided, including a memory, a processor and a computer program stored in the memory, and the processor executes the above-mentioned computer program to implement the steps of the information updating method. Compared with the related art, it can achieve: self-monitoring through the smart device, and when it detects that it is powered on again, a restart signal representing the restart behavior of itself and first information representing the latest message stored in the smart device are obtained, and the two are sent together to the Internet of Things platform, so that when the Internet of Things platform determines that the smart device has restarted based on the received restart signal, the first information representing the latest message of the target category stored in the smart information is compared with the second information representing the latest message of the target category stored in the Internet of Things platform. When the Internet of Things platform determines that the first information is inconsistent with the second information, the smart device receives the second information sent by the Internet of Things platform, so that the Internet of Things platform can perform corresponding operations based on the latest message, avoiding the inability of the smart device to obtain the latest message stored in the Internet of Things platform in time due to the restart of the smart device, and ensuring that the Internet of Things platform can perform corresponding operations according to the latest message.
[0099] In an alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0100] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0101] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0102] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
[0103] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.
[0104] Among them, the electronic equipment package may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0105] The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented. Compared with the prior art, it can be implemented as follows: self-monitoring is performed by a smart device, and when it is detected that the smart device is powered on again, a restart signal representing the restart behavior of the smart device and the first information representing the latest message stored in the smart device are obtained, and sent together to the Internet of Things platform, so that when the Internet of Things platform determines that the smart device has restarted based on the received restart signal, the first information representing the latest message of the target category stored in the smart information is compared with the second information representing the latest message of the target category stored in the Internet of Things platform, and when the Internet of Things platform determines that the first information is inconsistent with the second information, the smart device receives the second information sent by the Internet of Things platform, so that the Internet of Things platform can perform corresponding operations based on the latest message, avoiding the inability of the smart device to obtain the latest message stored in the Internet of Things platform in time due to the restart of the smart device, and ensuring that the Internet of Things platform can perform corresponding operations according to the latest message.
[0106] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0107] The present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the above method embodiments when executed by a processor. Compared with the prior art, it can achieve: The smart device performs self-monitoring, and when it detects that it has been powered on again, it obtains a restart signal representing its own restart behavior and first information representing the latest message stored in the smart device, and sends them together to the Internet of Things platform, so that when the Internet of Things platform determines that the smart device has restarted based on the received restart signal, it compares the first information representing the latest message of the target category stored in the smart information with the second information representing the latest message of the target category stored in the Internet of Things platform. When the Internet of Things platform determines that the first information is inconsistent with the second information, the smart device receives the second information sent by the Internet of Things platform, so that the Internet of Things platform can perform corresponding operations based on the latest message, avoiding the inability of the smart device to obtain the latest message stored in the Internet of Things platform in time due to the restart of the smart device, and ensuring that the Internet of Things platform can perform corresponding operations according to the latest message.
[0108] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.
[0109] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0110] The above are only optional implementation methods for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the scheme of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A method for updating information, It is characterized in that Applied to a smart device, the method comprises: If it is detected that the smart device is powered on again, a restart signal is generated, and first information stored in advance is obtained; the restart signal is used to indicate that the smart device has restarted, and the first information includes the latest message of at least one target category stored by the smart device; the latest message of each target category corresponds to an operation; Sending the restart signal and the first information to the Internet of Things platform, so that the Internet of Things platform determines the second information, and for each target category, compares the second information corresponding to the same target category with the first information; the second information is the latest message of each target category stored by the Internet of Things platform; The second information corresponding to the target category sent by the Internet of Things platform when it is determined that the first information and the second information corresponding to the same target category are inconsistent is received, and a corresponding operation is performed based on the second information.
2. The method for updating information according to claim 1, It is characterized in that The smart device includes an electric control board and a wireless communication module; if it is detected that the smart device is powered on again, a restart signal is generated, and the first information stored in advance is obtained, including: If the electric control board detects that it is powered on again, it generates a restart signal in a first format, obtains pre-stored first information in the first format, and sends the restart signal in the first format and the first information in the first format to the wireless communication module; The sending the restart signal and the first information to the Internet of Things platform includes: The wireless communication module performs format conversion on the restart signal in the first format and the first information in the first format to obtain the restart signal in a second format and the first information in the second format; The wireless communication module sends the restart signal in the second format and the first information in the second format to the Internet of Things platform; Receiving second information corresponding to the target category sent by the Internet of Things platform when determining that the first information and the second information corresponding to the same target category are inconsistent, and performing a corresponding operation based on the second information, including: The wireless communication module receives the second information in the second format transmitted by the Internet of Things platform, performs format conversion on the second information in the second format to obtain the second information in the first format, and sends the second information in the first format to the electric control board; The electric control board stores the second information in a first format and performs a corresponding operation based on the second information.
3. The method for updating information according to claim 2, It is characterized in that The distance between the external antenna of the wireless communication module and the electric control board is greater than a preset distance threshold.
4. The method for updating information according to claim 1, It is characterized in that The method further comprises: If the latest message of any target category is received from the IoT platform through a preset communication channel after power-on, the first message of the target category stored is replaced with the latest message; Execute corresponding operations based on the latest message; Wherein, the preset communication channel is constructed based on the MQTT protocol.
5. The method for updating information according to claim 1, It is characterized in that When the target category of the second information is weather information, the performing a corresponding operation based on the second information includes: converting the second information into a corresponding target text; Displaying the target text in the first area and announcing the target text by voice; Wherein, the first area is used to display weather information.
6. A method for updating information, It is characterized in that Applied to the Internet of Things platform, the method includes: If a restart signal and first information sent by a smart device are received, second information is determined according to the first information; the restart signal is used to indicate that the smart device has restarted, the first information includes the latest message of at least one target category stored by the smart device; the second information is the latest message of each target category stored by the Internet of Things platform, and each latest message of the target category corresponds to an operation; For each target category, comparing the first information and the second information corresponding to the same target category; If it is determined that the first information and the second information corresponding to the same target category are inconsistent, the second information corresponding to the target category is sent to the smart device, so that the smart device performs a corresponding operation based on the second information.
7. The method for updating information according to claim 6, It is characterized in that The method further comprises: If the latest message of any target category is obtained, the latest message is stored in at least two preset nodes; Sending the latest message to the smart device through a preset communication channel, so that the smart device replaces the stored first message of the target category with the latest message; Wherein, the preset communication channel is constructed based on the MQTT protocol.
8. A smart device, It is characterized in that include: an acquisition module, configured to generate a restart signal and acquire pre-stored first information if it is detected that the smart device has been powered on again; the restart signal is used to indicate that the smart device has restarted, and the first information includes the latest message of at least one target category stored in the smart device; The latest message of each target category corresponds to an operation; A sending module, configured to send the restart signal and the first information to an Internet of Things platform, so that the Internet of Things platform determines second information, and for each target category, compares the second information corresponding to the same target category with the first information, wherein the second information is the latest message of each target category stored in the Internet of Things platform; The processing module is used to receive the second information corresponding to the target category sent by the Internet of Things platform when determining that the first information and the second information corresponding to the same target category are inconsistent, and perform a corresponding operation based on the second information.
9. An Internet of Things platform, It is characterized in that include: a determination module, configured to determine second information according to the first information if a restart signal and first information sent by the smart device are received; The restart signal is used to indicate that the smart device has restarted, the first information includes the latest message of at least one target category stored in the smart device; the second information is the latest message of each target category stored in the IoT platform, and each latest message of each target category corresponds to an operation; A comparison module, for comparing, for each target category, the first information and the second information corresponding to the same target category; The transmission module is used to send the second information corresponding to the target category to the smart device if it is determined that the first information and the second information corresponding to the same target category are inconsistent, so that the smart device performs a corresponding operation based on the second information.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
