Remote control data encryption method, decryption method, remote control and electronic device

By generating random numbers in the battery-less remote control and using encryption methods to generate target ciphertext, the security risk caused by sending data in plain text in the existing technology is solved, the encryption of wireless data is realized, and the security of electronic devices is ensured.

CN114531291BActive Publication Date: 2024-10-15SHENZHEN CHENGYUE HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210158533.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2024-10-15
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

The data transmitted by existing battery-less remote controls cannot be encrypted, causing the data to be sent in plain text in the air and easily cracked, causing immeasurable security risks.

Method used

By generating random numbers, obtaining the identity and key control information of the remote control, using encryption methods to generate target ciphertext, and sending it to the electronic device, ensuring data encryption and preventing cracking and copying.

Benefits of technology

It realizes encryption of wireless data transmitted by battery-less remote controls, ensuring the security of controlled electronic devices and preventing data from being cracked and copied.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114531291B_ABST
    Figure CN114531291B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a remote control data encryption method, a decryption method, a remote control and an electronic device, which generate random numbers; obtain the identity identification and key control information of the remote control; encrypt according to the random numbers, the identity identification and the key control information to generate a target ciphertext; and send the target ciphertext to the electronic device. In this way, the wireless data transmitted by the battery-free remote control can be encrypted to achieve the purpose of making the data impossible to crack and copy, thereby ensuring the safety of the controlled electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless remote control, and in particular to a remote control data encryption method, a decryption method, a remote control and an electronic device. Background Art

[0002] The data transmitted by existing battery-free remote controls still have many shortcomings. For example, the data cannot be encrypted. After the data is familiar with its encoding rules, the air data is almost sent in plain text. Once the data is captured, the content of the data can be easily separated, and then the device can be controlled, causing immeasurable damage. Summary of the invention

[0003] The embodiments of the present invention provide a remote control data encryption method, a decryption method, a remote control and an electronic device, which can encrypt the wireless data transmitted by a battery-free remote control, achieve the purpose of making the data unbreakable and uncopyable, and ensure the security of the controlled electronic device.

[0004] A first aspect of an embodiment of the present invention provides a remote control data encryption method, which is applied to a remote control. The method includes:

[0005] Generate random numbers;

[0006] Obtaining the identity and key control information of the remote controller;

[0007] Encrypting according to the random number, the identity identifier and the key control information to generate a target ciphertext;

[0008] The target ciphertext is transmitted to an electronic device.

[0009] A second aspect of an embodiment of the present invention provides a remote control data decryption method, which is applied to an electronic device, and the method includes:

[0010] Receive the target ciphertext sent by the remote control;

[0011] Decrypting the target ciphertext to obtain a random number and a decrypted text;

[0012] The random number is compared with random numbers obtained by previous decryption multiple times, and after it is determined that all random numbers meet the first preset condition, the decrypted text is output.

[0013] A third aspect of an embodiment of the present invention provides a remote control data encryption device, the device comprising:

[0014] A processing unit, for generating a random number;

[0015] An acquisition unit, used to acquire the identity identification and key control information of the remote controller;

[0016] An encryption unit, used to encrypt according to the random number, the identity identifier and the key control information to generate a target ciphertext;

[0017] The sending unit is used to send the target ciphertext to an electronic device.

[0018] A fourth aspect of an embodiment of the present invention provides a remote control data decryption device, the device comprising:

[0019] A receiving unit, used for receiving a target ciphertext sent by a remote controller;

[0020] A decryption unit, used to decrypt the target ciphertext to obtain a random number and a decrypted text;

[0021] The output unit is used to compare the random number with the random numbers obtained by previous decryption, and after determining that all random numbers meet the first preset condition, output the decrypted text.

[0022] The fifth aspect of the present invention provides a remote control comprising: a processor and a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor, and the programs include instructions for some or all of the steps described in the first aspect.

[0023] The sixth aspect of the present invention provides an electronic device, comprising: a processor and a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor, and the programs include instructions for some or all of the steps described in the second aspect.

[0024] In the seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program enables a computer to execute instructions of part or all of the steps described in the first aspect or the second aspect of the embodiment of the present invention.

[0025] In an eighth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect or the second aspect of the embodiment of the present invention. The computer program product may be a software installation package.

[0026] Implementing the embodiments of the present invention has the following beneficial effects:

[0027] It can be seen that the remote control data encryption method, decryption method, remote control and electronic device described in the embodiments of the present invention generate a random number; obtain the identity identification and key control information of the remote control; encrypt according to the random number, identity identification and key control information to generate a target ciphertext; send the target ciphertext to the electronic device, so that the wireless data transmitted by the battery-free remote control is encrypted, so that the data cannot be cracked or copied, thereby ensuring the safety of the controlled electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0029] Figure 1 It is a schematic diagram of an embodiment flow of a remote control data encryption method provided by an embodiment of the present invention;

[0030] Figure 2 It is a schematic diagram of an embodiment flow of a remote control data encryption method provided by an embodiment of the present invention;

[0031] Figure 3 It is a schematic diagram of an embodiment flow of a remote control data decryption method provided by an embodiment of the present invention;

[0032] Figure 4 It is a schematic diagram of an embodiment of a remote control data encryption and decryption method provided by an embodiment of the present invention;

[0033] Figure 5 1 is a flow chart of another remote control data encryption and decryption method provided by an embodiment of the present invention;

[0034] Figure 6 is a schematic diagram of the structure of a remote controller provided by an embodiment of the present invention;

[0035] Figure 7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;

[0036] Figure 8 It is a schematic diagram of the structure of an embodiment of a remote control data encryption device provided by an embodiment of the present invention;

[0037] Fig. 9 The figure is a schematic diagram of the structure of a remote control data decryption device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0040] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0041] The remote control data encryption method and the remote control data decryption method in the embodiments of the present invention are respectively applied to the remote control and the electronic device, wherein the remote control is the sending end of the target ciphertext, and the electronic device is the receiving end of the target ciphertext. The electronic device can be a device controlled by the remote control. In the smart home scenario, it can be various smart home devices that can be controlled by the remote control, such as televisions, air conditioners, etc. In other application scenarios, the electronic device can also be other types of devices, which is not limited by the present invention.

[0042] See also Figure 1 , is a flow chart of an embodiment of a remote control data encryption method provided by an embodiment of the present invention. The remote control data encryption method described in this embodiment includes the following steps:

[0043] 101. Generate random numbers.

[0044] In the embodiment of the present invention, the remote controller can generate random numbers according to a preset random number generation rule. Specifically, the random number generation rule can be pre-set, and then the random number can be generated according to the random number generation rule.

[0045] Optionally, in the above step 101, generating a random number includes:

[0046] Acquire the pressure value of a button of the remote controller being pressed and / or the electric energy in the remote controller;

[0047] Generate the random number according to the pressure value and / or the electric energy; or,

[0048] Obtaining the time it takes for the power to reach a preset power when a button of the remote control is pressed;

[0049] The random number is generated according to the time.

[0050] When a user uses a remote control, the force with which a button is pressed each time is unpredictable, and the electrical energy stored in the remote control is also unpredictable. In a specific implementation, a random number can be generated based on at least one of the pressure value of the button being pressed and the electrical energy in the remote control. Optionally, the pressure value can be used as a random number, or the amount of charge stored in the remote control can be used as a random number, or the sum of the pressure value and the charge can be used as a random number or a seed of a random number.

[0051] Optionally, the remote controller may also record the time when the power reaches a preset power when a button of the remote controller is pressed, and use the time as a random number or a seed of a random number.

[0052] 102. Obtain the identity identification and key control information of the remote controller.

[0053] The identity identifier of the remote control may be an identity code or other types of identity identifiers, and the key control information is key control information generated by a user pressing a key. The user may generate different key control information by pressing different keys.

[0054] In a specific implementation, the identity of the remote controller may be pre-stored in a memory of the remote controller, and when encryption is performed, the identity may be retrieved from the memory. The key control information may be obtained by detecting the pressing information of the key pressed by the user.

[0055] The execution time between step 101 and step 102 does not limit the order.

[0056] 103. Encrypt according to the random number, the identity identifier and the key control information to generate a target ciphertext.

[0057] Optionally, the random number, the identity identifier and the key control information can be directly encrypted to generate the target ciphertext. The encryption method can be customized, such as polynomial XOR operation, interpolation encryption, etc., or it can be an encryption method that meets the requirements such as AES / 3DS, and the present invention does not limit it.

[0058] 104. Send the target ciphertext to an electronic device.

[0059] The target ciphertext may be sent as a byte BYTE, and the length of the target ciphertext may be 5-10 bytes. Since a battery-free remote control usually has low power consumption, the target ciphertext is relatively small.

[0060] In a possible embodiment, the difficulty of cracking can be increased by appropriately increasing the depth of received data at the target ciphertext receiving end, thereby making the encrypted target ciphertext more secure and reliable.

[0061] Optionally, the method further comprises:

[0062] Obtaining a rolling code value; determining a private key in a preset code book according to the rolling code value;

[0063] The step of encrypting according to the random number, the identity identifier and the key control information to generate a target ciphertext includes:

[0064] Encrypt data according to the random number, the identity identifier, the key control information and the private key to generate a first ciphertext;

[0065] The rolling code value and the first ciphertext are encrypted to obtain a target ciphertext.

[0066] The method of obtaining the rolling code value may optionally adopt a method of setting an initial value and continuously updating it, for example, each time the remote controller sends the target ciphertext, a value is added to the current rolling code value to update the rolling code value. Alternatively, the remote controller may also generate the rolling code value according to a specified algorithm.

[0067] In a specific implementation, the private key in the code book can be taken out according to the rolling code value, and data encryption can be performed according to the random number, identity identification, key control information and the private key to generate a first ciphertext; then, the first ciphertext is encrypted with the rolling code value to obtain the target ciphertext.

[0068] Optionally, the method further comprises:

[0069] Each time a button of the remote controller is pressed, the rolling code is updated to obtain a new rolling code value.

[0070] In the specific implementation, the rolling code value will be encrypted into the target ciphertext and received by the receiving end, that is, the electronic device. In actual applications, there may be a situation where the rolling codes of the remote control (sending end) and the electronic device (receiving end) do not necessarily change synchronously. For example, when the electronic device cannot receive it, the remote control sends it several times. At this time, it is necessary to synchronize the rolling code value of the remote control and the rolling code value of the electronic device.

[0071] Each time a button of the remote control is pressed, the rolling code is updated to obtain a new rolling code value. After the remote control sends the target ciphertext to the electronic device, the electronic device synchronizes the rolling code value to ensure that the rolling code values ​​of the electronic device and the remote control are consistent, so that the electronic device can correctly decrypt according to the target ciphertext.

[0072] It can be seen that the remote control data encryption method described in the embodiment of the present invention generates a random number; obtains the identity identification and key control information of the remote control; encrypts according to the random number, the identity identification and the key control information to generate a target ciphertext; and sends the target ciphertext to the electronic device. In this way, the wireless data transmitted by the battery-free remote control can be encrypted to achieve the purpose of making the data unbreakable and uncopyable, thereby ensuring the safety of the controlled electronic device.

[0073] Consistent with the above, see Figure 2 , is a flow chart of an embodiment of a remote control data encryption method provided by an embodiment of the present invention. The remote control data encryption method described in this embodiment includes the following steps:

[0074] 201. Obtain the identity and key control information of the remote controller.

[0075] 202. Generate a random number.

[0076] 203. Obtain a rolling code value; and determine a private key in a preset code book according to the rolling code value.

[0077] 204. Encrypt data according to the random number, the identity identifier, the key control information and the private key to generate a first ciphertext.

[0078] 205. Encrypt the first ciphertext according to the rolling code value to obtain a target ciphertext.

[0079] 206. Send the target ciphertext to an electronic device.

[0080] The detailed description of the above steps 201 to 206 can be found in Figure 1 The corresponding steps of step 101 to step 104 of the described remote control data encryption method are not repeated here.

[0081] It can be seen that by obtaining the identity identification and key control information of the remote control, a random number is generated and a rolling code value is obtained; the private key in the preset code book is determined according to the rolling code value, data is encrypted according to the random number, the identity identification, the key control information and the private key, and a first ciphertext is generated; the first ciphertext is encrypted according to the rolling code value to obtain the target ciphertext. In this way, the wireless data transmitted by the battery-free remote control can be encrypted, so that the data cannot be cracked or copied, thereby ensuring the safety of the controlled electronic equipment.

[0082] Consistent with the above, see Figure 3 , is a flow chart of an embodiment of a remote control data decryption method provided by an embodiment of the present invention. The remote control data decryption method described in this embodiment includes the following steps:

[0083] 301. Receive the target ciphertext sent by the remote control.

[0084] 302. Decrypt the target ciphertext to obtain a random number and a decrypted text.

[0085] 303. Compare the random number with random numbers obtained from previous decryptions, and after determining that all random numbers satisfy a first preset condition, output the decrypted text.

[0086] Among them, satisfying the first preset condition includes: the random number is irregular with the random numbers obtained by previous multiple decryptions, and / or the random number does not overlap with the random numbers obtained by previous multiple decryptions.

[0087] The random number has no regularity with the random numbers obtained by previous decryptions. It may be that the random number has no regularity such as an arithmetic progression or a geometric progression with the random numbers obtained by previous decryptions.

[0088] In the specific implementation, after receiving the target ciphertext, the electronic device decrypts the random number and the decrypted text according to the decryption formula. The random number is compared with the random numbers received before, and the original text is output after confirming that the random number is irregular and has no overlap.

[0089] In a possible embodiment, decrypting the target ciphertext to obtain a random number and a decrypted text includes:

[0090] Decrypting the target ciphertext to obtain a rolling code value and a second ciphertext containing a random number;

[0091] Determine whether the rolling code value obtained by decryption is correct;

[0092] If yes, determine the private key according to the rolling code value obtained by the decryption; decrypt the second ciphertext according to the private key to obtain a random number and a decrypted text.

[0093] In a specific implementation, after receiving the target ciphertext, the electronic device can first decrypt the target ciphertext to obtain a rolling code value and a second ciphertext containing a random number; then, confirm whether the decrypted rolling code value is correct. Specifically, the decrypted rolling code value can be compared with the latest local rolling code value. If they are consistent, it indicates that the decrypted rolling code value is correct; then, the private key in the code book can be taken out according to the decrypted rolling code value, and the second ciphertext can be decrypted according to the private key to obtain a random number and a decrypted text. Finally, the random number is compared with the random numbers obtained by multiple decryptions before, and after determining that all random numbers meet the first preset condition, the decrypted text is output.

[0094] Optionally, the method further comprises:

[0095] Each time the target ciphertext sent by the remote controller is received, the local rolling code value is updated once to obtain a new local rolling code value.

[0096] In order to ensure the synchronization of the rolling code values ​​between the electronic device and the remote control, so as to ensure that the target ciphertext can be successfully decrypted, the local rolling code value can be updated once each time the electronic device receives the target ciphertext sent by the remote control to obtain a new local rolling code value. Similarly, on the remote control end, the rolling code is updated once each time a button of the remote control is pressed to obtain a new rolling code value. After the remote control sends the target ciphertext to the electronic device, the electronic device synchronizes the rolling code value again to ensure that the rolling code values ​​of the electronic device and the remote control are consistent, so that the electronic device can correctly decrypt according to the target ciphertext.

[0097] Optionally, the method further comprises:

[0098] If the difference between the decrypted rolling code value and the local rolling code value meets the second preset condition, the operation of determining the private key according to the decrypted rolling code value and decrypting the second ciphertext according to the private key to obtain a random number and a decrypted text is performed;

[0099] If the difference between the decrypted rolling code value and the local rolling code value does not meet the second preset condition, then obtain the local rolling code value updated after the remote control button is pressed N times in a row to send the target ciphertext and the rolling code value obtained by decryption, where N is a positive integer; decryption is performed based on the local rolling code value updated N times in a row and the rolling code value obtained by decryption; wherein, the remote control button is pressed continuously means that the time interval between two adjacent button presses is within a preset value range.

[0100] The second preset condition may include: the difference between the decrypted rolling code value and the local rolling code value is less than the first value, or the difference between the decrypted rolling code value and the local rolling code value is a second value, the first value may be, for example, 16, and the second value may be, for example, 255. If the difference between the decrypted rolling code value and the local rolling code value satisfies the second preset condition, the rolling code value deviation between the decrypted rolling code value and the local rolling code value may be ignored, and the second ciphertext may be directly decrypted to obtain the decrypted text.

[0101] If the difference between the decrypted rolling code value and the local rolling code value does not meet the second preset condition, then the local rolling code value updated after the remote control button is pressed N times in a row to send the target ciphertext and the rolling code value obtained by decryption are obtained, and the rolling code value needs to be synchronized based on the N consecutive rolling code values ​​and random numbers; decryption is performed based on the local rolling code value updated N times in a row and the rolling code value obtained by decryption.

[0102] Optionally, N is greater than or equal to 3, and obtaining the local rolling code value updated after the remote control button is pressed N times in succession to send the target ciphertext and the rolling code value obtained by decryption, where N is a positive integer; and performing decryption according to the local rolling code value updated N times in succession and the rolling code value obtained by decryption, includes:

[0103] If the local rolling code value updated after the remote control button is pressed for the first time to send the target ciphertext is not synchronized with the rolling code value obtained by decryption, the random number and rolling code value obtained by decryption are recorded;

[0104] The remote control button is pressed N times in succession, and the random number and rolling code value obtained by each decryption are recorded;

[0105] Compare the random numbers and rolling code value sequences recorded N times. If the random numbers satisfy the preset time sequence and the rolling code values ​​satisfy the preset rolling code sequence, compare the local rolling code value updated N times with the rolling code value recorded N times. If they are consistent, output the decrypted text obtained by decrypting the target ciphertext for the Nth time.

[0106] In a specific implementation, each time a button on the remote control is pressed, the rolling code is updated once to obtain a new rolling code value. The rolling code values ​​of the remote control and the electronic device will be updated each time a button on the remote control is pressed. Then, the rolling code value synchronization can be achieved based on the multiple updated local rolling code values ​​and the decrypted rolling code values, so that the electronic device can correctly decrypt according to the target ciphertext.

[0107] For example, when N is 3, if the local rolling code value updated after the remote control button is pressed for the first time to send the target ciphertext is not synchronized with the rolling code value obtained by decryption, that is, the updated local rolling code value is inconsistent with the rolling code value obtained by decryption, then the electronic device can record the random number and rolling code value obtained by decryption; the remote control button is pressed for the second time, and the time difference between the first and second button pressings by the user is consistent with normal human use, for example, 0.3s to 2s, indicating that the button is pressed continuously, and the random number and rolling code value obtained by decryption are recorded; the button is pressed continuously for the third time, and the random number and rolling code value obtained by decryption are recorded; in this way, the random number and rolling code value obtained by decryption three times can be obtained, as well as the random number for each time and the local rolling code value updated each time. Compare the order of the random number and rolling code value recorded three times, if the random number meets the preset time order and the rolling code value meets the preset rolling code order, then compare the local rolling code value updated three times with the rolling code value recorded for the third time, if they are consistent, then output the decrypted text obtained by decrypting the target ciphertext for the third time.

[0108] It can be seen that the target ciphertext sent by the remote control is received by the electronic device; the target ciphertext is decrypted to obtain a random number and a decrypted text; the random number is compared with the random numbers obtained by the previous multiple decryptions, and after it is determined that all random numbers meet the first preset condition, the decrypted text is output. In this way, the wireless data transmitted by the battery-free remote control can be decrypted to ensure the safety of the controlled electronic device.

[0109] Consistent with the above, see Figure 4 , is a flow chart of an embodiment of a remote control data encryption and decryption method provided by an embodiment of the present invention. A remote control data encryption and decryption method provided by an embodiment of the present invention is applied to a remote control and an electronic device. The remote control data encryption and decryption method includes:

[0110] 401. The remote control generates a random number;

[0111] 402. The remote controller obtains the identity identifier and key control information of the remote controller;

[0112] 403. The remote controller encrypts according to the random number, the identity identifier and the key control information to generate a target ciphertext;

[0113] 404. The remote controller sends the target ciphertext to the electronic device; the electronic device receives the target ciphertext sent by the remote controller;

[0114] 405. The electronic device decrypts the target ciphertext to obtain a random number and a decrypted text;

[0115] 406. The electronic device compares the random number with random numbers obtained from multiple previous decryptions, and after determining that all random numbers satisfy a first preset condition, outputs the decrypted text.

[0116] The detailed description of the above steps 401 to 406 can be found in Figure 1-Figure 3 The corresponding steps of the remote control data encryption method and the remote control data decryption method are not repeated here.

[0117] It can be seen that the remote control data encryption method described in the embodiment of the present invention generates a random number; obtains the identity identification and key control information of the remote control; encrypts according to the random number, identity identification and key control information to generate a target ciphertext; sends the target ciphertext to the electronic device, so that the wireless data transmitted by the battery-free remote control can be encrypted to achieve the purpose that the data cannot be cracked or copied, thereby ensuring the safety of the controlled electronic device. The target ciphertext sent by the remote control is received by the electronic device; the target ciphertext is decrypted to obtain a random number and a decrypted text; the random number is compared with the random numbers obtained by multiple decryptions before, and after determining that all random numbers meet the first preset condition, the decrypted text is output, so that the wireless data transmitted by the battery-free remote control can be decrypted to ensure the safety of the controlled electronic device.

[0118] Consistent with the above, see Figure 5 , is a flow chart of another embodiment of a remote control data encryption and decryption method provided by an embodiment of the present invention. A remote control data encryption and decryption method provided by an embodiment of the present invention is applied to a remote control and an electronic device. The remote control data encryption and decryption method includes:

[0119] 501. The remote controller obtains the identity identifier and key control information of the remote controller;

[0120] 502. The remote controller generates a random number;

[0121] 503. The remote controller obtains a rolling code value; and determines a private key in a preset code book according to the rolling code value;

[0122] 504. The remote controller encrypts data according to the random number, the identity identifier, the key control information and the private key to generate a first ciphertext;

[0123] 505. The remote controller encrypts the first ciphertext according to the rolling code value to obtain a target ciphertext.

[0124] 506. The remote controller sends the target ciphertext to the electronic device; the electronic device receives the target ciphertext sent by the remote controller.

[0125] 507. The electronic device decrypts the target ciphertext to obtain a rolling code value and a second ciphertext including a random number;

[0126] 508. The electronic device determines whether the rolling code value obtained by decryption is correct; if so, determines a private key according to the rolling code value obtained by decryption; and decrypts the second ciphertext according to the private key to obtain a random number and a decrypted text.

[0127] 509. The electronic device compares the random number with random numbers obtained from multiple previous decryptions, and after determining that all random numbers satisfy a first preset condition, outputs the decrypted text.

[0128] The detailed description of the above steps 501 to 509 can be found in Figure 1-Figure 3 The corresponding steps of the remote control data encryption method and the remote control data decryption method are not repeated here.

[0129] It can be seen that the remote control data encryption and decryption method described in the embodiment of the present invention generates a random number; obtains the identity identification and key control information of the remote control; encrypts according to the random number, identity identification and key control information to generate a target ciphertext; sends the target ciphertext to the electronic device, so that the wireless data transmitted by the battery-free remote control can be encrypted to achieve the purpose that the data cannot be cracked or copied, thereby ensuring the safety of the controlled electronic device. The target ciphertext sent by the remote control is received by the electronic device; the target ciphertext is decrypted to obtain a random number and a decrypted text; the random number is compared with the random numbers obtained by multiple decryptions before, and after determining that all random numbers meet the first preset condition, the decrypted text is output, so that the wireless data transmitted by the battery-free remote control can be decrypted to ensure the safety of the controlled electronic device.

[0130] Consistent with the above, the following is a device for implementing the above remote control data encryption method, specifically as follows:

[0131] See also Figure 6 , is a schematic diagram of the structure of a remote controller according to an embodiment of the present invention. The remote controller 600 described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, such as a CPU; and a memory 4000. The input device 1000, the output device 2000, the processor 3000, and the memory 4000 are connected via a bus 5000.

[0132] The input device 1000 may specifically be a touch panel, a physical button or a mouse.

[0133] The output device 2000 may specifically be a display screen.

[0134] The memory 4000 may be a high-speed RAM memory or a non-volatile memory, such as a disk memory. The memory 4000 is used to store a set of program codes, and the input device 1000, the output device 2000 and the processor 3000 are used to call the program codes stored in the memory 4000 and perform the following operations:

[0135] The processor 3000 is used for:

[0136] Generate random numbers;

[0137] Obtaining the identity and key control information of the remote controller;

[0138] Encrypting according to the random number, the identity identifier and the key control information to generate a target ciphertext;

[0139] The target ciphertext is sent to an electronic device.

[0140] In a possible example, in terms of generating a random number, the processor 3000 is specifically configured to:

[0141] Acquire the pressure value of a button of the remote controller being pressed and / or the electric energy in the remote controller;

[0142] Generate the random number according to the pressure value and / or the electric energy; or,

[0143] Obtaining the time it takes for the power to reach a preset power when a button of the remote control is pressed;

[0144] The random number is generated according to the time.

[0145] In a possible example, the processor 3000 is further specifically configured to:

[0146] Obtaining a rolling code value; determining a private key in a preset code book according to the rolling code value;

[0147] The step of encrypting according to the random number, the identity identifier and the key control information to generate a target ciphertext includes:

[0148] Encrypt data according to the random number, the identity identifier, the key control information and the private key to generate a first ciphertext;

[0149] The rolling code value and the first ciphertext are encrypted to obtain a target ciphertext.

[0150] In a possible example, the processor 3000 is further specifically configured to:

[0151] Each time a button of the remote controller is pressed, the rolling code is updated to obtain a new rolling code value.

[0152] The specific description of the above remote control execution steps can be found in Figure 1-Figure 3 The corresponding steps of the remote control data encryption method and the remote control data decryption method are not repeated here.

[0153] It can be seen that by generating a random number; obtaining the identity identification and key control information of the remote control; encrypting according to the random number, identity identification and key control information to generate the target ciphertext; sending the target ciphertext to the electronic device, the wireless data transmitted by the battery-free remote control can be encrypted to achieve the purpose of making the data unbreakable and uncopyable, thereby ensuring the safety of the controlled electronic device.

[0154] See also Figure 7 , is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. The electronic device 700 described in this embodiment includes: at least one input device 1100; at least one output device 2100; at least one processor 3100, such as a CPU; and a memory 4100. The input device 1100, the output device 2100, the processor 3100 and the memory 4100 are connected via a bus 5100.

[0155] The input device 1100 may specifically be a touch panel, a physical button or a mouse.

[0156] The output device 2100 may specifically be a display screen.

[0157] The memory 4100 may be a high-speed RAM memory or a non-volatile memory, such as a disk memory. The memory 4100 is used to store a set of program codes, and the input device 1100, the output device 2100 and the processor 3100 are used to call the program codes stored in the memory 4100 and perform the following operations:

[0158] The processor 3100 is configured to:

[0159] Receive the target ciphertext sent by the remote control;

[0160] Decrypting the target ciphertext to obtain a random number and a decrypted text;

[0161] The random number is compared with random numbers obtained by previous decryption multiple times, and after it is determined that all random numbers meet the first preset condition, the decrypted text is output.

[0162] In a possible example, in the aspect of decrypting the target ciphertext to obtain a random number and a decrypted text, the processor 3100 is specifically configured to:

[0163] Decrypting the target ciphertext to obtain a rolling code value and a second ciphertext containing a random number;

[0164] Determine whether the rolling code value obtained by decryption is correct;

[0165] If yes, determine the private key according to the rolling code value obtained by the decryption; decrypt the second ciphertext according to the private key to obtain a random number and a decrypted text.

[0166] In a possible example, the processor 3100 is further specifically configured to:

[0167] Each time the target ciphertext sent by the remote controller is received, the local rolling code value is updated once to obtain a new local rolling code value.

[0168] In a possible example, the processor 3100 is further specifically configured to:

[0169] If the difference between the decrypted rolling code value and the local rolling code value meets the second preset condition, the operation of determining the private key according to the decrypted rolling code value and decrypting the second ciphertext according to the private key to obtain a random number and a decrypted text is performed;

[0170] If the difference between the decrypted rolling code value and the local rolling code value does not meet the second preset condition, then obtain the local rolling code value updated after the remote control button is pressed N times in a row to send the target ciphertext and the rolling code value obtained by decryption, where N is a positive integer; decryption is performed based on the local rolling code value updated N times in a row and the rolling code value obtained by decryption; wherein, the remote control button is pressed continuously means that the time interval between two adjacent button presses is within a preset value range.

[0171] The specific description of the steps executed by the electronic device can be found in Figure 1-Figure 3 The corresponding steps of the remote control data encryption method and the remote control data decryption method are not repeated here.

[0172] It can be seen that the target ciphertext sent by the remote control is received by the electronic device; the target ciphertext is decrypted to obtain a random number and a decrypted text; the random number is compared with the random numbers obtained by the previous multiple decryptions, and after it is determined that all random numbers meet the first preset condition, the decrypted text is output. In this way, the wireless data transmitted by the battery-free remote control can be decrypted to ensure the safety of the controlled electronic device.

[0173] See also Figure 8, is a schematic diagram of the structure of an embodiment of a remote control data encryption device provided by an embodiment of the present invention. The remote control data encryption device 800 described in this embodiment includes:

[0174] The processing unit 801 is used to generate a random number;

[0175] An acquisition unit 802 is used to acquire the identity identification and key control information of the remote controller;

[0176] The encryption unit 803 is used to encrypt according to the random number, the identity identifier and the key control information to generate a target ciphertext;

[0177] The sending unit 804 is used to send the target ciphertext to an electronic device.

[0178] It can be understood that the functions of each program module of the remote control data encryption device of this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.

[0179] See also Fig. 9 , is a schematic diagram of the structure of an embodiment of a remote control data decryption device provided by an embodiment of the present invention. The remote control data decryption device 900 described in this embodiment includes:

[0180] A receiving unit 901 is used to receive a target ciphertext sent by a remote controller;

[0181] A decryption unit 902 is used to decrypt the target ciphertext to obtain a random number and a decrypted text;

[0182] The output unit 903 is used to compare the random number with the random numbers obtained by previous decryptions, and after determining that all random numbers meet the first preset condition, output the decrypted text.

[0183] It can be understood that the functions of each program module of the remote control data decryption device of this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.

[0184] An embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program includes part or all of the steps of any remote control data encryption method recorded in the above method embodiments.

[0185] An embodiment of the present invention provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any remote control data encryption method recorded in the embodiments of the present invention. The computer program product may be a software installation package.

[0186] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0187] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices (equipment), or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The computer program is stored / distributed in a suitable medium, provided together with other hardware or as a part of the hardware, or may take other distribution forms, such as through the Internet or other wired or wireless telecommunication systems.

[0188] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (devices) and computer program products of the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable human-vehicle trajectory analysis device to produce a machine, so that the instructions executed by the processor of the computer or other programmable device for counting the number of people entering and leaving the vehicle generate instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0189] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable human-vehicle trajectory analysis device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0190] These computer program instructions can also be loaded onto a computer or other programmable vehicle trajectory analysis device, so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0191] Although the present invention has been described in conjunction with specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present invention. Accordingly, this specification and the accompanying drawings are merely exemplary illustrations of the present invention as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present invention. Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, the present invention is intended to include such modifications and variations if they fall within the scope of the claims of the present invention and their equivalents.

Claims

1. A remote control data encryption method, characterized in that: The method comprises: Generate a random number; the generating of the random number includes: obtaining the electric energy in the remote controller; generating the random number according to the electric energy; or obtaining the time when the electric energy reaches a preset electric energy when a button of the remote controller is pressed; generating the random number according to the time; Obtaining the identity and key control information of the remote controller; Encrypting according to the random number, the identity identifier and the key control information to generate a target ciphertext; The target ciphertext is sent to an electronic device so that the electronic device decrypts the target ciphertext to obtain a random number and a decrypted text; the random number is compared with the random numbers obtained by multiple previous decryptions, and after determining that all random numbers meet a first preset condition, the decrypted text is output; wherein, meeting the first preset condition includes: the random number is irregular with the random numbers obtained by multiple previous decryptions, and / or the random number does not overlap with the random numbers obtained by multiple previous decryptions.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining a rolling code value; determining a private key in a preset code book according to the rolling code value; The step of encrypting according to the random number, the identity identifier and the key control information to generate a target ciphertext includes: Encrypt data according to the random number, the identity identifier, the key control information and the private key to generate a first ciphertext; The rolling code value and the first ciphertext are encrypted to obtain a target ciphertext.

3. The method according to claim 2, characterized in that The method further comprises: Each time a button of the remote controller is pressed, the rolling code is updated to obtain a new rolling code value.

4. A remote control data decryption method, characterized in that: The method comprises: Receive the target ciphertext sent by the remote control; The target ciphertext is decrypted to obtain a random number and a decrypted text; the random number is generated by the remote controller by obtaining the electric energy in the remote controller; or the random number is generated by the remote controller by obtaining the time when the electric energy reaches a preset electric energy when a button of the remote controller is pressed; The random number is compared with the random numbers obtained by previous decryptions, and after determining that all random numbers satisfy a first preset condition, the decrypted text is output; wherein satisfying the first preset condition includes: the random number is irregular with the random numbers obtained by previous decryptions, and / or the random number does not overlap with the random numbers obtained by previous decryptions.

5. The method according to claim 4, characterized in that The step of decrypting the target ciphertext to obtain a random number and a decrypted text includes: Decrypting the target ciphertext to obtain a rolling code value and a second ciphertext containing a random number; Determine whether the rolling code value obtained by decryption is correct; If yes, determine the private key according to the rolling code value obtained by the decryption; decrypt the second ciphertext according to the private key to obtain a random number and a decrypted text.

6. The method according to claim 5, characterized in that The method further comprises: Each time the target ciphertext sent by the remote controller is received, the local rolling code value is updated once to obtain a new local rolling code value.

7. The method according to claim 6, characterized in that The method further comprises: If the difference between the decrypted rolling code value and the local rolling code value meets the second preset condition, the operation of determining the private key according to the decrypted rolling code value and decrypting the second ciphertext according to the private key to obtain a random number and a decrypted text is performed; If the difference between the decrypted rolling code value and the local rolling code value does not meet the second preset condition, then obtain the local rolling code value updated after the remote control button is pressed N times in a row to send the target ciphertext and the rolling code value obtained by decryption, where N is a positive integer; decryption is performed based on the local rolling code value updated N times in a row and the rolling code value obtained by decryption; wherein, the remote control button is pressed continuously means that the time interval between two adjacent button presses is within a preset value range.

8. A remote controller, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the program comprises instructions for executing the steps in the method according to any one of claims 1 to 3.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the program comprises instructions for executing the steps in the method according to any one of claims 4 to 7.