Disclosure of Invention
The invention provides a method and a device for recovering intelligent gateway engineering installation data, terminal equipment and a readable storage medium, and aims to solve the problem that a home intelligent gateway in the prior art cannot recover configuration data one key.
In order to solve the above technical problem, an embodiment of the present invention provides a method for recovering installation data of an intelligent gateway, including:
receiving gateway data backup information uploaded by a user terminal and storing the gateway data backup information in a backup database; the gateway data backup information comprises a gateway unique code and a gateway database, wherein the gateway unique code and the gateway database are in one-to-one correspondence;
responding to a gateway data recovery request sent by the user terminal, and inquiring a gateway database needing to be recovered from the backup database according to a unique code of a gateway to be recovered in the gateway data recovery request;
and determining a gateway to be recovered according to the unique code of the gateway to be recovered, and issuing the gateway database to be recovered to the gateway to be recovered.
Further, the gateway data backup information further comprises house type information; the responding to the gateway data recovery request sent by the user terminal, and querying a gateway database to be recovered from the backup database according to the unique code of the gateway to be recovered in the gateway data recovery request specifically includes:
responding to a gateway data recovery request sent by the user terminal, and matching a plurality of correlated unique codes of the gateway to be recovered according to the house type information in the gateway data recovery request;
and inquiring a gateway database needing to be restored from the backup database according to the unique code of the gateway to be restored.
Further, the gateway database includes device configuration data and scene linkage configuration data.
In order to solve the same technical problem, the invention also provides an intelligent gateway engineering installation data recovery device, which comprises:
the backup information storage module is used for receiving gateway data backup information uploaded by the user terminal and storing the gateway data backup information in a backup database; the gateway data backup information comprises a gateway unique code and a gateway database, wherein the gateway unique code and the gateway database are in one-to-one correspondence;
the gateway recovery response module is used for responding to a gateway data recovery request sent by the user terminal and inquiring a gateway database needing to be recovered from the backup database according to the unique code of the gateway to be recovered in the gateway data recovery request;
and the gateway data issuing module is used for determining the gateway to be restored according to the unique code of the gateway to be restored and issuing the gateway database to be restored to the gateway to be restored.
Further, the gateway data backup information further comprises house type information; the gateway recovery response module specifically includes:
the associated gateway matching unit is used for responding to a gateway data recovery request sent by the user terminal and matching a plurality of mutually associated unique codes of the gateway to be recovered according to the house type information in the gateway data recovery request;
and the gateway data query unit is used for querying a gateway database needing to be recovered from the backup database according to the unique code of the gateway to be recovered.
Further, the gateway database includes device configuration data and scene linkage configuration data.
In order to solve the same technical problem, the present invention further provides an intelligent gateway engineering installation data recovery terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the memory is coupled to the processor, and the processor executes the computer program to implement any one of the intelligent gateway engineering installation data recovery methods.
In order to solve the same technical problem, the present invention further provides a computer-readable storage medium, where a computer program is stored, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the intelligent gateway engineering installation data recovery methods.
Compared with the prior art, the invention has the following beneficial effects:
the embodiment of the invention provides a method and a device for recovering installation data of an intelligent gateway engineering, terminal equipment and a readable storage medium, wherein the method comprises the following steps: receiving gateway data backup information uploaded by a user terminal and storing the gateway data backup information in a backup database; the gateway data backup information comprises a gateway unique code and a gateway database, wherein the gateway unique code and the gateway database are in one-to-one correspondence; responding to a gateway data recovery request sent by the user terminal, and inquiring a gateway database needing to be recovered from the backup database according to a unique code of a gateway to be recovered in the gateway data recovery request; and determining a gateway to be recovered according to the unique code of the gateway to be recovered, and issuing the gateway database to be recovered to the gateway to be recovered. By implementing the method and the system, after the engineering is installed, the background of the smart home system performs data backup to generate a permanent piece of engineering installation data, and only the private data of the user is cleared after one-key reset, and the engineering installation data configured at the initial delivery stage of the smart home is recovered, so that the user does not need to re-configure the product after the intelligent gateway is restored to the factory setting.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, an embodiment of the present invention provides a method for recovering installation data of an intelligent gateway, including the steps of:
s1, receiving gateway data backup information uploaded by the user terminal and storing the gateway data backup information in a backup database; the gateway data backup information comprises a gateway unique code and a gateway database, and the gateway unique code and the gateway database are in one-to-one correspondence.
In this embodiment of the present invention, step S1 is to receive gateway data backup information uploaded by the user terminal and store the gateway data backup information in the backup database. The gateway data backup information comprises a gateway unique code and a gateway database, the gateway unique code and the gateway database are in one-to-one correspondence, and as an optimal scheme, the gateway database comprises equipment configuration data and scene linkage configuration data.
It can be understood that, after each pair of engineering personnel completes the installation of the smart home engineering (including adding an intelligent switch, an intelligent sensor, configuring an automatic scene and the like), one-key backup can be performed, and the engineering installation information (in the form of database files) is backed up to the cloud server.
Configuration information such as equipment addition, automatic scene addition and the like of engineering installation is finally stored in a database and stored in FLASH of a gateway, the principle of one-key backup is that an ID (gateway unique code) of the gateway and a gateway database are uploaded to a cloud, and the cloud associates and stores the gateway ID and the database.
Specifically, after the project installation is completed, configured device information and scene information (device configuration data and scene linkage configuration data) are stored in a FLASH of the gateway in a database file form, meanwhile, the gateway transmits the database to the user terminal, the user terminal uploads a gateway unique code (SN), house type information and a gateway database to the cloud, and the cloud correspondingly stores the database of each gateway and the gateway unique code.
S2, responding to a gateway data recovery request sent by the user terminal, and inquiring a gateway database needing to be recovered from the backup database according to the unique code of the gateway to be recovered in the gateway data recovery request;
in this embodiment of the present invention, further, the gateway data backup information further includes a user type information; step S2 specifically includes the steps of:
s210, responding to a gateway data recovery request sent by the user terminal, and matching a plurality of correlated unique codes of the gateway to be recovered according to the house type information in the gateway data recovery request;
and S220, inquiring the gateway database needing to be restored from the backup database according to the unique code of the gateway to be restored.
S3, determining the gateway to be recovered according to the unique code of the gateway to be recovered, and issuing the gateway database to be recovered to the gateway to be recovered.
In the embodiment of the invention, when the user terminal triggers one-key restoration, the unique code of the gateway to be restored is transmitted to the cloud, and the cloud issues the corresponding database to the corresponding gateway; the original database of the gateway is deleted, and the database issued by the cloud is taken as the standard, so that the gateway recovers the initial backup gateway configuration, and the gateway can normally operate after being restarted.
Preferably, the gateway data backup information further includes user type information, and when performing the associated backup of the user type information during the backup, the plurality of gateway configurations managed by the gateway data backup information can be restored together during the later restoration. Specifically, the house type information is mainly room area information (such as a living room, a kitchen, a master bedroom and the like) when the installation of a project is finished, the information needs to be stored in a cloud end and subsequently provided with an APP to obtain a room list so as to be displayed on the APP, when the APP is clicked to trigger one-key restoration, the database is issued to the gateway, and meanwhile, the gateway related to the house type information is restored at the same time. For example: when the project is installed, the configuration of a living room, a kitchen, a master sleeping area and a guest sleeping area is related; the user carelessly deletes the main lying area when in use; when the APP triggers one-key restoration, the cloud terminal issues the database to the gateway, and the four areas of the living room, the kitchen, the master sleeping area and the guest sleeping area can be restored at the same time during backup.
Referring to fig. 3-7, as an example, the following is an implementation of the present invention:
1. after each pair of engineering personnel completes the installation of the smart home engineering (including adding an intelligent switch, an intelligent sensor, configuring an automatic scene and the like), one-key backup is carried out by engineering personnel, and engineering installation information is backed up to a cloud server;
2. a backup scheme: the method comprises the following steps that operations such as adding equipment and adding automatic scenes in engineering installation are finally realized in a form of storing the operations into a database and storing the operations into FLASH of a gateway, one-key backup is realized in a mode that the ID of the gateway and the database are uploaded to a cloud end, and the cloud end associates and stores the ID of the gateway and the database;
3. when a user resets the gateway carelessly or restores the factory settings, the database of the gateway is completely emptied, and the equipment and the automation scene are completely uncontrollable;
4. at the moment, the user binds the gateway with the APP, then clicks 'one-key restoration' on the APP, the cloud sends the database corresponding to the gateway ID to the gateway, and at the moment, the sub-equipment and the automation scene of the gateway can be normally controlled, so that a series of troublesome operations such as re-adding the sub-equipment and the automation scene are avoided.
It should be noted that, in a specific application, when a whole smart home is configured to be disorderly when a owner resale a house, the engineering installation state can be restored by one key when the smart home is transferred to a new owner, which is equivalent to selling a whole set of new smart home. Meanwhile, the private data of the old owner is cleared, and the rights and interests of the old owner are protected.
In the case of ground product batch delivery, standard matching equipment and scenes installed in smart home engineering also need to be manually configured and recovered one by one, and if a user is not familiar with product use, a lot of problems of after-sale support are encountered. After the standard distribution project is installed, the data is delivered to an owner, and when the data is migrated to an account of the owner, the background of the smart home system automatically performs data backup to generate a permanent project installation data. After one-key reset, only the private data of the user is cleared, and the data mode of the smart home at the initial delivery stage is recovered without reconfiguring the product.
The main user terminal provides the function and carries out the one-key and resumes engineering installation data, and under the condition that the main user is unfamiliar with the configuration and disturbs wisdom house equipment and scene or maloperation reset clear data, can resume the engineering installation state of standard configuration by one-key, need not manual configuration and can use.
It should be noted that the above method or flow embodiment is described as a series of acts or combinations for simplicity, but those skilled in the art should understand that the present invention is not limited by the described acts or sequences, as some steps may be performed in other sequences or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are exemplary embodiments and that no single embodiment is necessarily required by the inventive embodiments.
Referring to fig. 8, in order to solve the same technical problem, the present invention further provides an intelligent gateway engineering installation data recovery apparatus, including:
the backupinformation storage module 1 is used for receiving gateway data backup information uploaded by a user terminal and storing the gateway data backup information in a backup database; the gateway data backup information comprises a gateway unique code and a gateway database, wherein the gateway unique code and the gateway database are in one-to-one correspondence;
the gateway recovery response module 2 is configured to respond to a gateway data recovery request sent by the user terminal, and query a gateway database to be recovered from the backup database according to a unique code of a gateway to be recovered in the gateway data recovery request;
and the gateway data issuing module 3 is used for determining the gateway to be restored according to the unique code of the gateway to be restored and issuing the gateway database to be restored to the gateway to be restored.
Further, the gateway data backup information further comprises house type information; the gateway recovery response module 2 specifically includes:
the associated gateway matching unit is used for responding to a gateway data recovery request sent by the user terminal and matching a plurality of mutually associated unique codes of the gateway to be recovered according to the house type information in the gateway data recovery request;
and the gateway data query unit is used for querying a gateway database needing to be recovered from the backup database according to the unique code of the gateway to be recovered.
Further, the gateway database includes device configuration data and scene linkage configuration data.
It can be understood that the foregoing device item embodiments correspond to the method item embodiments of the present invention, and the device for recovering installation data of an intelligent gateway engineering provided in the embodiments of the present invention can implement the method for recovering installation data of an intelligent gateway engineering provided in any method item embodiment of the present invention.
In order to solve the same technical problem, the present invention further provides an intelligent gateway engineering installation data recovery terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the memory is coupled to the processor, and the processor executes the computer program to implement any one of the intelligent gateway engineering installation data recovery methods.
The intelligent gateway engineering installation data recovery terminal equipment can be computing equipment such as a desktop computer, a notebook computer, a palm computer and a cloud server. The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general processor can be a microprocessor or the processor can be any conventional processor and the like, the processor is a control center of the intelligent gateway engineering installation data recovery terminal device, and various interfaces and lines are used for connecting all parts of the whole intelligent gateway engineering installation data recovery terminal device.
The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
In order to solve the same technical problem, the present invention further provides a computer-readable storage medium, where a computer program is stored, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the intelligent gateway engineering installation data recovery methods.
The computer program may be stored in a computer readable storage medium, which when executed by a processor, may implement the steps of the various method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.