CN111193751B - Factory setting restoration method and equipment - Google Patents

Factory setting restoration method and equipment Download PDF

Info

Publication number
CN111193751B
CN111193751B CN202010032607.3A CN202010032607A CN111193751B CN 111193751 B CN111193751 B CN 111193751B CN 202010032607 A CN202010032607 A CN 202010032607A CN 111193751 B CN111193751 B CN 111193751B
Authority
CN
China
Prior art keywords
request message
factory reset
value
reset request
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010032607.3A
Other languages
Chinese (zh)
Other versions
CN111193751A (en
Inventor
武传坤
傅德谦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Linyi University
Original Assignee
Linyi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Linyi University filed Critical Linyi University
Priority to CN202010032607.3A priority Critical patent/CN111193751B/en
Publication of CN111193751A publication Critical patent/CN111193751A/en
Application granted granted Critical
Publication of CN111193751B publication Critical patent/CN111193751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

本申请实施例提供了一种恢复出厂设置的方法及设备,其方法包括:目标设备接收来自控制终端的恢复出厂设置请求消息。恢复出厂设置请求消息包括:恢复出厂设置指令、设备身份标识、第一混淆值;其中,第一混淆值为控制终端基于预设算法以及预设的第一密钥,对恢复出厂设置指令、设备身份标识进行加密得出的。基于预设规则,根据恢复出厂设置请求消息,对第一混淆值进行验证。在第一混淆值验证通过的情况下,执行恢复出厂设置指令。通过上述方案,可以有效的提高电子设备的安全性,避免电子设备的拥有者失去对该电子设备的控制权,造成相应的损失。

Figure 202010032607

The embodiments of the present application provide a method and device for restoring factory settings. The method includes: a target device receives a request message for restoring factory settings from a control terminal. The factory reset request message includes: a factory reset instruction, a device identity, and a first obfuscated value; wherein, the first obfuscated value is the control terminal based on a preset algorithm and a preset first key to restore the factory settings instruction, device The ID is encrypted. Based on the preset rule, the first obfuscated value is verified according to the factory reset request message. In the case that the verification of the first obfuscated value is passed, the instruction of restoring the factory settings is executed. Through the above solution, the security of the electronic device can be effectively improved, and the owner of the electronic device can be prevented from losing the control right of the electronic device and causing corresponding losses.

Figure 202010032607

Description

一种恢复出厂设置的方法及设备Method and device for restoring factory settings

技术领域technical field

本申请涉及电子技术领域,尤其涉及一种恢复出厂设置的方法及设备。The present application relates to the field of electronic technology, and in particular, to a method and device for restoring factory settings.

背景技术Background technique

随着网络技术的快速发展和广泛应用,越来越多的电子设备具有了网络通信的能力,从而可以通过网络实现对电子设备的管控。With the rapid development and wide application of network technology, more and more electronic devices have the capability of network communication, so that the management and control of electronic devices can be realized through the network.

现有的电子设备大多都具有恢复出厂设置的功能,也就是说可以将电子设备初始化。现有的电子设备恢复出厂设置的方式主要有两种:一种是通过电子设备的按键恢复出厂设置,一种是通过网络控制电子设备恢复出厂设置。Most of the existing electronic devices have the function of restoring the factory settings, that is to say, the electronic devices can be initialized. There are mainly two ways to restore the factory settings of the existing electronic equipment: one is to restore the factory settings through the keys of the electronic equipment, and the other is to control the electronic equipment to restore the factory settings through the network.

上述电子设备的两种主要的恢复出厂设置的方式,都无需经过拥有者的同意即可对该电子设备恢复出厂设置。但有些场景下,电子设备的使用者和拥有者不是同一人,例如租赁、被盗等等,使用者通过上述恢复出厂设置的方式直接控制电子设备恢复出厂设置,会造成该电子设备脱离拥有者的控制,造成设备拥有者的损失。The two main methods of restoring the factory settings of the electronic equipment mentioned above can restore the factory settings of the electronic equipment without the consent of the owner. However, in some scenarios, the user and owner of the electronic device are not the same person, such as leased, stolen, etc., the user directly controls the electronic device to restore the factory settings through the above method of restoring the factory settings, which will cause the electronic device to be separated from the owner. control, resulting in the loss of the equipment owner.

发明内容SUMMARY OF THE INVENTION

本说明书实施例提供的一种恢复出厂设置的方法及设备,用于解决现有技术中的如下技术问题:电子设备无需经过拥有者的同意,其他人可以使该电子设备恢复出厂设置,导致电子设备脱离拥有者的控制,造成相应的损失。A method and device for restoring factory settings provided by the embodiments of this specification are used to solve the following technical problem in the prior art: the electronic device does not need the owner's consent, and other people can restore the electronic device to the factory settings, resulting in electronic The equipment is out of the owner's control, resulting in corresponding losses.

一方面,本申请实施例提供了一种恢复出厂设置的方法,该方法包括:目标设备接收来自控制终端的恢复出厂设置请求消息,恢复出厂设置请求消息包括:恢复出厂设置指令、设备身份标识、第一混淆值;其中,第一混淆值为控制终端基于预设算法以及预设的第一密钥,对恢复出厂设置指令、设备身份标识进行加密得出的;基于预设规则,根据恢复出厂设置请求消息,对第一混淆值进行验证;在第一混淆值验证通过的情况下,执行恢复出厂设置指令。On the one hand, an embodiment of the present application provides a method for restoring factory settings. The method includes: a target device receives a factory setting restore request message from a control terminal, and the factory setting restore request message includes: a factory setting restore instruction, a device identity, a The first obfuscation value; wherein, the first obfuscation value is obtained by the control terminal encrypting the factory reset instruction and the device identification based on the preset algorithm and the preset first key; based on the preset rules, according to the factory reset A setting request message is used to verify the first obfuscated value; in the case that the verification of the first obfuscated value is passed, a factory reset instruction is executed.

在一种可能实现的方式中,基于预设规则,对恢复出厂设置请求消息中第一混淆值进行验证,具体包括:基于预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的恢复出厂设置指令、设备身份标识进行加密,得出第二混淆值;确定恢复出厂设置请求消息中的第一混淆值与第二混淆值是否一致;在第一混淆值与第二混淆值一致的情况下,确定第一混淆值验证通过。In a possible implementation manner, verifying the first obfuscated value in the factory reset request message based on a preset rule, specifically including: based on a preset algorithm and a preset second key, verifying the factory reset request message The factory reset instruction and the device identity in the message are encrypted to obtain the second confusion value; determine whether the first confusion value and the second confusion value in the factory reset request message are consistent; between the first confusion value and the second confusion value In the case of consistency, it is determined that the first obfuscated value has passed the verification.

在一种可能实现的方式中,基于预设规则,对恢复出厂设置请求消息中第一混淆值进行验证,具体包括:基于预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的第一混淆值进行解密,得到相应的设备身份标识;确定解密后得到的设备身份标识,与恢复出厂设置请求消息中的设备身份标识是否一致;在解密后得到的设备身份标识,与恢复出厂设置请求消息中的设备身份标识一致的情况下,确定第一混淆值验证通过。In a possible implementation manner, verifying the first obfuscated value in the factory reset request message based on a preset rule, specifically including: based on a preset algorithm and a preset second key, verifying the factory reset request message Decrypt the first obfuscated value in the device to obtain the corresponding device identity; determine whether the device identity obtained after decryption is consistent with the device identity in the factory reset request message; the device identity obtained after decryption is the same as the recovery If the device IDs in the factory setting request message are consistent, it is determined that the verification of the first obfuscated value is passed.

在一种可能实现的方式中,在基于预设规则,对恢复出厂设置请求消息中第一混淆值进行验证之前,方法还包括:确定恢复出厂设置请求消息中的设备身份标识,与目标设备的身份标识一致。In a possible implementation manner, before verifying the first obfuscated value in the factory reset request message based on a preset rule, the method further includes: determining that the device identity in the factory reset request message is the same as that of the target device. Identity is the same.

在一种可能实现的方式中,恢复出厂设置请求消息中还包括:随机数;第一混淆值为控制终端基于预设算法以及预设的第一密钥,对恢复出厂设置指令、设备身份标识、随机数进行加密得出的。In a possible implementation manner, the request message for restoring factory settings further includes: a random number; the first confusion value is the control terminal based on a preset algorithm and a preset first key, which is used for restoring the factory settings instruction and device identity. , random numbers are encrypted.

在一种可能实现的方式中,基于预设规则,对恢复出厂设置请求消息中第一混淆值进行验证,具体包括:基于预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的随机数、恢复出厂设置指令以及设备身份标识进行加密,进行加密,得出第二混淆值;确定恢复出厂设置请求消息中的第一混淆值与第二混淆值是否一致;在第一混淆值与第二混淆值一致的情况下,确定第一混淆值验证通过。In a possible implementation manner, verifying the first obfuscated value in the factory reset request message based on a preset rule, specifically including: based on a preset algorithm and a preset second key, verifying the factory reset request message The random number, the instruction for restoring factory settings, and the device identity in the message are encrypted, and the second confusion value is obtained by encrypting; determine whether the first confusion value in the request message for restoring factory settings is consistent with the second confusion value; in the first confusion value If the value is consistent with the second obfuscated value, it is determined that the first obfuscated value has passed the verification.

在一种可能实现的方式中,基于预设规则,对恢复出厂设置请求消息中第一混淆值进行验证,具体包括:基于预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的第一混淆值进行解密,得到相应的设备身份标识、随机数;确定解密后得到的设备身份标识,与恢复出厂设置请求消息中的设备身份标识是否一致;以及确定解密后得到的随机数,与恢复出厂设置请求消息中的随机数是否一致;在二者均一致的情况下,确定第一混淆值验证通过。In a possible implementation manner, verifying the first obfuscated value in the factory reset request message based on a preset rule, specifically including: based on a preset algorithm and a preset second key, verifying the factory reset request message Decrypt the first obfuscated value in the device to obtain the corresponding device identity and random number; determine whether the device identity obtained after decryption is consistent with the device identity in the factory reset request message; and determine the random number obtained after decryption , whether it is consistent with the random number in the factory reset request message; if both are consistent, it is determined that the verification of the first obfuscated value has passed.

在一种可能实现的方式中,随机数为控制终端生成所述恢复出厂设置请求消息的时间戳。In a possible implementation manner, the random number is the timestamp at which the control terminal generates the factory reset request message.

在一种可能实现的方式中,在基于预设规则,对恢复出厂设置请求消息中第一混淆值进行验证之前,方法还包括:确定时间戳是否超出预设阈值;在时间戳未超出预设阈值的情况下,确定所述恢复出厂设置请求消息为有效的恢复出厂设置请求消息。In a possible implementation manner, before verifying the first obfuscated value in the factory reset request message based on a preset rule, the method further includes: determining whether the timestamp exceeds a preset threshold; when the timestamp does not exceed a preset threshold In the case of the threshold value, it is determined that the factory reset request message is a valid factory reset request message.

另一方面,本申请实施例还提供了一种恢复出厂设置的设备,该备包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够:On the other hand, an embodiment of the present application also provides a device for restoring factory settings, the device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores data that can be accessed by the at least one processor Executed instructions, the instructions are executed by at least one processor to enable at least one processor to:

目标设备接收来自控制终端的恢复出厂设置请求消息,恢复出厂设置请求消息包括:恢复出厂设置指令、设备身份标识、第一混淆值;The target device receives a factory reset request message from the control terminal, and the factory reset request message includes: a factory reset instruction, a device identity, and a first confusion value;

其中,第一混淆值为控制终端基于预设算法以及预设的第一密钥,对恢复出厂设置指令、设备身份标识进行加密得出的;Wherein, the first obfuscated value is obtained by the control terminal encrypting the factory reset instruction and the device identity based on a preset algorithm and a preset first key;

基于预设规则,根据恢复出厂请求,对第一混淆值进行验证;Based on the preset rules and according to the factory reset request, verify the first obfuscated value;

在第一混淆值验证通过的情况下,执行恢复出厂设置指令。In the case that the verification of the first obfuscated value is passed, the instruction of restoring the factory settings is executed.

本申请实施例提供的一种恢复出厂设置的方法及设备,控制终端能够在向目标设备发送恢复出厂设置请求消息时,附加一个用于安全验证的第一混淆值,第一混淆值是根据预设的算法、第一密钥,对恢复出厂设置指令和设备身份标识等信息进行加密得出的。目标设备能够在接收到包含有第一混淆值的恢复出厂设置请求消息后,通过预设的规则对第一混淆值进行验证,在验证通过的情况下,可以执行恢复出厂设置指令。通过上述方案,能够有效的解决现有技术中电子设备无需经过拥有者的同意,其他人可以使该电子设备恢复出厂设置,导致该电子设备脱离拥有者的控制,造成拥有者损失的问题。并且,能够有效的增强电子设备的安全性,提高用户的用户体验。In the method and device for restoring factory settings provided by the embodiments of the present application, the control terminal can add a first confusion value for security verification when sending a request message for restoring factory settings to a target device, and the first confusion value is based on a preset value. It is obtained by encrypting the information such as the factory reset instruction and the device identity identification. After receiving the factory reset request message containing the first obfuscated value, the target device can verify the first obfuscated value through a preset rule, and can execute the factory reset instruction if the verification is passed. The above solution can effectively solve the problem in the prior art that the electronic device does not need the owner's consent, and other people can restore the electronic device to factory settings, causing the electronic device to be out of the owner's control and causing loss to the owner. Moreover, the security of the electronic device can be effectively enhanced, and the user experience of the user can be improved.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:

图1为本申请实施例提供的一种恢复出厂设置的方法的流程图;1 is a flowchart of a method for restoring factory settings provided by an embodiment of the present application;

图2为本申请实施例提供的一种恢复出厂设置的方法的另一种流程图;2 is another flowchart of a method for restoring factory settings provided by an embodiment of the present application;

图3为本申请实施例提供的一种恢复出厂设置的方法的又一种流程图;3 is another flowchart of a method for restoring factory settings provided by an embodiment of the present application;

图4为本申请实施例提供的一种恢复出厂设置的设备的结构示意图。FIG. 4 is a schematic structural diagram of a device for restoring factory settings according to an embodiment of the present application.

具体实施方式Detailed ways

为使本说明书的目的、技术方案和优点更加清楚,下面将结合本说明书具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于说明书中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of this specification clearer, the technical solutions of the present application will be clearly and completely described below with reference to the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the description, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

以下结合附图,详细说明本申请各实施例提供的技术方案。The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

现有技术中,对电子设备进行恢复出厂设置大部分都可由电子设备的使用者决定并执行。有些电子设备需要用户输入口令密码或者指纹等认证信息,只有在认证信息合法的情况下才能进入电子设备的系统,但是,一旦进入系统,使用者就可以启动电子设备恢复出厂设置。现有技术中,对电子设备进行恢复出厂设置也可以由控制终端通过相应的网络进行控制,但是控制终端对应的用户是该电子设备的使用者还是拥有者不能确认。In the prior art, most of the factory reset of an electronic device can be determined and executed by the user of the electronic device. Some electronic devices require the user to enter authentication information such as passwords or fingerprints. Only when the authentication information is legal can the system of the electronic device be entered. However, once the user enters the system, the user can start the electronic device to restore the factory settings. In the prior art, restoring the factory settings of the electronic device can also be controlled by the control terminal through the corresponding network, but it cannot be confirmed whether the user corresponding to the control terminal is the user or the owner of the electronic device.

因此,在一些特殊情况下,比如说电子设备被盗等情况下,盗窃者无需征得该设备拥有者的同意即可将该电子设备恢复出厂设置,从而导致设备拥有者失去对该电子设备的控制权。再比如说,电子设备的拥有者将该设备租赁给其他用户使用,租借用户也可以不通过设备拥有者的同意直接将该电子设备恢复出厂设置,倒是设备拥有者丧失对该电子设备的控制权,造成一定的损失。因此,如何保证电子设备拥有者的权益,提高电子设备恢复出厂设置的安全性,成为重要的技术问题。Therefore, in some special cases, such as when an electronic device is stolen, the thief can restore the electronic device to its factory settings without the consent of the owner of the device, thus causing the owner of the device to lose the ownership of the electronic device. Control. For another example, if the owner of an electronic device leases the device to other users, the leased user can directly restore the electronic device to factory settings without the consent of the device owner, but the device owner loses control over the electronic device. , causing certain losses. Therefore, how to guarantee the rights and interests of the owner of the electronic device and improve the security of the factory reset of the electronic device has become an important technical issue.

图1为本申请实施例提供的一种恢复出厂设置的方法的流程图。如图1所示,该方法包括以下步骤:FIG. 1 is a flowchart of a method for restoring factory settings provided by an embodiment of the present application. As shown in Figure 1, the method includes the following steps:

S101,控制终端生成恢复生产设置请求消息,并将该恢复出厂设置请求消息发送给相应的目标设备。S101, the control terminal generates a request message for restoring production settings, and sends the request message for restoring factory settings to a corresponding target device.

其中,恢复出厂设置请求消息中至少包括:恢复出厂设置指令、设备身份标识、第一混淆值。第一混淆值可以是控制终端根据预设算法以及预设的第一密钥,对恢复出厂设置指令、设备身份标识符进行加密得出的。The factory reset request message includes at least: a factory reset instruction, a device identity, and a first confusion value. The first obfuscation value may be obtained by the control terminal encrypting the factory reset instruction and the device identity identifier according to the preset algorithm and the preset first key.

例如,恢复出厂设置指令为Command、设备身份标识为ID、第一密钥为K1、预设算法为F1,则第一混淆值C1=F1(K1,Command||ID)。For example, if the factory reset command is Command, the device identity is ID, the first key is K 1 , and the preset algorithm is F 1 , the first confusion value C 1 =F 1 (K 1 , Command||ID).

设备身份标识是指目标设备的身份标识,用于唯一标识目标设备。该设备身份标识、第一密钥均可以是预先存储在控制终端中的,也可以是用户将获悉的设备身份标识、第一密钥输入的控制终端中的,在本申请实施例中不加以限定。The device identity refers to the identity of the target device and is used to uniquely identify the target device. The device identification and the first key may be pre-stored in the control terminal, or may be entered in the control terminal into which the user inputs the learned device identification and the first key, which are not added in the embodiments of this application. limited.

这里所说的控制终端是指电子设备拥有者所使用的终端设备,可以是例如智能手机、平板电脑等具有网络通信能力的电子设备。目标设备是指进行恢复出厂设置的电子设备。The control terminal mentioned here refers to a terminal device used by the owner of the electronic device, which may be, for example, an electronic device with a network communication capability, such as a smart phone and a tablet computer. A target device is an electronic device that is factory reset.

S102,目标设备确定恢复出厂设置请求消息中的设备身份标识,与所述目标设备的身份标识一致。S102, the target device determines that the device identity in the factory reset request message is consistent with the identity of the target device.

目标设备可以先根据恢复出厂设置请求消息中的设备身份标识,与目标设备的身份标识是否一致;在一致的情况下,再执行下一步骤。The target device can first check whether the device identity in the factory reset request message is consistent with the identity of the target device; if they are consistent, perform the next step.

通过上述方案,可以使得目标设备确定与其对应的恢复出厂设置请求消息。Through the above solution, the target device can be made to determine the corresponding factory reset request message.

S103,目标设备基于预设规则,对接收的恢复出厂设置请求消息中的第一混淆值进行验证。S103, the target device verifies the first obfuscated value in the received factory reset request message based on a preset rule.

在本申请的一些实施例中,基于预设规则,对第一混淆值进行验证,可以按照如图2所示的方法实现:In some embodiments of the present application, based on a preset rule, verifying the first obfuscated value can be implemented according to the method shown in FIG. 2 :

S201,目标设备根据预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的恢复出厂设置指令、设备身份标识进行加密,得出第二混淆值。S201 , the target device encrypts the factory reset instruction and the device identity in the factory reset request message according to a preset algorithm and a preset second key to obtain a second obfuscated value.

在本申请说明书中,第二混淆值是目标设备基于预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的恢复出厂设置指令、设备身份标识进行加密得出的。In this specification, the second obfuscation value is obtained by the target device encrypting the factory reset instruction and device identity in the factory reset request message based on a preset algorithm and a preset second key.

例如,目标设备中的预设算法为F2、第二密钥为K2,恢复出厂设置请求消息中的恢复出厂设置指令为Command、设备身份标识为ID,则第二混淆函数C2=F2(K2,Command||ID)。For example, the preset algorithm in the target device is F 2 , the second key is K 2 , the factory reset command in the factory reset request message is Command, and the device identity is ID, then the second obfuscation function C 2 =F 2 (K 2 ,Command||ID).

需要说明的是,目标设备中的第二密钥和预设算法均可以提前存储在目标设备中,并且该第二密钥和预设算法可以是固定参数、不能被改变的。并且,这里所提到的预设算法为加密算法。It should be noted that both the second key and the preset algorithm in the target device may be stored in the target device in advance, and the second key and the preset algorithm may be fixed parameters and cannot be changed. Moreover, the preset algorithm mentioned here is an encryption algorithm.

S202,目标设备确定恢复出厂设置请求消息中的第一混淆值与第二混淆值是否一致。S202, the target device determines whether the first confusion value and the second confusion value in the factory reset request message are consistent.

例如,在第一混淆函数为C1、第二混淆函数为C2的情况下,判断C1与C2的值是否相同。For example, when the first obfuscation function is C 1 and the second obfuscation function is C 2 , it is determined whether the values of C 1 and C 2 are the same.

S203,在第一混淆值与第二混淆值一致的情况下,确定第一混淆值验证通过;在第一混淆值与第二混淆值不一致的情况下,确定第一混淆值验证未通过。S203 , in the case that the first confusion value is consistent with the second confusion value, determine that the first confusion value has passed the verification; and in the case that the first confusion value is inconsistent with the second confusion value, determine that the first confusion value has failed the verification.

上述方案中,目标设备可以根据预设的算法以及第二密钥,对接收到的恢复出厂设置请求消息中的恢复出厂设置指令以及设备身份标识进行加密,得到第二混淆值。也就是说,基于目标设备中的预设算法和第二密钥、控制终端中的预设算法和第一密钥,对恢复出厂设置请求消息进行安全验证,并且,加密后的第一混淆值相较于直接发送第一密钥,可以有效的防止其他恶意用截取到相应的密钥,增强了密钥的安全性。In the above solution, the target device can encrypt the factory reset instruction and the device identity in the received factory reset request message according to the preset algorithm and the second key to obtain the second obfuscated value. That is to say, based on the preset algorithm and the second key in the target device, the preset algorithm and the first key in the control terminal, perform security verification on the factory reset request message, and the encrypted first obfuscation value Compared with sending the first key directly, it can effectively prevent other malicious users from intercepting the corresponding key, thereby enhancing the security of the key.

在本申请的一些实施例中,基于预设规则,对第一混淆值进行验证,还可以按照如图3所示的方法实现:In some embodiments of the present application, based on a preset rule, the first obfuscated value is verified, which can also be implemented according to the method shown in FIG. 3 :

S301,基于预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的第一混淆值进行解密,得到相应的设备身份标识。S301 , based on a preset algorithm and a preset second key, decrypt the first obfuscated value in the factory reset request message to obtain a corresponding device identity.

目标设备在接收到恢复出厂设置请求消息后,调用预先存储的预设算法以及预设的第二密钥。并通过预先存储的预设算法以及预设的第二密钥,对上述第一混淆值进行解密了,从而得到相应的设备身份标识。After receiving the factory reset request message, the target device invokes the pre-stored preset algorithm and the preset second key. The above-mentioned first obfuscated value is decrypted through a pre-stored preset algorithm and a preset second key, thereby obtaining a corresponding device identity.

例如,预设算法为D,第二密钥为K2、第一混淆值为C1,则可以得到:(Command||ID)=D(K2,C1),其中:Command为恢复出厂设置指令,ID为设备身份标识。For example, if the preset algorithm is D, the second key is K 2 , and the first obfuscated value is C 1 , it can be obtained: (Command||ID)=D(K 2 ,C 1 ), where: Command is factory reset Set the instruction, ID is the device identity.

S302,确定解密后得到的设备身份标识,与恢复出厂设置请求消息中的设备身份标识是否一致。S302: Determine whether the device identity obtained after decryption is consistent with the device identity in the factory reset request message.

目标设备确定恢复出厂设置请求消息中的设备身份标识,与解密后得到的设备身份标识进行对比,确定二者是否相同。The target device determines the device identity in the factory reset request message, and compares it with the device identity obtained after decryption to determine whether the two are the same.

S303,在解密后得到的设备身份标识,与恢复出厂设置请求消息中的设备身份标识一致的情况下,确定第一混淆值验证通过;在解密后得到的设备身份标识,与恢复出厂设置请求消息中的设备身份标识一致的情况下,确定第一混淆值验证未通过。S303, if the device identity obtained after decryption is consistent with the device identity in the factory reset request message, determine that the first obfuscated value has passed the verification; the device identity obtained after decryption is the same as the factory reset request message In the case that the device IDs in are consistent, it is determined that the verification of the first obfuscated value fails.

需要说明的是,恢复出厂设置请求消息中的设备身份标识,与解密后得到的设备身份标识一致,可以是指恢复出厂设置请求消息中的设备身份标识,与解密后得到的设备身份标识相同。并且,这里所提到的预设算法为相应的解密算法。It should be noted that the device identity in the factory reset request message is consistent with the device identity obtained after decryption, and may refer to the device identity in the factory reset request message, which is the same as the device identity obtained after decryption. Moreover, the preset algorithm mentioned here is a corresponding decryption algorithm.

上述方案中,目标终端对接收到的第一混淆值进行解密,并将解密后的设备身份标识与恢复出厂设置请求消息中的设备身份标识进行比较,确定二者是否一致,以完成对第一混淆值的验证。In the above scheme, the target terminal decrypts the received first obfuscated value, and compares the decrypted device identity with the device identity in the factory reset request message to determine whether the two are consistent, so as to complete the identification of the first. Validation of obfuscated values.

S104,在第一混淆值验证通过的情况下,执行恢复出厂设置指令。S104, in the case that the verification of the first obfuscated value is passed, execute a factory reset instruction.

需要说明的是,在第一混淆值验证为通过的情况下,可以目标设备可以向控制终端发送提示信息,以提示控制终端对应的用户无权限对目标设备进行恢复出厂设置。目标设备还可以向第三方主体(例如专门的监管部门)发送警报信息,以提示第三方主体目标设备受到恶意的恢复出厂设置指令,可能会对目标设备的安全性造成威胁,第三方主体可以根据该警报信息对目标设备进行跟踪处理,以保证目标设备的安全性。It should be noted that when the first obfuscated value is verified as passed, the target device may send prompt information to the control terminal to prompt the user corresponding to the control terminal to restore the factory settings of the target device without permission. The target device can also send alert information to a third-party subject (such as a special supervision department) to remind the third-party subject that the target device is subject to malicious factory reset instructions, which may threaten the security of the target device. The alarm information tracks the target device to ensure the security of the target device.

为了进一步提高目标设备在恢复出厂设置时的安全性,在本申请的一个实施例中,控制终端生成的恢复出厂设置请求消息中还包括随机数。并且,第一混淆值为控制终端基于预设算法以及预设的第一密钥,对恢复出厂设置指令、设备身份标识、随机数进行加密得出的。In order to further improve the security of the target device when restoring the factory settings, in an embodiment of the present application, the factory setting restore request message generated by the control terminal further includes a random number. In addition, the first obfuscated value is obtained by encrypting the factory reset instruction, the device identification, and the random number by the control terminal based on the preset algorithm and the preset first key.

例如,恢复出厂设置指令为Command、设备身份标识为ID、第一密钥为K1、预设算法为F1、随机数为R,则第一混淆值C1=F1(K1,Command||ID||R)。For example, if the factory reset command is Command, the device identity is ID, the first key is K 1 , the preset algorithm is F 1 , and the random number is R, then the first confusion value C 1 =F 1 (K 1 ,Command ||ID||R).

需要说明的是,这里所提到的随机数可以是数字、也可以是字母,还可以是数字和字母的组合后的字符串,当然还可以是其他形式的字符或者不同形式的字符之间的结合的字符串,在本申请实施例中不加以限定。这里所提到的随机数可以是控制终端随机生成的,也可以控制终端的用户随机设置的,在本申请实施例中不加以限制。It should be noted that the random numbers mentioned here can be numbers, letters, or a combination of numbers and letters. The combined character string is not limited in this embodiment of the present application. The random number mentioned here may be randomly generated by the control terminal, or may be randomly set by the user of the control terminal, which is not limited in this embodiment of the present application.

通过上述方案,控制终端生成的恢复出厂设置请求消息中附加随机数,并且第一混淆值的生成过程中也使用随机数,可以有效的避免在控制终端发送的恢复出厂设置请求消息被第三方截获后,第三方实施重放攻击,以获得电子设备的控制权的问题。With the above solution, a random number is added to the factory reset request message generated by the control terminal, and the random number is also used in the process of generating the first obfuscated value, which can effectively prevent the factory reset request message sent by the control terminal from being intercepted by a third party Afterwards, a third party implements a replay attack to gain control of the electronic device.

在恢复出厂设置请求消息中包括随机数的情况下,目标终端对第一混淆值进行验证的方法如下所示:In the case that a random number is included in the factory reset request message, the method for the target terminal to verify the first obfuscated value is as follows:

基于预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的恢复出厂设置指令、设备身份标识、随机数进行加密,得出第二混淆值;Based on the preset algorithm and the preset second key, encrypting the factory reset instruction, device identification, and random number in the factory reset request message to obtain a second obfuscated value;

确定恢复出厂设置请求消息中的第一混淆值与第二混淆值是否一致;determining whether the first obfuscated value in the factory reset request message is consistent with the second obfuscated value;

在第一混淆值与所述第二混淆值一致的情况下,确定第一混淆值验证通过;In the case that the first confusion value is consistent with the second confusion value, it is determined that the verification of the first confusion value is passed;

在第一混淆值与所述第二混淆值不一致的情况下,确定第一混淆值验证未通过。In the case that the first obfuscated value is inconsistent with the second obfuscated value, it is determined that the verification of the first obfuscated value has failed.

除上述方法以外,本申请实施例中还可以通过如下所示的方法对第一混淆值进行验证:In addition to the above method, in this embodiment of the present application, the first obfuscated value may also be verified by the following method:

基于预设算法以及预设的第二密钥,对恢复出厂设置请求消息中的第一混淆值进行解密,得到相应的设备身份标识、随机数;Decrypt the first obfuscated value in the factory reset request message based on the preset algorithm and the preset second key to obtain the corresponding device identity and random number;

确定解密后得到的设备身份标识,与恢复出厂设置请求消息中的设备身份标识是否一致;以及确定解密后得到的随机数,与恢复出厂设置请求消息中的随机数是否一致;Determine whether the device ID obtained after decryption is consistent with the device ID in the factory reset request message; and determine whether the random number obtained after decryption is consistent with the random number in the factory reset request message;

在二者均一致的情况下,确定第一混淆值验证通过。In the case that the two are consistent, it is determined that the first obfuscated value has passed the verification.

在本申请的一些实施例中,上述随机数可以是控制终端生成恢复出厂设置请求消息的时间戳,也就是说该时间戳用于表示控制终端生成恢复出厂设置请求信息的时间。本申请实施例提供的一种恢复出厂设置方法中,在上述随机数为控制终端生成恢复出厂设置请求消息的时间戳的情况下,在步骤S103之前,该方法还包括:In some embodiments of the present application, the random number may be a time stamp when the control terminal generates the factory reset request message, that is, the time stamp is used to represent the time when the control terminal generates the factory reset request message. In the method for restoring factory settings provided by the embodiment of the present application, in the case where the random number is the timestamp for the control terminal to generate the request message for restoring factory settings, before step S103, the method further includes:

确定该时间戳是否超出预设阈值;determine whether the timestamp exceeds a preset threshold;

在时间戳未超出预设阈值的情况下,确定恢复出厂设置请求消息为有效的恢复出厂设置请求消息。In the case that the time stamp does not exceed the preset threshold, it is determined that the factory reset request message is a valid factory reset request message.

上述方案中,将随机数设置为控制终端生成恢复出厂设置请求消息的时间戳时间戳,并且将该时间戳与预设阈值相比较,从而确定接收到的恢复出厂设置请求消息是否有效,更进一步地避免第三方对恢复出厂设置请求消息截获后,获得电子设备的控制权。In the above solution, the random number is set as the time stamp for the control terminal to generate the factory reset request message, and the timestamp is compared with a preset threshold, so as to determine whether the received factory reset request message is valid, and further. This can prevent a third party from gaining control of the electronic device after intercepting the factory reset request message.

需要说明的是,在本申请实时中提到的预设算法,可以是现有的加密算法,还可以是电子设备的制造商自行设计的具有数据混合功能的一种算法,在本申请实施例中不加以限定。It should be noted that the preset algorithm mentioned in real-time in this application may be an existing encryption algorithm, or an algorithm with a data mixing function designed by the manufacturer of the electronic device. is not limited.

本申请实施例提供的一种恢复出厂设置的方法,控制终端能够在向目标设备发送恢复出厂设置请求消息时,附加一个用于安全验证的第一混淆值,第一混淆值是根据预设的算法、第一密钥,对恢复出厂设置指令和设备身份标识等信息进行加密得出的。目标设备能够在接收到包含有第一混淆值的恢复出厂设置请求消息后,通过预设的规则对第一混淆值进行验证,在验证通过的情况下,可以执行恢复出厂设置指令。通过上述方案,能够有效的解决现有技术中电子设备无需经过拥有者的同意,其他人可以使该电子设备恢复出厂设置,导致该电子设备脱离拥有者的控制,造成拥有者损失的问题。并且,能够有效的增强电子设备的安全性,提高用户的用户体验。In a method for restoring factory settings provided by an embodiment of the present application, the control terminal can add a first confusion value for security verification when sending a request message for restoring factory settings to a target device, and the first confusion value is based on a preset value. The algorithm and the first key are obtained by encrypting the information such as the factory reset instruction and the device identity. After receiving the factory reset request message containing the first obfuscated value, the target device can verify the first obfuscated value through a preset rule, and can execute the factory reset instruction if the verification is passed. The above solution can effectively solve the problem in the prior art that the electronic device does not need the owner's consent, and other people can restore the electronic device to factory settings, causing the electronic device to be out of the owner's control and causing loss to the owner. Moreover, the security of the electronic device can be effectively enhanced, and the user experience of the user can be improved.

基于同样的思路,本申请的一些实施例还提供了上述方法对应的设备。Based on the same idea, some embodiments of the present application also provide a device corresponding to the above method.

图4为本申请实施例提供的一种恢复出厂设置的设备。如图4所示,该设备包括:FIG. 4 is a device for restoring factory settings provided by an embodiment of the present application. As shown in Figure 4, the device includes:

至少一个处理器;以及,at least one processor; and,

与至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

目标设备接收来自控制终端的恢复出厂设置请求消息,恢复出厂设置请求消息包括:恢复出厂设置指令、设备身份标识、第一混淆值;The target device receives a factory reset request message from the control terminal, and the factory reset request message includes: a factory reset instruction, a device identity, and a first confusion value;

其中,第一混淆值为控制终端基于预设算法以及预设的第一密钥,对恢复出厂设置指令、设备身份标识进行加密得出的;Wherein, the first obfuscated value is obtained by the control terminal encrypting the factory reset instruction and the device identity based on a preset algorithm and a preset first key;

基于预设规则,根据恢复出厂请求,对第一混淆值进行验证;Based on the preset rules and according to the factory reset request, verify the first obfuscated value;

在第一混淆值验证通过的情况下,执行恢复出厂设置指令。In the case that the verification of the first obfuscated value is passed, the instruction of restoring the factory settings is executed.

本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this application is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference may be made to the partial descriptions of the method embodiments for related parts.

本申请实施例提供的设备与方法是一一对应的,因此,设备也具有与其对应的方法类似的有益技术效果,由于上面已经对方法的有益技术效果进行了详细说明,因此,这里不再赘述设备的有益技术效果。The devices and methods provided in the embodiments of the present application are in a one-to-one correspondence. Therefore, the devices also have beneficial technical effects similar to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, they will not be repeated here. Beneficial technical effect of equipment.

还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements, but also Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article of manufacture, or device that includes the element.

以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above descriptions are merely examples of the present application, and are not intended to limit the present application. Various modifications and variations of this application are possible for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims (9)

1.一种恢复出厂设置的方法,其特征在于,所述方法包括:1. A method for restoring factory settings, wherein the method comprises: 目标设备接收来自控制终端的恢复出厂设置请求消息,所述恢复出厂设置请求消息包括:恢复出厂设置指令、设备身份标识、第一混淆值;The target device receives a factory reset request message from the control terminal, where the factory reset request message includes: a factory reset instruction, a device identity, and a first confusion value; 其中,所述第一混淆值为所述控制终端基于预设算法以及预设的第一密钥,对所述恢复出厂设置指令、设备身份标识进行加密得出的;Wherein, the first obfuscated value is obtained by the control terminal encrypting the factory reset instruction and the device identity based on a preset algorithm and a preset first key; 基于预设规则,根据所述恢复出厂设置请求消息,对所述第一混淆值进行验证,包括:Based on preset rules and according to the factory reset request message, verifying the first obfuscated value includes: 基于预设算法以及预设的第二密钥,对所述恢复出厂设置请求消息中的恢复出厂设置指令、设备身份标识进行加密,得出第二混淆值;Based on the preset algorithm and the preset second key, encrypting the factory reset instruction and the device identity in the factory reset request message to obtain a second obfuscated value; 确定所述恢复出厂设置请求消息中的第一混淆值与所述第二混淆值是否一致;determining whether the first obfuscated value in the factory reset request message is consistent with the second obfuscated value; 在所述第一混淆值与所述第二混淆值一致的情况下,确定所述第一混淆值验证通过;In the case that the first obfuscation value is consistent with the second obfuscation value, it is determined that the verification of the first obfuscation value is passed; 在所述第一混淆值验证通过的情况下,执行所述恢复出厂设置指令;In the case that the first obfuscated value is verified and passed, execute the restore factory settings instruction; 在所述第一混淆值验证未通过的情况下,所述目标设备向所述控制终端发送提示信息,以提示所述控制终端对应的用户或者第三方主体发送报警信息,以提示所述目标设备接收到了恶意的所述恢复出厂设置指令。In the case that the verification of the first obfuscated value fails, the target device sends prompt information to the control terminal to prompt the user corresponding to the control terminal or a third-party subject to send alarm information to prompt the target device A malicious said factory reset instruction was received. 2.根据权利要求1所述的方法,其特征在于,所述基于预设规则,根据所述恢复出厂设置请求消息,对所述第一混淆值进行验证,具体包括:2. The method according to claim 1, wherein the verification of the first obfuscated value based on a preset rule and the factory reset request message specifically comprises: 基于预设算法以及预设的第二密钥,对所述恢复出厂设置请求消息中的第一混淆值进行解密,得到相应的设备身份标识;Decrypt the first obfuscated value in the factory reset request message based on the preset algorithm and the preset second key to obtain a corresponding device identity; 确定解密后得到的设备身份标识,与所述恢复出厂设置请求消息中的设备身份标识是否一致;Determine whether the device identity obtained after decryption is consistent with the device identity in the factory reset request message; 在解密后得到的设备身份标识,与所述恢复出厂设置请求消息中的设备身份标识一致的情况下,确定所述第一混淆值验证通过。In the case that the device identification obtained after decryption is consistent with the device identification in the factory reset request message, it is determined that the first obfuscated value has passed the verification. 3.根据权利要求1所述的方法,其特征在于,在基于预设规则,根据所述恢复出厂设置请求消息,对所述第一混淆值进行验证之前,所述方法还包括:3. The method according to claim 1, wherein, before verifying the first obfuscated value based on a preset rule and according to the factory reset request message, the method further comprises: 确定所述恢复出厂设置请求消息中的设备身份标识,与所述目标设备的身份标识一致。It is determined that the device identity in the factory reset request message is consistent with the identity of the target device. 4.根据权利要求1所述的方法,其特征在于,所述恢复出厂设置请求消息中还包括:随机数;4. The method according to claim 1, wherein the request message for restoring factory settings further comprises: a random number; 所述第一混淆值为所述控制终端基于预设算法以及预设的第一密钥,对所述恢复出厂设置指令、设备身份标识、随机数进行加密而得出的。The first obfuscation value is obtained by the control terminal encrypting the factory reset instruction, the device ID, and the random number based on a preset algorithm and a preset first key. 5.根据权利要求4所述的方法,其特征在于,基于预设规则,根据所述恢复出厂设置请求消息,对所述第一混淆值进行验证,具体包括:5. The method according to claim 4, wherein, based on a preset rule, according to the factory reset request message, verifying the first obfuscated value, specifically comprising: 基于预设算法以及预设的第二密钥,对所述恢复出厂设置请求消息中的随机数、恢复出厂设置指令以及设备身份标识进行加密,得出第二混淆值;Based on the preset algorithm and the preset second key, encrypt the random number, the factory reset instruction and the device identity in the factory reset request message to obtain a second obfuscated value; 确定所述恢复出厂设置请求消息中的第一混淆值与所述第二混淆值是否一致;determining whether the first obfuscated value in the factory reset request message is consistent with the second obfuscated value; 在所述第一混淆值与所述第二混淆值一致的情况下,确定所述第一混淆值验证通过。In the case that the first obfuscation value is consistent with the second obfuscation value, it is determined that the verification of the first obfuscation value is passed. 6.根据权利要求4所述的方法,其特征在于,所述基于预设规则,根据所述恢复出厂设置请求消息,对所述第一混淆值进行验证,具体包括:6. The method according to claim 4, wherein the verification of the first obfuscated value based on a preset rule and the factory reset request message specifically comprises: 基于预设算法以及预设的第二密钥,对所述恢复出厂设置请求消息中的第一混淆值进行解密,得到相应的设备身份标识、随机数;Decrypt the first obfuscated value in the factory reset request message based on the preset algorithm and the preset second key to obtain the corresponding device identity and random number; 确定解密后得到的设备身份标识,与所述恢复出厂设置请求消息中的设备身份标识是否一致;以及确定解密后得到的随机数,与所述恢复出厂设置请求消息中的随机数是否一致;Determine whether the device ID obtained after decryption is consistent with the device ID in the factory reset request message; and determine whether the random number obtained after decryption is consistent with the random number in the factory reset request message; 在二者均一致的情况下,确定所述第一混淆值验证通过。In the case that the two are consistent, it is determined that the first obfuscated value has passed the verification. 7.根据权利要求4所述的方法,其特征在于,所述随机数为所述控制终端生成所述恢复出厂设置请求消息的时间戳。7 . The method according to claim 4 , wherein the random number is a timestamp when the control terminal generates the factory reset request message. 8 . 8.根据权利要求7所述的方法,其特征在于,在基于预设规则,根据所述恢复出厂设置请求消息,对所述第一混淆值进行验证之前,所述方法还包括:8 . The method according to claim 7 , wherein, before verifying the first obfuscated value according to the factory reset request message based on a preset rule, the method further comprises: 9 . 确定所述时间戳是否超出预设阈值;determining whether the timestamp exceeds a preset threshold; 在所述时间戳未超出预设阈值的情况下,确定所述恢复出厂设置请求消息为有效的恢复出厂设置请求消息。In the case that the time stamp does not exceed a preset threshold, it is determined that the factory reset request message is a valid factory reset request message. 9.一种恢复出厂设置的目标设备,其特征在于,所述目标设备包括:9. A target device for restoring factory settings, wherein the target device comprises: 至少一个处理器;以及,at least one processor; and, 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器在所述目标设备上执行时,实现如下操作:The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that when the at least one processor is executed on the target device, the following operations are implemented: 接收来自控制终端的恢复出厂设置请求消息,所述恢复出厂设置请求消息包括:恢复出厂设置指令、设备身份标识、第一混淆值;Receive a factory reset request message from the control terminal, where the factory reset request message includes: a factory reset instruction, a device identity, and a first confusion value; 其中,所述第一混淆值为所述控制终端基于预设算法以及预设的第一密钥,对所述恢复出厂设置指令、设备身份标识进行加密得出的;Wherein, the first obfuscated value is obtained by the control terminal encrypting the factory reset instruction and the device identity based on a preset algorithm and a preset first key; 基于预设规则,根据所述恢复出厂设置请求消息,对所述第一混淆值进行验证,包括:Based on preset rules and according to the factory reset request message, verifying the first obfuscated value includes: 基于预设算法以及预设的第二密钥,对所述恢复出厂设置请求消息中的恢复出厂设置指令、设备身份标识进行加密,得出第二混淆值;Based on the preset algorithm and the preset second key, encrypting the factory reset instruction and the device identity in the factory reset request message to obtain a second obfuscated value; 确定所述恢复出厂设置请求消息中的第一混淆值与所述第二混淆值是否一致;determining whether the first obfuscated value in the factory reset request message is consistent with the second obfuscated value; 在所述第一混淆值与所述第二混淆值一致的情况下,确定所述第一混淆值验证通过;In the case that the first obfuscation value is consistent with the second obfuscation value, it is determined that the verification of the first obfuscation value is passed; 在所述第一混淆值验证通过的情况下,执行所述恢复出厂设置指令;In the case that the first obfuscated value is verified and passed, execute the restore factory settings instruction; 在所述第一混淆值验证未通过的情况下,向所述控制终端发送提示信息,以提示所述控制终端对应的用户或者第三方主体发送报警信息,以提示所述目标设备接收到了恶意的所述恢复出厂设置指令。If the verification of the first obfuscated value fails, send prompt information to the control terminal to prompt the user corresponding to the control terminal or a third-party subject to send alarm information to prompt the target device to receive malicious The factory reset instruction.
CN202010032607.3A 2020-01-13 2020-01-13 Factory setting restoration method and equipment Active CN111193751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010032607.3A CN111193751B (en) 2020-01-13 2020-01-13 Factory setting restoration method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010032607.3A CN111193751B (en) 2020-01-13 2020-01-13 Factory setting restoration method and equipment

Publications (2)

Publication Number Publication Date
CN111193751A CN111193751A (en) 2020-05-22
CN111193751B true CN111193751B (en) 2022-02-08

Family

ID=70710081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010032607.3A Active CN111193751B (en) 2020-01-13 2020-01-13 Factory setting restoration method and equipment

Country Status (1)

Country Link
CN (1) CN111193751B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480485A (en) * 2016-11-02 2017-12-15 深圳市波普安创技术有限公司 The factory reset system and method for information safety devices
CN108737431A (en) * 2018-05-28 2018-11-02 深圳职业技术学院 Based on graduation distributed authentication method, the apparatus and system obscured under IoT scenes
CN109728914A (en) * 2019-01-23 2019-05-07 北京奇艺世纪科技有限公司 Digital signature authentication method, system, device and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0410180D0 (en) * 2004-05-07 2004-06-09 Hewlett Packard Development Co An adaptive privacy management system for data repositories
WO2007055104A1 (en) * 2005-11-08 2007-05-18 Matsushita Electric Industrial Co., Ltd. Authentication system, signature creating device, and signature verifying device
US9390282B2 (en) * 2014-09-03 2016-07-12 Microsoft Technology Licensing, Llc Outsourcing document-transformation tasks while protecting sensitive information
JP6888673B2 (en) * 2016-10-27 2021-06-16 株式会社デンソー Systems and methods for authenticating and authorizing devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107480485A (en) * 2016-11-02 2017-12-15 深圳市波普安创技术有限公司 The factory reset system and method for information safety devices
CN108737431A (en) * 2018-05-28 2018-11-02 深圳职业技术学院 Based on graduation distributed authentication method, the apparatus and system obscured under IoT scenes
CN109728914A (en) * 2019-01-23 2019-05-07 北京奇艺世纪科技有限公司 Digital signature authentication method, system, device and computer readable storage medium

Also Published As

Publication number Publication date
CN111193751A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
JP3999655B2 (en) Method and apparatus for access control with leveled security
TWI288552B (en) Method for implementing new password and computer readable medium for performing the method
US7571489B2 (en) One time passcode system
US9256750B2 (en) Secure credential unlock using trusted execution environments
WO2018050081A1 (en) Device identity authentication method and apparatus, electric device, and storage medium
WO2020000786A1 (en) Voting method and apparatus, and computer device and computer readable storage medium
US10263782B2 (en) Soft-token authentication system
JP2007511810A (en) Proof of execution using random number functions
CN112565205B (en) Credible authentication and measurement method, server, terminal and readable storage medium
US10812269B2 (en) Advanced crypto token authentication
JP7617047B2 (en) Message transmission system with hardware security module
CN107733636B (en) Authentication method and authentication system
CN107920052B (en) Encryption method and intelligent device
ES2665887T3 (en) Secure data system
CN111401901B (en) Authentication method and device of biological payment device, computer device and storage medium
US9773129B2 (en) Anti-replay protected flash
KR101531662B1 (en) Method and system for mutual authentication between client and server
CN108650261B (en) Mobile terminal system software burning method based on remote encryption interaction
CN106992978B (en) Network security management method and server
KR101996317B1 (en) Block chain based user authentication system using authentication variable and method thereof
JP2021111925A (en) Electronic signature system
CN114239000A (en) Password processing method, device, computer equipment and storage medium
KR102355708B1 (en) Method for processing request based on user authentication using blockchain key and system applying same
CN111193751B (en) Factory setting restoration method and equipment
Nishimura et al. Secure authentication key sharing between personal mobile devices based on owner identity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Fu Deqian

Inventor after: Wu Chuankun

Inventor before: Wu Chuankun

Inventor before: Fu Deqian