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

By real-time detection of the working status of smart home devices and querying on-site data of the equipment in the blockchain network, the problem of untimely handling of smart home devices is solved, efficient failure recovery and data security are achieved, and the reliability of the system is improved. and stability.

CN119449512AActive Publication Date: 2025-02-14GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1

Patent Information

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

AI Technical Summary

Technical Problem

The working reliability of smart home devices is not high, resulting in interruption of system services and affecting the convenience of users' daily life.

Method used

By real-time detection of the working status of smart home devices, obtaining device identification and querying the latest device field data in the blockchain network, verifying the integrity of the data, and sending the data to the device to restore normal state.

Benefits of technology

It improves the efficiency of handling faults in smart home equipment, reduces service interruption time, enhances the reliability and stability of the system, and ensures data immutability and high credibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449512A_ABST
    Figure CN119449512A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a fault processing method and device for smart home equipment, a storage medium and a smart home gateway, and relates to the field of household appliance control. The working state of the smart home equipment is detected in real time; when the working state of the smart home device is an abnormal state, obtaining a device identifier of the smart home device, and querying latest device field data in a block chain network according to the device identifier; verifying whether the queried equipment field data is tampered or not; and if not, sending the equipment field data to the smart home equipment, and indicating the smart home equipment to recover to a normal state according to the equipment field data. The data integrity and credibility are guaranteed by utilizing the block chain technology, an intelligent equipment recovery mechanism is realized, the reliability, convenience and safety of the intelligent home system are remarkably improved, and better intelligent 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 handling method, device, storage medium and smart home gateway for smart home devices. Background Art

[0002] In the wide application of smart homes, the diversity and complexity of home devices and scene settings have significantly increased the importance of system stability and data consistency maintenance. Smart home ecosystems usually include multiple components such as smart lighting systems, temperature control devices, security monitoring equipment, smart home appliances, etc. These devices need to frequently exchange information and work together to ensure that the intelligent and personalized needs of the home environment are met.

[0003] However, when the traditional centralized management architecture is applied in such complex systems, its inherent fragility is exposed, especially the risk of single point failure. Once any failure occurs in the management core, it will affect the entire smart home network, causing system service interruption and affecting the convenience of users' daily life. Summary of the invention

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

[0005] In a first aspect, an embodiment of the present application provides a method for handling a fault of a smart home device, the method comprising:

[0006] Real-time detection of the working status of smart home devices;

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

[0008] Verify whether the queried equipment field data has been tampered with;

[0009] If not, the device on-site 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 on-site data.

[0010] In a possible design, the real-time detection of the working status of the smart home device includes:

[0011] Detect whether the smart home device is online, if yes, determine that the smart home device is in a normal state; if no, determine that the smart home device is in an abnormal state; or

[0012] Detect whether the operating parameters of the smart home device are within a preset range, if yes, determine that the smart home device is in a normal state, if no, determine that the smart home device is in an abnormal state; or

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

[0014] In one possible design, the blockchain nodes of the blockchain network include a cloud server and smart home gateways of all users, and the IPFS protocol is used to read and write data between blockchain nodes.

[0015] In one possible design, it also includes:

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

[0017] Determine whether the device field data obtained this time is updated with the device field data obtained last time;

[0018] If yes, the device field data acquired this time is written into the blockchain network.

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

[0020] Sending a data request to the smart home device, the data request is used to instruct the smart home device to collect device field data; using an AES key to encrypt the device field data in plain text to obtain a first ciphertext; using a public key of the smart home device to encrypt the first ciphertext to obtain a second ciphertext; using a private key of the smart home device to sign the first ciphertext and the second ciphertext to obtain a digital signature; packaging 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 a data response from the smart home device;

[0022] Unpacking the data response to extract the first ciphertext, the second ciphertext and the digital signature;

[0023] Use the public key of the smart home gateway to verify the digital signature to confirm the integrity of the data and the identity of the sender;

[0024] If the digital signature verification is successful, the second ciphertext and the first ciphertext are decrypted using the private key and the AES key of the smart home gateway to restore the device field data in plain text.

[0025] In a possible design, active polling or event-driven methods are used to detect the working status of smart home devices in real time.

[0026] In one possible design, the device identification includes: a device hardware identification and a logged-in user identification

[0027] In a second aspect, an embodiment of the present application provides a fault handling device for a smart home device, the device comprising:

[0028] A detection unit, used to detect the working status of smart home devices in real time;

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

[0030] A verification unit, used to verify whether the queried device field data has been tampered with;

[0031] A recovery unit is used to send the device field data to the smart home device if the answer is no, and to 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, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0033] In a fourth aspect, an embodiment of the present application provides a smart home gateway, which may include: 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 executing the above-mentioned method steps.

[0034] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0035] By detecting the working status of smart home devices in real time, the abnormal status of the devices can be quickly identified, thereby triggering the subsequent processing flow in time. This helps to reduce the service interruption time caused by equipment failure and improve the convenience and safety of home life. The use of blockchain network to store and query the latest equipment field data ensures the immutability and high credibility of the data. The distributed ledger characteristics of blockchain technology make it difficult for data to be maliciously modified once recorded, providing reliable data support for subsequent equipment status recovery. After verifying that the equipment field data has not been tampered with, the data can be automatically sent to the smart home device and instructed to restore to normal status based on this 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 mechanisms such as real-time monitoring, data verification and intelligent recovery, 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 provide strong support for building a more intelligent, convenient and safe home environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

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

[0038] Figure 2 It is a flowchart of a fault handling method for a smart home device provided in an embodiment of the present application;

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

[0040] Figure 4 It is a structural diagram of a smart home gateway provided by this application. DETAILED DESCRIPTION

[0041] In order to make the objectives, 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 accompanying drawings.

[0042] It should be noted that the fault handling method for smart home devices provided in the present application is generally executed by a smart home gateway, and correspondingly, the fault handling device for smart home devices is generally arranged in the smart home gateway.

[0043] Figure 1 An exemplary system architecture of a fault handling method or a fault handling apparatus for a smart home device that can be applied to the present application is shown.

[0044] like Figure 1 As shown, the smart home system may include: a cloud server 0, multiple smart home gateways 1 to n, and multiple smart home devices managed by each smart home gateway, where n is an integer greater than 1. The cloud server and the smart home gateway, as well as the smart home gateway and the smart home device can communicate through a network, and the network is used as a medium for providing communication links between the above-mentioned units. The network may include various types of wired communication links or wireless communication links, for example: wired communication links include optical fibers, twisted pairs or coaxial cables, etc., and wireless communication links include Bluetooth communication links, wireless fidelity (WIreless-FIdelity, Wi-Fi) communication links or microwave communication links, etc.

[0045] Among them, the number of cloud servers 0 can be one or more. When the number of cloud servers is multiple, multiple servers form a distributed server cluster. As the data storage center of the smart home system, the cloud server is responsible for centrally storing the operation data, user configuration information, historical records, etc. of all smart home devices. Using powerful computing power, these data are processed and analyzed to provide users with remote monitoring, data analysis, fault warning and other services of smart home devices. Users can access the cloud server through the Internet to achieve remote control and management of smart home devices. The cloud server provides a unified interface and protocol, allowing users to view and control the status of smart home devices anytime and anywhere through mobile phone APP, web pages and other clients. The cloud server is responsible for the registration, login, permission allocation and other management of user information. Through the user authentication and authorization mechanism, it ensures that only legitimate users can access and control smart home devices to ensure the security of the system. The cloud server is responsible for the 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 problems encountered by smart home devices during use. The smart home gateway and the multiple smart home devices it manages constitute a user's smart home network.

[0046] Functions of smart home gateway: As the hub of the smart home system, the smart home gateway can centrally manage multiple smart home devices. Through unified communication protocols and interfaces, it can achieve connection and communication with smart home devices to ensure interoperability 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 process and analyze device data locally to provide users with real-time device status monitoring and fault warning. The smart home gateway supports users to remotely control smart home devices through the cloud server. It can also collaborate 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-click operation. The smart home gateway ensures the security and privacy protection of the smart home system through encrypted communication and identity authentication mechanisms. It can also monitor the home environment in real time. If an abnormal situation is found, it will automatically alarm and notify the user.

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

[0048] It should be noted that the cloud server 0 and the smart home gateways 1 to n of all 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 example is only illustrative and can be any number according to implementation requirements.

[0050] The following will be combined with the attached Figure 2, the fault handling method of the smart home device provided in the embodiment of the present application is described in detail. Among them, the fault handling device of the smart home device in the embodiment of the present application can be Figure 1 The smart home gateway shown.

[0051] See also Figure 2 , is a flowchart of a method for troubleshooting a smart home device according to an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps:

[0052] S201, detecting the working status of smart home devices in real time.

[0053] Among them, the smart home gateway device detects the working status of smart home devices in real time through the following methods:

[0054] Active polling: The smart home gateway device periodically sends status query requests to each smart home device, and the device returns the current status information after receiving the request. This method is applicable to all devices that support active status reporting.

[0055] Event-driven: When the status of a smart home device changes, it actively sends a status update message to the smart home gateway device. This method requires the device to have the ability to trigger events and push messages.

[0056] When performing status detection, the smart home gateway device will also parse and evaluate the returned status information based on the device type, function and preset monitoring rules to determine whether the device is in normal working condition.

[0057] In some embodiments of the present application, the method for a smart home gateway device to detect the working status of a smart home device includes:

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

[0059] Detect whether the operating parameters of the smart home device are within a preset range, if yes, determine that the smart home device is in a normal state, if no, determine that the smart home device is in an abnormal state; or

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

[0061] Among them, the smart home gateway device, as the core component of the smart home system, is responsible for real-time detection of the working status of each smart home device. The following are several specific methods for the smart home gateway device to detect the working status of smart home devices:

[0062] 1. Check whether smart home devices are 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 the preset time, the smart home gateway device will determine that the device is online and 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. Check whether the operating parameters of smart home devices are within the preset range:

[0065] The smart home gateway device receives its operating parameters (such as temperature, humidity, power, signal strength, etc.) regularly or in real time according to the type of smart home device 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 are outside the preset range, the smart home gateway device will mark the device as abnormal and may require further investigation or corrective measures.

[0066] 3. Check if smart home devices report error codes:

[0067] When a smart home device fails or is abnormal, it usually generates and reports an error code to the smart home gateway device. The smart home gateway device receives the error code sent by the smart home device in real time by monitoring the error code reporting channel. If the smart home gateway device receives an error code, it will immediately mark the device as abnormal and take corresponding processing measures based on the type and severity of the error code. If the smart home gateway device does not receive any error code report for a period of time, it will preliminarily determine 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 use them in combination in actual operation to more accurately determine the working status of the smart home device. For example, even if the smart home device is online and does not report an error code, if its operating parameters deviate from the preset range for a long time, the smart home gateway device may mark it as abnormal.

[0069] In addition, the smart home gateway device will further analyze and evaluate the detected status information based on the type and 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.

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

[0071] Among them, if the working status 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 identification from the status information of the abnormal device, which is usually a unique identifier such as a MAC address, device ID or serial number. The smart home gateway device uses the distributed ledger characteristics of the blockchain network to retrieve the latest field data records related to the device in the blockchain network based on the device identification through a secure API interface or a specific blockchain query protocol. This data may include the maintenance history of the device, operation logs, fault reports, and any additional information uploaded by the device or user. During the query process, the smart home gateway device ensures that the communication with the blockchain network is secure to prevent data leakage or tampering.

[0072] Furthermore, the smart home gateway device will extract a unique device identifier from the status information or configuration file of the abnormal device. This device identifier is usually assigned to the device when it leaves the factory and is used to uniquely identify the device in the blockchain network. The hardware identifier is a unique identifier assigned to the device when it leaves the factory, such as a MAC address, serial number, device ID, etc., which 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 locks, smart cameras, etc.), the smart gateway will also obtain the identifier of the currently logged-in user. The user identifier may be a user name, user ID, or a unique identifier of the user's 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 vital role. These nodes include cloud servers and all users' smart home gateway devices, which jointly maintain the distributed ledger of the blockchain to ensure the immutability and traceability of data.

[0074] The IPFS (InterPlanetary File System) protocol is used between each blockchain node to read and write data. IPFS is a distributed file system that uses content addressing to store and retrieve files. Unlike traditional location-based file systems, IPFS calculates the hash value of the file to generate a unique address, and users can access the file through this address. 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 build a query request containing information such as device identification, query conditions and timestamp based on the device identification and query requirements. The smart home gateway device will send the constructed query request to other nodes in the blockchain network through the IPFS protocol. These nodes will receive the query request and match and retrieve it according to 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 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 according to information such as the timestamp and priority 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, and it is determined whether there is an update between the device field data collected this time and the device field data collected last time. If so, 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, asking 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 parses and preprocesses it to ensure the accuracy and readability of the data.

[0078] The smart home gateway compares the field data collected this time with the data collected last time. The comparison may involve changes in a single data point, analysis of data trends, or determination of data ranges. Based on the comparison results, the smart home gateway determines whether the data has changed significantly or has reached the preset update conditions. These conditions may include thresholds for data changes, frequency of data updates, or other rules set by the user. If the data meets the update conditions, the smart home gateway formats the field data collected this time into a format suitable for blockchain storage. This may include converting the data into a specific data structure, adding timestamps, generating data summaries or signatures, etc. In order to protect the privacy and security of the data, the smart home gateway encrypts 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 immutability of the data. The smart home gateway selects a suitable consensus mechanism for data writing based on the type of blockchain network (such as public chain, private chain, or alliance chain). 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 legitimacy and validity of the data and write the data to the blockchain through a 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 will also regularly verify the data on the blockchain to ensure the accuracy and integrity of the data.

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

[0080] When the smart home device receives a data request from the smart home gateway, it collects the device's on-site data;

[0081] The smart home device uses the AES key to encrypt the device field data in plain text to obtain a first ciphertext;

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

[0083] The smart home device uses the private key to sign the first ciphertext and the second ciphertext to obtain a 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 to collect the device on-site data.

[0086] The smart home device uses the preset AES key to encrypt the device field data in plain text to obtain the first ciphertext. AES (Advanced Encryption Standard) is a widely used symmetric encryption algorithm that can provide high data encryption strength. In order to further enhance the security of the data, the smart home device uses the public key in asymmetric encryption to encrypt the first ciphertext again to obtain the 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, and to ensure 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 and extracts 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 passes, the smart home gateway uses its own private key and AES key to decrypt the second ciphertext and the first ciphertext to restore the device field data in plain text.

[0088] S203: Verify whether the queried device field data has been tampered with.

[0089] Among them, after the smart home gateway device obtains the device field data on the blockchain, it will perform the following verification steps:

[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 the two 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 retroactively. Timestamp verification helps identify any possible data rollback or tampering.

[0092] Consensus mechanism verification: In a blockchain network, data is verified and confirmed through a consensus mechanism. Smart home gateway devices can verify the consensus status of 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 on-site data to the smart home device, and instruct the smart home device to recover to a normal state according to the device on-site data.

[0094] Among them, after verification and confirmation 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 based on the content of the device field data. These instructions may include adjusting device parameters, restarting the device, executing self-diagnosis procedures, or requesting manual intervention from the user. The smart home gateway device will continue to monitor the response and subsequent status changes of the smart home device to ensure that the device can successfully recover to normal working status. If any problems are encountered during the recovery process or the device status fails to improve, the smart home gateway device will record error information and may trigger further troubleshooting or notify the user to intervene.

[0095] The embodiments of the present application specifically include the following beneficial effects:

[0096] By detecting the working status of smart home devices in real time, the abnormal status of the devices can be quickly identified, thereby triggering the subsequent processing flow in time. This helps to reduce the service interruption time caused by equipment failure and improve the convenience and safety of home life. The use of blockchain network to store and query the latest equipment field data ensures the immutability and high credibility of the data. The distributed ledger characteristics of blockchain technology make it difficult for data to be maliciously modified once recorded, providing reliable data support for subsequent equipment status recovery. After verifying that the equipment field data has not been tampered with, the data can be automatically sent to the smart home device and instructed to restore to normal status based on this 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 mechanisms such as real-time monitoring, data verification and intelligent recovery, 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 provide strong support for building a more intelligent, convenient and safe home environment.

[0097] The following are device embodiments 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] See also Figure 3 , which shows a schematic diagram of the structure of a fault handling device for a smart home device provided by an exemplary embodiment of the present application, hereinafter referred to as device 3. The device 3 can be implemented as all or part of a smart home gateway through software, hardware or a combination of both. 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 used to detect the working status of the smart home device in real time;

[0100] A query unit 302 is used to obtain a device identification of the smart home device when the working state of the smart home device is abnormal, and query the latest device field data in the blockchain network according to the device identification;

[0101] Verification unit 303, used to verify whether the queried device field data has been tampered with;

[0102] The recovery unit 304 is used to send the device field data to the smart home device if the answer is no, 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 status of the smart home device includes:

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

[0105] Detect whether the operating parameters of the smart home device are within a preset range, if yes, determine that the smart home device is in a normal state, if no, determine that the smart home device is in an abnormal state; or

[0106] Detect whether the smart home device reports an error code. If yes, determine that the smart home device is in an abnormal state; if no, determine 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 IPFS protocol is used to read and write data between blockchain nodes.

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

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

[0110] Determine whether the device field data obtained this time is updated with the device field data obtained last time;

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

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

[0113] Sending a data request to the smart home device, the data request is used to instruct the smart home device to collect device field data; using an AES key to encrypt the device field data in plain text to obtain a first ciphertext; using a public key of the smart home device to encrypt the first ciphertext to obtain a second ciphertext; using a private key of the smart home device to sign the first ciphertext and the second ciphertext to obtain a digital signature; packaging the first ciphertext, the second ciphertext and the digital signature into a data response, and sending the data response to a smart home gateway;

[0114] receiving a 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] Use the public key of the smart home gateway to verify the digital signature to confirm the integrity of the data and the identity of the sender;

[0117] If the digital signature verification is successful, the second ciphertext and the first ciphertext are decrypted using the private key and the AES key of the smart home gateway to restore the device field data in plain text.

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

[0119] In one or more possible embodiments, the device identification includes: a device hardware identification and a logged-in user identification.

[0120] It should be noted that the device 3 provided in the above embodiment only uses the division of the above functional modules as an example when executing the fault handling method of the smart home device. In actual applications, the above functions can be assigned to different functional modules as needed, 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 fault handling device for the smart home device provided in the above embodiment and the fault handling method embodiment of the smart home device belong to the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.

[0121] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0122] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 2 The specific description of the illustrated embodiment will not be repeated here.

[0123] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the fault handling method of the smart home device as described in the above embodiments.

[0124] See also Figure 4 , which is a schematic diagram of the structure of a smart home gateway provided in an embodiment of the present application. Figure 4 As shown, the smart home gateway 400 may 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 these components.

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

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

[0128] Among them, the processor 401 may include one or more processing cores. The processor 401 uses various interfaces and lines to connect the various parts of the entire smart home gateway 400, and executes various functions and processes data of the smart home gateway 400 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 hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 401 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 401, and it can be implemented separately through a chip.

[0129] Among them, the memory 405 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). 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 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 405 may optionally be at least one storage device located away from the aforementioned processor 401. As Figure 4 As shown, the memory 405 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program.

[0130] exist Figure 4In the smart home gateway 400 shown in FIG. 1 , the user interface 403 is mainly used to provide an input interface for the user 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 following steps: Figure 2 The specific process can be referred to Figure 2 As shown, no further description is given here.

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

[0132] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for troubleshooting a smart home device, characterized in that: include: Real-time detection of the working status of smart home devices; When the working state of the smart home device is abnormal, obtaining the device identification of the smart home device, and querying the latest device field data in the blockchain network according to the device identification; Verify whether the queried equipment field data has been tampered with; If not, the device on-site 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 on-site data.

2. The method according to claim 1, characterized in that The real-time detection of the working status of the smart home device includes: Detect whether the smart home device is online, if yes, determine that the smart home device is in a normal state; if no, determine that the smart home device is in an abnormal state; or Detect whether the operating parameters of the smart home device are within a preset range, if yes, determine that the smart home device is in a normal state, if no, determine that the smart home device is in an abnormal state; or Detect whether the smart home device reports an error code. If yes, determine that the smart home device is in an abnormal state; if no, determine that the smart home device is in a normal state.

3. The method according to claim 1 or 2, characterized in that: The blockchain nodes of the blockchain network include cloud servers and smart home gateways of all users, and the IPFS protocol is used to read and write data between blockchain nodes.

4. The method according to claim 3, characterized in that Also includes: If the working state of the smart home device is normal, obtaining device field data of the smart home device; Determine whether the device field data obtained this time is updated with the device field data obtained last time; If yes, the device field data acquired this time is written into the blockchain network.

5. The method according to claim 4, characterized in that The obtaining of device on-site data of the smart home device includes: Sending a data request to the smart home device, the data request is used to instruct the smart home device to collect device field data; using an AES key to encrypt the device field data in plain text to obtain a first ciphertext; using a public key of the smart home device to encrypt the first ciphertext to obtain a second ciphertext; using a private key of the smart home device to sign the first ciphertext and the second ciphertext to obtain a digital signature; packaging 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 a data response from the smart home device; Unpacking the data response to extract the first ciphertext, the second ciphertext and the digital signature; Use the public key of the smart home gateway to verify the digital signature to confirm the integrity of the data and the identity of the sender; If the digital signature verification is successful, the second ciphertext and the first ciphertext are decrypted using the private key and the AES key of the smart home gateway to restore the device field data in plain text.

6. The method according to claim 1 or 2 or 4 or 5, characterized in that: Use active polling or event-driven methods to detect the working status of smart home devices in real time.

7. The method according to claim 6, characterized in that The device identification includes: a device hardware identification and a logged-in user identification.

8. A fault handling device for smart home equipment, characterized in that: include: A detection unit, used to detect the working status of smart home devices in real time; A query unit, configured to obtain a device identification of the smart home device when the working state of the smart home device is abnormal, and query the latest device field data in the blockchain network according to the device identification; A verification unit, used to verify whether the queried device field data has been tampered with; A recovery unit is used to send the device field data to the smart home device if the answer is no, and to instruct the smart home device to recover to a normal state according to the device field data.

9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.

10. A smart home gateway, characterized in that: include: 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 executing the method steps as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Equipment monitoring and early warning method, system and equipment based on blockchain, and storage medium

    CN110611579A

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

    CN112596498A

  • Information processing method and device based on block chain

    CN112801317A

  • Intelligent water affair Internet of Things remote monitoring control method and system and block chain system

    CN113849796A

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

    CN118333612A

Cited By

  • Edge computing gateway

    CN121309265A

  • An edge computing gateway

    CN121309265B