Fault processing method and device of smart home device, storage medium and smart home gateway

By using real-time detection and blockchain technology to handle faults in smart home devices and automatically restore device status, the problem of service interruption caused by single point of failure in smart home systems is solved, achieving efficient and secure fault handling.

CN119449512BActive Publication Date: 2025-12-26GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411617687.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-12-26
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

Single point of failure in smart home systems can cause system service interruptions, affecting the convenience and security of users' daily lives.

Method used

By monitoring the working status of smart home devices in real time, querying on-site data of the devices using the blockchain network and verifying its integrity, the devices are automatically restored to normal status, and encryption and digital signatures are used to ensure data security and reliability.

Benefits of technology

It improves the reliability and stability of smart home systems, reduces troubleshooting time, enhances user convenience and security, and reduces human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449512B_ABST
    Figure CN119449512B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a fault processing method and device of a smart home device, a storage medium and a smart home gateway, and relates to the field of home appliance control. The application detects the working state of the smart home device in real time; when the working state of the smart home device is an abnormal state, the device identifier of the smart home device is acquired, and the latest device field data is inquired in the blockchain network according to the device identifier; whether the inquired device field data is tampered with is verified; if not, the device field data is sent to the smart home device, and the smart home device is instructed to recover to a normal state according to the device field data. The data integrity and credibility are guaranteed by using the blockchain technology, and the intelligent device recovery mechanism is realized, so that the reliability, convenience and safety of the smart home system are significantly improved, and a more high-quality smart home experience is provided for users.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of home appliance control, and in particular to a fault processing method and device for smart home equipment, a storage medium and a smart home gateway. BACKGROUND

[0002] In the wide application of smart home, the diversity and complexity of home equipment and scene settings significantly improve the importance of system stability and data consistency maintenance. The smart home ecosystem usually includes smart lighting systems, temperature control devices, security monitoring devices, smart home appliances and other components. These devices frequently exchange information and cooperate to ensure that the intelligent and personalized needs of the home environment are met.

[0003] However, the inherent vulnerability of the traditional centralized management architecture is exposed when it is applied in such complex systems. In particular, the risk of single point failure, once any failure occurs in the management core, will affect the entire smart home network, leading to system service interruption and affecting the convenience of users' daily life. SUMMARY

[0004] The embodiments of the present application provide a fault processing method and device for smart home equipment, a storage medium and a smart home gateway, which can solve the problem of low work reliability of smart home equipment in the prior art. The technical solution is as follows:

[0005] In a first aspect, the embodiments of the present application provide a fault processing method for smart home equipment, which comprises:

[0006] real-time detection of the working state of the smart home equipment;

[0007] When the working state of the smart home equipment is an abnormal state, obtaining the device identifier of the smart home equipment, and querying the latest device field data in the blockchain network according to the device identifier;

[0008] verifying whether the queried device field data is tampered with;

[0009] If not, the device field data is sent to the smart home equipment, and the smart home equipment is instructed to recover to a normal state according to the device field data.

[0010] In a possible design, the real-time detection of the working state of the smart home equipment comprises:

[0011] detecting whether the smart home equipment is online, if yes, determining that the smart home equipment is in a normal state; if not, determining that the smart home equipment is in an abnormal state; or

[0012] Detecting whether the running parameter of the smart home device is within the preset range, if yes, determining that the smart home device is in a normal state, if no, determining that the smart home device is in an abnormal state; or

[0013] Detecting whether the smart home device reports an error code, if yes, determining that the smart home device is in an abnormal state, if no, determining that the smart home device is in a normal state.

[0014] In a possible design, the blockchain nodes of the blockchain network include a cloud server and smart home gateways of all users, and the blockchain nodes read and write data by using an IPFS protocol.

[0015] In a possible design, the method further includes:

[0016] If the working state of the smart home device is the normal state, obtaining device field data of the smart home device;

[0017] Determining whether the device field data obtained this time and the device field data obtained last time are updated;

[0018] If yes, writing the device field data obtained this time into the blockchain network.

[0019] In a possible design, the obtaining of the device field data of the smart home device includes:

[0020] Sending a data request to the smart home device, the data request being used to instruct the smart home device to collect device field data; encrypting the device field data in plaintext form by using an AES key to obtain first ciphertext; encrypting the first ciphertext by using a public key of the smart home device to obtain second ciphertext; performing signature processing on the first ciphertext and the second ciphertext by using a private key of the smart home device to obtain a digital signature; packing the first ciphertext, the second ciphertext, and the digital signature into a data response, and sending the data response to a smart home gateway;

[0021] Receiving the data response from the smart home device;

[0022] Performing unpacking processing on the data response to extract the first ciphertext, the second ciphertext, and the digital signature;

[0023] Verifying the digital signature by using a public key of the smart home gateway to confirm the integrity of the data and the identity of the sender;

[0024] If the digital signature verification is passed, decrypting the second ciphertext and the first ciphertext by using the private key of the smart home gateway and the AES key to restore the device field data in plaintext form.

[0025] In a possible design, the working state of the smart home device is detected in real time by using active polling or event-driven manner.

[0026] In a possible design, the device identifier comprises a device hardware identifier and a logged user identifier.

[0027] In a second aspect, an embodiment of the present application provides a fault processing apparatus of a smart home device, and the apparatus comprises:

[0028] a detection unit configured to detect a working state of the smart home device in real time;

[0029] a query unit configured to, when the working state of the smart home device is an abnormal state, acquire a device identifier of the smart home device, and query latest device field data in a blockchain network according to the device identifier;

[0030] a verification unit configured to verify whether the queried device field data is tampered with;

[0031] a recovery unit configured to, if the verification result is negative, send the device field data to the smart home device, and instruct the smart home device to recover to a normal state according to the device field data.

[0032] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and performing the method steps described above.

[0033] In a fourth aspect, an embodiment of the present application provides a smart home gateway, which can comprise a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and performing the method steps described above.

[0034] The technical scheme provided by some embodiments of the present application has at least the following beneficial effects:

[0035] By real-time detection of the working state of smart home devices, the abnormal state of the device can be quickly identified, thereby triggering the subsequent processing procedure in time. This helps to reduce the service interruption time caused by device failure, and improves the convenience and safety of home life. The latest device field data is stored and queried using the blockchain network, ensuring the data's non-tamperability and high credibility. The distributed ledger feature of the blockchain technology makes it difficult for data to be maliciously modified once recorded, providing reliable data support for subsequent device state recovery. After verifying that the device field data has not been tampered with, the data can be automatically sent to the smart home device and instructed to recover to a normal state according to these data. This intelligent recovery mechanism not only improves the efficiency of fault handling, but also reduces the need for manual intervention, making the management of home devices more convenient and intelligent. By introducing real-time monitoring, data verification, and intelligent recovery mechanisms, the overall reliability and stability of the smart home system are effectively improved. This helps to promote the further development and popularization of smart home technology, and provides strong support for building a more intelligent, convenient, and safe home environment. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0037] Figure 1 is a network architecture schematic diagram of a smart home system provided by the embodiments of the present application;

[0038] Figure 2 is a flowchart of a fault handling method of a smart home device provided by the embodiments of the present application;

[0039] Figure 3 is a structural schematic diagram of a fault handling device of a smart home device provided by the present application;

[0040] Figure 4 is a structural schematic diagram of a smart home gateway provided by the present application. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0042] It should be noted that the fault handling method of the smart home device provided by the present application is generally executed by the smart home gateway, and accordingly, the fault handling device of the smart home device is generally provided in the smart home gateway.

[0043] Figure 1 An exemplary system architecture of the fault processing method or the fault processing device of the smart home device applicable to the present application is shown.

[0044] As shown in Figure 1 The smart home system can include: a cloud server 0, a plurality of smart home gateways 1-n, and a plurality of smart home devices managed by each smart home gateway, n is an integer greater than 1. The cloud server and the smart home gateway, and the smart home gateway and the smart home device can communicate through a network, which is a medium for providing communication links between the above-mentioned units. The network can include various types of wired communication links or wireless communication links, such as: wired communication links include optical fiber, twisted pair or coaxial cable, etc., wireless communication links include Bluetooth communication link, wireless fidelity (Wireless-Fidelity, Wi-Fi) communication link or microwave communication link, etc.

[0045] Among them, the number of cloud servers 0 can be one or more, when the number of cloud servers is more, the plurality of servers form a distributed server cluster. The cloud server as the data storage center of the smart home system is responsible for centralized storage of all smart home device running data, user configuration information, historical records, etc. With powerful computing power, these data are processed and analyzed to provide users with remote monitoring, data analysis, fault warning, etc. Services of smart home devices. Users can access the cloud server through the Internet to realize remote control and management of smart home devices. The cloud server provides a unified interface and protocol, so that users can view and control the status of smart home devices at any time and anywhere through mobile phone APP, web page, etc. Client. The cloud server is responsible for user information registration, login, permission allocation, etc. Through user authentication and authorization mechanism, only legal users can access and control smart home devices to ensure the security of the system. The cloud server is responsible for software update and version management of the smart home system to ensure that the system is always in the latest state. It also provides remote technical support and maintenance services to help users solve the problems encountered in the use of smart home devices. The smart home gateway and the plurality of smart home devices managed thereby constitute a user's smart home network.

[0046] Functions of the smart home gateway: The smart home gateway, as the hub of the smart home system, can centrally manage multiple smart home devices. Through a unified communication protocol and interface, it realizes connection and communication with smart home devices, ensuring interconnection between devices. The smart home gateway is responsible for forwarding the operation data of smart home devices to the cloud server for storage and processing. At the same time, it can also perform local processing and analysis of device data, providing real-time device status monitoring and fault warning for users. The smart home gateway supports users to remotely control smart home devices through the cloud server. It can also cooperate with the cloud server to realize functions such as remote configuration, upgrade and troubleshooting of devices. The smart home gateway supports users to set multiple scene modes, such as away mode, home mode, sleep mode, etc. Users can realize automatic control and linkage of multiple smart home devices through one-key operation. The smart home gateway ensures the security and privacy protection of the smart home system through encrypted communication and identity verification mechanism. It can also monitor the home environment in real time, and automatically alarm and notify users if abnormal conditions are found.

[0047] Functions of smart home devices: Smart home devices can receive control instructions from the smart home gateway or the cloud server, realizing functions such as switching, adjusting, and linkage of devices. At the same time, they can also monitor their own running status and environmental parameters in real time, and report the data to the smart home gateway or the cloud server. Smart home devices realize intelligent control and automatic operation through built-in sensors and actuators. For example, smart lighting devices can automatically adjust brightness according to light intensity and time; smart security devices can automatically alarm and notify users when detecting abnormal conditions. Smart home devices are usually equipped with display screens, indicator lights, sound prompts, and other interactive interfaces to facilitate users to understand the running status of the devices and perform manual control. They can also be connected with smart phones, smart speakers, and other devices to realize voice control, remote control, and other more convenient interaction methods. Through intelligent control and automatic operation, smart home devices realize efficient use and conservation of energy. For example, smart air conditioners can automatically adjust the working mode according to indoor temperature and humidity; smart curtains can automatically open and close according to light intensity and time.

[0048] It should be noted that the cloud server 0 and the smart home gateways 1-n of the users constitute the blockchain nodes of the blockchain network.

[0049] It should be understood that Figure 1 The number of cloud servers, smart home gateways and smart home devices in the above description is only illustrative. According to the needs of implementation, it can be any number.

[0050] The following will be described in conjunction with the accompanying Figure 2The method for processing the fault of the smart home device provided in the embodiment of the application is introduced in detail. The fault processing device of the smart home device in the embodiment of the application can be the smart home gateway shown in Figure 1 .

[0051] Please refer to Figure 2 , a flowchart of the method for processing the fault of the smart home device provided in the embodiment of the application is provided. As shown in Figure 2 , the method provided in the embodiment of the application can include the following steps:

[0052] S201, detecting the working state of the smart home device in real time.

[0053] The smart home gateway device detects the working state of the smart home device in real time in the following ways:

[0054] Active polling: the smart home gateway device regularly sends a state query request to each smart home device, and the device returns the current state information after receiving the request. This method is suitable for all devices that support active reporting of the state.

[0055] Event-driven: the smart home device actively sends a state update message to the smart home gateway device when the state changes. This method requires that the device has the ability of event triggering and message pushing.

[0056] When performing state detection, the smart home gateway device also analyzes and evaluates the returned state information according to the type, function of the device and the preset monitoring rules, to determine whether the device is in a normal working state.

[0057] In some embodiments of the application, the method for detecting the working state of the smart home device by the smart home gateway device includes:

[0058] detecting whether the smart home device is online, if yes, determining that the smart home device is in a normal state, if no, determining that the smart home device is in an abnormal state; or

[0059] detecting whether the running parameter of the smart home device is within a preset range, if yes, determining that the smart home device is in a normal state, if no, determining that the smart home device is in an abnormal state; or

[0060] detecting whether the smart home device reports an error code, if yes, determining that the smart home device is in an abnormal state, if no, determining that the smart home device is in a normal state.

[0061] The smart home gateway device is the core component of the smart home system, and is responsible for detecting the working state of each smart home device in real time. The following are several specific methods for the smart home gateway device to detect the working state of the smart home device.

[0062] 1. Detecting whether a smart home device is online:

[0063] The smart home gateway device periodically sends heartbeat packets or status query requests to the smart home device and waits for its response. If the smart home device successfully responds within a preset time, the smart home gateway device will determine that the device is online and thus preliminarily judge that it is in a normal state. If the smart home device fails to respond within the preset time, the smart home gateway device will mark the device as offline and preliminarily judge that it may be in an abnormal state.

[0064] 2. Detecting whether the operating parameters of a smart home device are within the preset range:

[0065] The smart home gateway device regularly or in real-time receives the operating parameters (such as temperature, humidity, power, signal strength, etc.) of the smart home device according to its type and the preset monitoring rules. The smart home gateway device compares these operating parameters with the preset normal range. If the operating parameters are within the preset range, the smart home gateway device will determine that the device is in a normal state. If the operating parameters exceed the preset range, the smart home gateway device will mark the device as an abnormal state and may need further investigation or corrective measures.

[0066] 3. Detecting whether a smart home device reports error codes:

[0067] When a smart home device encounters a fault or anomaly, it usually generates and reports error codes to the smart home gateway device. The smart home gateway device listens to the error code reporting channel and receives error codes sent by the smart home device in real-time. If the smart home gateway device receives error codes, it will immediately mark the device as an abnormal state and take appropriate handling measures according to the type and severity of the error codes. If the smart home gateway device does not receive any error code reports within a period of time, it will preliminarily judge that the device is in a normal state.

[0068] It should be noted that the above three methods are not isolated, and the smart home gateway device may combine them in actual operation to more accurately determine the working state of the smart home device. For example, even if the smart home device is online and does not report error codes, if its operating parameters deviate from the preset range for a long time, the smart home gateway device may mark it as an abnormal state.

[0069] In addition, the smart home gateway device will further analyze and evaluate the detected state information according to the type, function of the smart home device and the monitoring rules set by the user to determine whether further action is needed, such as sending an alarm, recording a log or triggering an automated recovery process, etc.

[0070] S202、When the working state of the smart home device is an abnormal state, obtain the device identifier of the smart home device, and query the latest device field data in the blockchain network according to the device identifier.

[0071] Wherein, when the working state of the smart home device is detected to be abnormal, the smart home gateway device will immediately perform the following operations: the smart home gateway device extracts the device identifier from the state information of the abnormal device, which is usually a unique identifier such as MAC address, device ID or serial number. The smart home gateway device utilizes the distributed ledger feature of the blockchain network to retrieve the latest field data record related to the device in the blockchain network through a secure API interface or a specific blockchain query protocol. These data may include the maintenance history, operation log, fault report of the device and any additional information uploaded by the device or user. During the query process, the smart home gateway device will ensure that the communication with the blockchain network is secure to prevent data leakage or tampering.

[0072] Further, the smart home gateway device extracts the unique device identifier from the state information or configuration file of the abnormal device. This device identifier is usually assigned to the device at the time of factory shipment and is used to uniquely identify the device in the blockchain network. The hardware identifier is a unique identifier such as MAC address, serial number, device ID, etc. that is assigned to the device at the time of factory shipment and is used to uniquely identify the device in the blockchain network. In addition to the hardware identifier, if the smart home device supports user login function (such as smart door lock, smart camera, etc.), the smart gateway will also obtain the identifier of the current login user. The user identifier may be a username, user ID or unique identifier of the user device, which is used to associate the device with a specific user in order to provide personalized services or perform permission verification when needed.

[0073] In the blockchain network, blockchain nodes play a crucial role. These nodes include cloud servers and all users' smart home gateway devices, which jointly maintain the distributed ledger of the blockchain, ensuring data's non-tamperability and traceability.

[0074] Each blockchain node uses the IPFS (InterPlanetary File System) protocol for data reading and writing. IPFS is a distributed file system that uses content addressing to store and retrieve files. Unlike traditional location-based file systems, IPFS generates a unique address for a file by calculating its hash value, which users can use to access the file. In the blockchain network, the IPFS protocol enables each node to efficiently share and access data without worrying about data loss or tampering.

[0075] The smart home gateway device will construct a query request containing device identification, query conditions, and timestamp information based on the device identification and query requirements. The smart home gateway device sends the constructed query request to other nodes in the blockchain network through the IPFS protocol. These nodes will receive the query request and perform matching and retrieval based on their internal blockchain data. Other nodes in the blockchain network will search for relevant device field data in their respective blockchain ledgers based on the device identification and query conditions in the query request. Once the matching data is found, these nodes will return the data to the smart home gateway device through the IPFS protocol. After receiving the query results from multiple nodes, the smart home gateway device will verify and integrate the data. It will check whether the hash value of the data is consistent with the original data to ensure that the data has not been tampered with during transmission. At the same time, the smart home gateway device will also sort and integrate the data based on the timestamp and priority information of the data to obtain the latest device field data.

[0076] In some embodiments of the present application, if the working state of the smart home device is normal, the device field data of the smart home device is collected, it is judged whether the device field data collected this time and the device field data collected last time have been updated, and if yes, the device field data collected this time is written into the blockchain network.

[0077] Among them, the smart home gateway sends a data request to the smart home device, requiring the device to provide the current field data. The smart home device responds to the data request and sends the field data to the smart home gateway. After receiving the data, the smart home gateway performs analysis and preprocessing to ensure the accuracy and readability of the data.

[0078] The smart home gateway compares the current collected data with the last collected data. The comparison can involve changes in individual data points, analysis of data trends, or judgment of data ranges, etc. According to the comparison result, the smart home gateway judges whether the data has changed significantly or reached the preset update condition. These conditions may include data change threshold, data update frequency or other rules set by the user. If the data meets the update condition, the smart home gateway formats the current collected data into a format suitable for blockchain storage. This may include converting the data into a specific data structure, adding a timestamp, generating a data digest or signature, etc. In order to protect the privacy and security of the data, the smart home gateway will encrypt the data before writing it to the blockchain. At the same time, the smart home gateway also generates a unique hash value as the unique identifier of the data to ensure the integrity and non-tamperability of the data. The smart home gateway selects a suitable consensus mechanism according to the type of the blockchain network (such as public chain, private chain or consortium chain) for data writing. The smart home gateway submits the encrypted data and its hash value to the nodes in the network through the interface of the blockchain network. The nodes in the blockchain network will verify the legality and validity of the data, and write the data to the blockchain through the consensus mechanism. Once the data is successfully written, the smart home gateway will receive a write confirmation message. The smart home gateway synchronizes data with other nodes to ensure that the data on all nodes is consistent. At the same time, the smart home gateway also regularly checks the data on the blockchain to ensure the accuracy and integrity of the data.

[0079] Further, in some embodiments of the present application, the smart home device encrypts the device field data before sending it to the smart home gateway, and the encryption process includes:

[0080] The smart home device collects device field data when it receives a data request from the smart home gateway;

[0081] The smart home device encrypts the device field data in plaintext form using the AES key to obtain the first ciphertext;

[0082] The smart home device encrypts the first ciphertext using the public key to obtain the second ciphertext;

[0083] The smart home device uses the private key to sign the first ciphertext and the second ciphertext to obtain the digital signature;

[0084] The smart home device packages the first ciphertext, the second ciphertext and the digital signature into a data response, and sends the data response to the smart home gateway.

[0085] The smart home gateway confirms that the working state of the smart home device is normal, and sends a data request to the device. After receiving the data request from the smart home gateway, the smart home device starts collecting on-site data of the device.

[0086] The smart home device encrypts the on-site data of the device in plaintext form using a pre-configured AES key to obtain a first ciphertext. AES (Advanced Encryption Standard) is a widely used symmetric encryption algorithm that can provide high data encryption strength. To further enhance the security of the data, the smart home device re-encrypts the first ciphertext using a public key in asymmetric encryption to obtain a second ciphertext. Public key encryption ensures that only the recipient holding the corresponding private key can decrypt the data. The smart home device also uses its own private key to sign the first ciphertext and the second ciphertext to generate a digital signature. The role of the digital signature is to verify the integrity of the data and the identity of the sender, ensuring that the data has not been tampered with during transmission. The smart home device packages the first ciphertext, the second ciphertext and the generated digital signature into a complete data response. The smart home device sends the packaged data response to the smart home gateway through a secure communication protocol (such as HTTPS, TLS, etc.).

[0087] After receiving the data response sent by the smart home device, the smart home gateway performs unpacking processing to extract the first ciphertext, the second ciphertext and the digital signature. The smart home gateway verifies the digital signature using the public key of the smart home device to confirm the integrity of the data and the identity of the sender. If the digital signature verification is passed, the smart home gateway uses its own private key and AES key to decrypt the second ciphertext and the first ciphertext to restore the on-site data of the device in plaintext form.

[0088] S203, verify whether the queried on-site data of the device is tampered with.

[0089] Among them, after the smart home gateway device obtains the on-site data of the device on the blockchain, the following verification steps will be performed:

[0090] Hash verification: The smart home gateway device calculates the hash value of the received data and compares it with the original hash value stored on the blockchain. If they are consistent, it means that the data has not been tampered with during transmission.

[0091] Timestamp verification: The smart home gateway device checks the timestamp of the data to ensure that the data is up-to-date and has not been modified back. The verification of the timestamp helps to identify any possible data rollback or tampering behavior.

[0092] Consensus mechanism verification: In a blockchain network, data is verified and confirmed through a consensus mechanism. The smart home gateway device can verify the consensus status of the data to ensure that it is confirmed by multiple nodes in the network, thereby increasing the credibility of the data.

[0093] S204, if no, send the device field data to the smart home device, and instruct the smart home device to recover to the normal state according to the device field data.

[0094] If it is verified that the device field data has not been tampered with and is the latest valid data, the smart home gateway device will perform the following operations: the smart home gateway device sends the device field data back to the corresponding smart home device through a secure channel (such as an encrypted communication protocol). The smart home gateway device sends a series of recovery instructions to the smart home device according to the content of the device field data. These instructions may include adjusting device parameters, restarting the device, performing a self-diagnosis program, or requesting user intervention, etc. The smart home gateway device will continuously monitor the response and subsequent state changes of the smart home device to ensure that the device can successfully recover to a normal working state. If any problems occur during the recovery process or the device state does not improve, the smart home gateway device will record error information and may trigger further troubleshooting or notify the user for intervention.

[0095] Embodiments of the present application specifically include the following benefits:

[0096] By real-time detection of the working state of the smart home device, the abnormal state of the device can be quickly identified, thereby triggering the subsequent processing flow in a timely manner. This helps to reduce the service interruption time caused by device failure, and improves the convenience and safety of home life. By using the blockchain network to store and query the latest device field data, the data is ensured to be tamper-proof and highly reliable. The distributed ledger feature of the blockchain technology makes it difficult for data to be maliciously modified once recorded, providing reliable data support for subsequent device state recovery. After verifying that the device field data has not been tampered with, the data can be automatically sent to the smart home device and instructed to recover to a normal state according to these data. This intelligent recovery mechanism not only improves the efficiency of fault handling, but also reduces the need for manual intervention, making the management of home devices more convenient and intelligent. By introducing real-time monitoring, data verification and intelligent recovery mechanisms, the overall reliability and stability of the smart home system are effectively improved. This helps to promote the further development and popularization of smart home technology, and provides strong support for building a more intelligent, convenient and safe home environment.

[0097] The following is an embodiment of the device of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0098] Please refer to Figure 3 , which shows a structural diagram of a fault processing device of a smart home device provided by an exemplary embodiment of the present application, hereinafter referred to as device 3. The device 3 can be realized by software, hardware or a combination of both to become all or part of a smart home gateway. The device 3 includes a detection unit 301, a query unit 302, a verification unit 303, and a recovery unit 304.

[0099] The detection unit 301 is configured to detect the working state of the smart home device in real time.

[0100] The query unit 302 is configured to, when the working state of the smart home device is an abnormal state, acquire the device identifier of the smart home device, and query the latest device field data in the blockchain network according to the device identifier.

[0101] The verification unit 303 is configured to verify whether the queried device field data is tampered with.

[0102] The recovery unit 304 is configured to, if the verification result is no, send the device field data to the smart home device, and instruct the smart home device to recover to a normal state according to the device field data.

[0103] In one or more possible embodiments, the real-time detection of the working state of the smart home device includes:

[0104] Detecting whether the smart home device is online, if yes, determining that the smart home device is in a normal state, and if no, determining that the smart home device is in an abnormal state; or

[0105] Detecting whether the running parameter of the smart home device is within a preset range, if yes, determining that the smart home device is in a normal state, and if no, determining that the smart home device is in an abnormal state; or

[0106] Detecting whether the smart home device reports an error code, if yes, determining that the smart home device is in an abnormal state, and if no, determining that the smart home device is in a normal state.

[0107] In one or more possible embodiments, the blockchain nodes of the blockchain network include a cloud server and smart home gateways of all users, and the blockchain nodes read and write data using an IPFS protocol.

[0108] In one or more possible embodiments, further comprising:

[0109] An updating unit is configured to, if the working state of the smart home device is a normal state, acquire the device field data of the smart home device.

[0110] determine whether the device field data acquired this time and the device field data acquired last time are updated;

[0111] If yes, write the device field data acquired this time into the blockchain network.

[0112] In one or more possible embodiments, the acquiring of the device field data of the smart home device comprises:

[0113] sending a data request to the smart home device, the data request being used to instruct the smart home device to collect device field data; encrypting the device field data in plaintext form by using an AES key to obtain first ciphertext; encrypting the first ciphertext by using a public key of the smart home device to obtain second ciphertext; processing the first ciphertext and the second ciphertext by using a private key of the smart home device to obtain a digital signature; packing the first ciphertext, the second ciphertext and the digital signature into a data response, and sending the data response to the smart home gateway;

[0114] receiving the data response from the smart home device;

[0115] unpacking the data response to extract the first ciphertext, the second ciphertext and the digital signature;

[0116] verifying the digital signature by using a public key of the smart home gateway to confirm the integrity of the data and the identity of the sender;

[0117] If the digital signature verification is passed, decrypting the second ciphertext and the first ciphertext by using the private key of the smart home gateway and the AES key to restore the device field data in plaintext form.

[0118] In one or more possible embodiments, the working state of the smart home device is detected in real time by using an active polling or event-driven manner.

[0119] In one or more possible embodiments, the device identifier comprises a device hardware identifier and a logged user identifier.

[0120] It should be noted that the apparatus 3 provided in the above embodiments, when executing the smart home device fault processing method, is only exemplified by the division of the above functional modules, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above functions. In addition, the smart home device fault processing apparatus and the smart home device fault processing method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.

[0121] The above application embodiment serial number is only for description, not representing the advantages and disadvantages of the embodiments.

[0122] The application further provides a computer storage medium, which can store a plurality of instructions, the instructions being suitable for being loaded and executed by a processor to implement the method steps of the embodiments shown in the above Figure 2 The specific implementation process can refer to the specific description of the embodiments shown in the above Figure 2 The specific implementation process can refer to the specific description of the embodiments shown in the above

[0123] The application further provides a computer program product, which stores at least one instruction, the at least one instruction being loaded and executed by the processor to implement the intelligent home equipment fault processing method according to the above various embodiments.

[0124] Please refer to Figure 4 , which provides a structural schematic diagram of an intelligent home gateway. As shown in the above Figure 4 The intelligent home gateway 400 can include at least one processor 401, at least one network interface 404, a user interface 403, a memory 405, and at least one communication bus 402.

[0125] The communication bus 402 is used to realize the connection and communication between the components.

[0126] The user interface 403 can include a display screen (Display) and a camera (Camera), and the optional user interface 403 can further include a standard wired interface and a wireless interface.

[0127] The network interface 404 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0128] The processor 401 can include one or more processing cores. The processor 401 connects various parts within the smart home gateway 400 through various interfaces and lines, performs various functions of the smart home gateway 400 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and calling data stored in the memory 405. Optionally, the processor 401 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 401 can be integrated with a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes operating systems, user interfaces, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 401, but can be implemented by a separate chip.

[0129] The memory 405 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 405 includes a non-transitory computer-readable storage medium. The memory 405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 405 can also be at least one storage device located away from the aforementioned processor 401. As shown, the memory 405 as a computer storage medium can include an operating system, a network communication module, a user interface module, and an application program. Figure 4 As shown, the memory 405 as a computer storage medium can include an operating system, a network communication module, a user interface module, and an application program.

[0130] In Figure 4In the illustrated smart home gateway 400, the user interface 403 is mainly used to provide an interface for the user to input, and obtain the data input by the user; and the processor 401 can be used to call the application stored in the memory 405, and specifically execute the method as shown in Figure 2 The specific process can refer to the method as shown in Figure 2 The specific process can refer to the method as shown in

[0131] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The program can be stored in a computer readable storage medium, and when the program is executed, the program can include the processes of the above-mentioned embodiments. The storage medium can be a magnetic disc, an optical disc, a read-only memory or a random access memory, etc.

[0132] The above only describes the preferred embodiments of the present application, and cannot limit the scope of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope of the present application.

Claims

1. A method for failure handling of a smart home device, the method comprising: The application comprises the following steps: Real-time detection of the working state of the smart home device, including: detecting whether the smart home device is online, detecting whether the operating parameters of the smart home device are within the preset range, and detecting whether the smart home device reports error codes; When the working state of the smart home device is an abnormal state, obtaining the device identifier of the smart home device, and querying the latest device field data in the blockchain network according to the device identifier; the blockchain nodes of the blockchain network include a cloud server and smart home gateways of all users, and the data is read and written between the blockchain nodes by using the IPFS protocol; Verifying whether the queried device field data is tampered with; If not, the device field data is sent to the smart home device, and the smart home device is instructed to recover to a normal state according to the device field data; If the working state of the smart home device is a normal state, obtaining the device field data of the smart home device; Judging whether the device field data obtained this time and the device field data obtained last time are updated; If yes, the device field data obtained this time is written into the blockchain network.

2. The method of claim 1, wherein, The real-time detection of the working state of the smart home device comprises: Detecting whether the smart home device is online, if yes, determining that the smart home device is in a normal state; if not, determining that the smart home device is in an abnormal state; or Detecting whether the operating parameters of the smart home device are within the preset range, if yes, determining that the smart home device is in a normal state, if not, determining that the smart home device is in an abnormal state; or Detecting whether the smart home device reports error codes, if yes, determining that the smart home device is in an abnormal state; if not, determining that the smart home device is in a normal state.

3. The method of claim 1, wherein, The obtaining of the device field data of the smart home device comprises: Sending a data request to the smart home device, the data request being used to instruct the smart home device to collect device field data; encrypting the device field data in plaintext form by using an AES key to obtain first ciphertext; encrypting the first ciphertext by using the public key of the smart home device to obtain second ciphertext; signing the first ciphertext and the second ciphertext by using the private key of the smart home device to obtain a digital signature; packing the first ciphertext, the second ciphertext and the digital signature into a data response, and sending the data response to a smart home gateway; Receiving the data response from the smart home device; Unpacking the data response to extract the first ciphertext, the second ciphertext and the digital signature; Verifying the digital signature by using the public key of the smart home gateway to confirm the integrity of the data and the identity of the sender; If the digital signature verification is passed, decrypting the second ciphertext and the first ciphertext by using the private key of the smart home gateway and the AES key to recover the device field data in plaintext form.

4. The method according to claim 1 or 2 or 3, characterized in that, The working state of the smart home device is detected in real time by using an active polling or event-driven mode.

5. The method of claim 4, wherein, The device identifier comprises a device hardware identifier and a logged-in user identifier. 6.A failure processing apparatus of a smart home device, characterized by, The application comprises the following steps: The detection unit is used for detecting the working state of the smart home device in real time, including: detecting whether the smart home device is online, detecting whether the running parameter of the smart home device is within a preset range, and detecting whether the smart home device reports an error code; The query unit is used for acquiring the device identifier of the smart home device when the working state of the smart home device is an abnormal state, and querying the latest device field data in the blockchain network according to the device identifier; the blockchain nodes of the blockchain network include a cloud server and smart home gateways of all users, and the blockchain nodes read and write data by using an IPFS protocol; The verification unit is used for verifying whether the queried device field data is tampered with; The recovery unit is used for sending the device field data to the smart home device if the device field data is not tampered with, and instructing the smart home device to recover to a normal state according to the device field data; and acquiring the device field data of the smart home device if the working state of the smart home device is a normal state. Judging whether the device field data acquired this time and the device field data acquired last time are updated; If yes, the device field data acquired this time is written into the blockchain network.

7. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded and executed by the processor.

8. A smart home gateway, characterized in that, It includes: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded and executed by the processor to execute the method steps of any one of claims 1-5.

Citation Information

Patent Citations

  • Fault processing method, device and system based on block chain

    CN112596498A

  • Equipment operation maintenance and management method and system based on block chain technology

    CN118333612A