CN108595973B - Instruction determination method, equipment control method, device and system - Google Patents

Instruction determination method, equipment control method, device and system Download PDF

Info

Publication number
CN108595973B
CN108595973B CN201810392495.5A CN201810392495A CN108595973B CN 108595973 B CN108595973 B CN 108595973B CN 201810392495 A CN201810392495 A CN 201810392495A CN 108595973 B CN108595973 B CN 108595973B
Authority
CN
China
Prior art keywords
character string
target character
sub
local equipment
target
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
CN201810392495.5A
Other languages
Chinese (zh)
Other versions
CN108595973A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810392495.5A priority Critical patent/CN108595973B/en
Publication of CN108595973A publication Critical patent/CN108595973A/en
Application granted granted Critical
Publication of CN108595973B publication Critical patent/CN108595973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention discloses an instruction determining method, an equipment control method, a device, a system, equipment and a storage medium, wherein the instruction determining method comprises the following steps: encrypting the random number provided by the local equipment by using a set encryption algorithm to determine encrypted data; converting each byte of the encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a target character string; splitting the target character string to determine sub-target character strings; and determining the corresponding relation between the sub-target character strings and the local equipment control instructions. The method and the device have the advantages that the secondary encryption of the data encrypted by the random number is realized, the encrypted data is more complicated, the repetition rate is low when the command is determined according to the encrypted data, and the encryption performance is good.

Description

Instruction determination method, equipment control method, device and system
Technical Field
The present invention relates to data transmission security technologies, and in particular, to a method, an apparatus, a system, an apparatus, and a storage medium for determining an instruction.
Background
With the importance of people on information security, password protection methods are more and more, most of the general password protection methods are limited to encryption by using a certain encryption algorithm, the method only depends on the encryption algorithm to protect the password, and the security degree cannot be guaranteed.
In an application scenario of smart device interaction, in order to improve security of interaction, encryption is generally performed by using a random number, and encrypted data is used as a password for interaction between smart devices, where the use of the random number provides a dynamic factor.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art. In the process of converting random numbers into instructions, the following two ways are generally applied in the prior art: firstly, encrypting a random number by using the existing encryption algorithm, wherein the processing result of the algorithm is the number of bytes without expansion numbers, each byte represents an instruction, the number of the instructions determined by the method is small due to the absence of the expansion numbers, and the number of the determined instructions depends on the size of the random number; secondly, after the random number is encrypted, the byte number with the expansion number is obtained, but the data after encryption expansion adopts a mode that each byte represents an instruction, and the method causes that a plurality of different bytes represent the same instruction, so that the repetition rate is high, and the encryption is not good.
Disclosure of Invention
The embodiment of the invention provides an instruction determining method, an equipment control method, a device, a system, equipment and a storage medium, which are used for realizing secondary encryption of data encrypted by random numbers, so that the encrypted data is more complicated, the repetition rate is low when an instruction is determined according to the encrypted data, and the encryption is good.
In a first aspect, an embodiment of the present invention provides an instruction determining method, where the method includes:
encrypting the random number provided by the local equipment by using a set encryption algorithm to determine encrypted data;
converting each byte of the encrypted data to a corresponding decimal number;
splicing the decimal numbers to determine a target character string;
splitting the target character string to determine sub-target character strings;
and determining the corresponding relation between the sub-target character strings and the local equipment control instructions.
In a second aspect, an embodiment of the present invention provides an apparatus control method, where the method includes:
the local equipment encrypts the currently displayed random number by using a set encryption algorithm to determine first encrypted data; converting each byte of the first encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a first target character string; splitting the first target character string to determine a first sub-target character string; determining a first corresponding relation between the first sub-target character string and a local equipment control command, and determining a second corresponding relation between the local control command and a working mode of local equipment; sending the second corresponding relation to the intelligent terminal;
the intelligent terminal receives the random number displayed on the local equipment; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string to determine a second sub-target character string; determining a third corresponding relation between the second sub-target character string and the local equipment control instruction; receiving a second corresponding relation;
the intelligent terminal determines a target working mode and sends the target working mode to the local equipment;
the intelligent terminal determines a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the third corresponding relation;
the local equipment receives the second sub-target character string;
the local equipment determines that the second sub-target character string is the same as the first sub-target character string, and then starts operation;
and the local equipment determines a first sub-target character string corresponding to the target working mode according to the first corresponding relation and the second corresponding relation.
In a third aspect, an embodiment of the present invention provides an instruction determining apparatus, including:
the data encryption module is used for encrypting the random number provided by the local equipment by applying a set encryption algorithm to determine encrypted data;
the data conversion module is used for converting each byte of the encrypted data into a corresponding decimal number;
the character string splicing module is used for splicing the decimal number to determine a target character string;
the character string splitting module is used for splitting the target character string to determine sub-target character strings;
and the corresponding relation determining module is used for determining the corresponding relation between the sub-target character strings and the local equipment control command.
In a fourth aspect, an embodiment of the present invention provides an apparatus control system, where the system includes a local apparatus and an intelligent terminal:
the local equipment encrypts the currently displayed random number by using a set encryption algorithm to determine first encrypted data; converting each byte of the first encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a first target character string; splitting the first target character string to determine a first sub-target character string; determining a first corresponding relation between the first sub-target character string and a local equipment control command, and determining a second corresponding relation between the local control command and a working mode of local equipment; sending the second corresponding relation to the intelligent terminal;
the intelligent terminal receives the random number displayed on the local equipment; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string to determine a second sub-target character string; determining a third corresponding relation between the second sub-target character string and the local equipment control instruction; receiving a second corresponding relation;
the intelligent terminal determines a target working mode and sends the target working mode to the local equipment; determining a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the third corresponding relation;
the local equipment receives the second sub-target character string; if the second sub-target character string is determined to be the same as the first sub-target character string, starting operation; and determining a first sub-target character string corresponding to the target working mode according to the first corresponding relation and the second corresponding relation.
In a fifth aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the instruction determination method or the device control method according to any one of the embodiments of the present invention when executing the program.
In a sixth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the instruction determination method or the device control method according to any one of the embodiments of the present invention.
In the embodiment of the invention, a set encryption algorithm is applied to encrypt the random number provided by the local equipment to determine encrypted data; converting each byte of the encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a target character string; splitting the target character string to determine sub-target character strings; and determining the corresponding relation between the sub-target character strings and the local equipment control instructions. The method and the device have the advantages that the secondary encryption of the data encrypted by the random number is realized, the encrypted data is more complicated, the repetition rate is low when the command is determined according to the encrypted data, and the encryption performance is good.
Drawings
FIG. 1 is a flow chart of a method for determining instructions according to a first embodiment of the present invention;
fig. 2a is a flowchart of an apparatus control method according to a second embodiment of the present invention;
fig. 2b is a schematic diagram of interaction between a mobile phone and an intelligent washing machine according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an instruction determining apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus control system according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in the fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
In some scenarios of smart device communication interaction, dynamic encryption instructions are required for security control. As can be seen from the principle of random number generation, the latter random number has nothing to do with the former random number, and thus the random number provides a dynamic factor. And converting a random number into a plurality of instructions, and controlling each intelligent device by using different instructions to enable each intelligent device to complete an interaction process.
Example one
Fig. 1 is a flowchart of an instruction determining method according to an embodiment of the present invention, where this embodiment is applicable to a case where multiple instructions need to be determined according to a random number, and the method may be executed by an instruction determining apparatus according to an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner. Referring to fig. 1, the method may specifically include the following steps:
s110, encrypting the random number provided by the local equipment by applying the set encryption algorithm to determine encrypted data.
In practical applications, the local device provides a dynamic random number, and the local device is an intelligent washing machine, for example, the intelligent washing machine dynamically displays the random number, and updates the random number every 1 minute, for example. And encrypting the currently displayed random number by applying a set encryption algorithm, and determining the encrypted data as encrypted data. The set Encryption Algorithm may be an MD5(Message-Digest Algorithm 5) Algorithm or a des (data Encryption standard) Algorithm, or the like. The encrypted data is obtained by encrypting according to a set encryption algorithm, and the data form, the data characteristics and the like of the encrypted data are related to the specific encryption algorithm used.
Optionally, the encryption algorithm set by the application is an AES encryption algorithm. The AES (advanced Encryption standard) Encryption algorithm is an advanced Encryption standard in cryptography, and is also called Rijndael Encryption method, and the AES Encryption algorithm itself has a complementary code mechanism, so that the Encryption process in the instruction determination method in the embodiment of the present invention has the first byte expansion by applying the algorithm, and the byte expansion reduces the data repetition rate. The data encrypted by applying the AES encryption algorithm to the random number is typically 16 bytes of data.
And S120, converting each byte of the encrypted data into a corresponding decimal number.
Specifically, the encrypted data is converted, and each byte of the encrypted data is converted into a decimal number. In a specific example, after the AES encryption algorithm is applied to encrypt the random number currently displayed by the local device, 16 bytes of encrypted data are obtained, where the encrypted data is not visible to the user, but exists in an encrypted form. If the encrypted data is hexadecimal data, each byte is converted into a corresponding decimal number, for example, the first byte is 0X02, the corresponding decimal number is 2, and the second byte is 0X0A, the corresponding decimal number is 10.
And S130, splicing the decimal numbers to determine a target character string.
Splicing each byte in the encrypted data into the corresponding decimal number, optionally, splicing according to the byte order, that is, splicing the decimal number converted from the second byte after the decimal number converted from the first byte, splicing the decimal number converted from the third byte after the decimal number converted from the second byte … …, and splicing the decimal number converted from the (N + 1) th byte after the decimal number converted from the nth byte, wherein N is a positive integer and represents the byte order. In one specific example, the result of splicing the multiple decimal numbers is a target string, for example, 308255911243902180373566.
S140, splitting the target character string to determine a sub-target character string.
Illustratively, the target character string is split, and one target character string is split into a plurality of sub-target character strings. For example, every other decimal number is selected, every third decimal number is taken as a sub-target string, and if the target string is 308255911243902180373566, the sub-target strings are 385, 025, 914 and 123 … ….
S150, determining the corresponding relation between the sub-target character strings and the local equipment control command.
Specifically, the corresponding relationship between each sub-target character string and the local equipment control instruction is determined, and optionally, the local control instruction comprises quick washing, standard washing, powerful washing, draining or spin-drying and the like. For example, 385 means spin, 025 means fast wash, 123 means power wash, 914 means standard wash, etc. By selecting the sub-target character string corresponding to the local device control instruction, the local device control instruction can be applied to control the local device.
In the embodiment of the invention, a set encryption algorithm is applied to encrypt the random number provided by the local equipment to determine encrypted data; converting each byte of the encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a target character string; splitting the target character string to determine sub-target character strings; and determining the corresponding relation between the sub-target character strings and the local equipment control instructions. The method and the device have the advantages that the secondary encryption of the data encrypted by the random number is realized, the encrypted data is more complicated, the repetition rate is low when the command is determined according to the encrypted data, and the encryption performance is good.
On the basis of the above technical solution, after converting each byte of the encrypted data into a corresponding decimal number, the method further includes: and processing the decimal number according to a set rule after determining that the decimal number is a single digit, wherein the set rule is that a set number is added before or after the decimal number, and the number comprises the serial number of the byte corresponding to the decimal number in the encrypted data.
Illustratively, each byte of the encrypted data is converted into a corresponding decimal number, and the decimal number of the decimal number is processed according to a set rule, for example, a set number is added before or after the decimal number of the decimal number, and the number can be the serial number of the byte corresponding to the decimal number in the encrypted data.
In a specific example, if the 5 th byte is 0X08, the conversion to the corresponding decimal number is 8, which is a single digit, and the corresponding sequence number of the byte in the encrypted data is 5, then 5 may be added in front of 8, i.e., 58, as a result of the processing of the single digit 8, with 58 replacing 8. The byte expansion for the second time in the instruction determining process in the embodiment of the invention is realized, so that the instruction is more complicated and complicated, and the encryption is better.
Optionally, splitting the target character string to determine a sub-target character string, including: and sequentially selecting a set number of character strings as sub-target character strings from low bytes to split the target character strings.
If the target character string is 308255911243902180373566, the predetermined number of character strings are selected as the sub-target character strings in order from the lower byte, and if the predetermined number is 4, the result of splitting the target character string is 3082, 5591, or 1243 … …. Through the secondary encryption, the encrypted data is more complex and safer, and the data repetition rate is reduced.
In the embodiment of the invention, the encryption process of the data and the expansion process of the data are provided, the purpose of converting the random number into various encryption instructions is realized, the complexity of the encrypted data is increased, the repetition rate of the data is reduced, and the purposes of low repetition rate and good encryption are achieved.
Example two
Fig. 2a is a flowchart of a device control method according to a second embodiment of the present invention, where this embodiment is applicable to a case where at least two devices interact based on a control instruction, and the method may be executed by a device control system according to the second embodiment of the present invention, where the system includes a local device and an intelligent terminal. Referring to fig. 2a, the method may specifically include the steps of:
s210, the local equipment encrypts the currently displayed random number by using a set encryption algorithm to determine first encrypted data; converting each byte of the first encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a first target character string; splitting the first target character string to determine a first sub-target character string; and determining a first corresponding relation between the first sub-target character string and a local equipment control command, and determining a second corresponding relation between the local control command and the working mode of the local equipment. In a specific example, the local device takes an intelligent washing machine as an example, and after a certain key of the intelligent washing machine is clicked, a 4-digit random number, such as 3268, is displayed on a display nixie tube of the intelligent washing machine, and the key can be a power supply start key or the like. The method comprises the steps of encrypting 3268 by using an AES encryption algorithm to obtain first encrypted data, converting each byte of the first encrypted data into a corresponding decimal number, splicing the decimal numbers to determine a first target character string, such as 308255911243902180373566, splitting the first target character string to determine first sub-target character strings 3082, 5591 and 1243 … …, and determining a first corresponding relation between the first sub-target character strings and a local equipment control instruction, such as 3082 for quick washing, 5591 for standard washing, 1243 for powerful washing, 9021 for spin-drying and 8037 for draining. The second corresponding relation between the local control instruction and the working mode of the local equipment can be that the quick washing, the standard washing and the powerful washing correspond to a washing mode, the spin-drying corresponds to a spin-drying mode, and the drainage corresponds to a drainage mode; and sending the second corresponding relation to the intelligent terminal. In this specific example, the intelligent terminal may be a mobile phone, and the user may control the intelligent washing machine through the mobile phone to complete the washing process.
And S220, sending the second corresponding relation to the intelligent terminal.
S230, the intelligent terminal receives the second corresponding relation
S240, the intelligent terminal receives the random number displayed on the local equipment; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string to determine a second sub-target character string; determining a third corresponding relation between the second sub-target character string and the local equipment control instruction; a second correspondence is received.
In a specific example, the intelligent terminal takes a mobile phone as an example, a first application program matched with the intelligent washing machine is built in the mobile phone, and the interaction process between the mobile phone and the intelligent washing machine is realized through the first application program. The method comprises the steps of displaying 4-digit random numbers on a display nixie tube of the intelligent washing machine, for example 3268, inputting 3268 on a first application program corresponding to a mobile phone, encrypting the 3268 by the mobile phone through an AES encryption algorithm to obtain second encrypted data, converting each byte of the second encrypted data into a corresponding decimal number, splicing the decimal numbers to determine a second target character string, for example 308255911243902180373566, splitting the second target character string to determine second sub-target character strings 3082, 5591 and 1243 … …, and determining a third corresponding relation between the second sub-target character strings and a local equipment control command, for example, 3082 represents quick washing, 5591 represents standard washing, 1243 represents powerful washing, 9021 represents spin-drying and 8037 represents drainage.
In a specific example, fig. 2b shows an interactive schematic diagram of a mobile phone and an intelligent washing machine, 291 represents the mobile phone, 292 represents a display screen of the intelligent washing machine, wherein a display nixie tube is integrated in the display screen, and a random number 3268 displayed on the display nixie tube of the intelligent washing machine is input into a first application program of the mobile phone, so that a display interface of the first application program of the mobile phone displays an optional working mode of the intelligent washing machine, which is used for determining a target working mode through touch or click operations and the like.
It should be noted that, S240 may be executed first, and then S230 is executed, that is, the intelligent terminal receives the random number displayed on the local device; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string to determine a second sub-target character string; and after the third corresponding relation between the second sub-target character string and the local equipment control command is determined, receiving the second corresponding relation. And is not particularly limited herein.
And S250, the intelligent terminal determines a target working mode.
After 3268 is input on the first application corresponding to the mobile phone, a plurality of working modes of the intelligent washing machine are displayed on the first application interface, such as quick washing, standard washing, powerful washing, spin-drying or draining, and the like, and are used for selecting one working mode on the first application interface through operations such as touch or click, and after a payment mode is selected, a second sub-target character string corresponding to the washing mode is displayed on the mobile phone, for example, if the user selects quick washing on the mobile phone, the target working mode is the quick washing mode.
And S260, sending the target working mode to the local equipment.
In a specific example, the mobile phone sends the target operation mode to the intelligent washing machine through the first application program, wherein the target operation mode is the quick-washing mode.
And S270, the intelligent terminal determines a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the third corresponding relation.
Specifically, the mobile phone determines that the second sub-target character string corresponding to the standard cleaning is 3082 according to the second corresponding relationship and the third corresponding relationship.
And S280, the local equipment receives the second sub-target character string.
And S290, the local equipment determines that the second sub-target character string is the same as the first sub-target character string, and then starts operation.
The intelligent washing machine acquires 3082 sent by the mobile phone, and starts a corresponding quick washing program if the first sub-target character string corresponding to the encrypted quick washing program on the intelligent washing machine is the same as the character string of the first sub-target corresponding to the encrypted quick washing program. And the intelligent washing machine determines a first sub-target character string corresponding to the target working mode according to the first corresponding relation and the second corresponding relation.
In the embodiment of the invention, the local equipment and the intelligent terminal use the same instruction determination method in the embodiment of the invention to determine the relationship between the control instruction of the local equipment and the sub-target character strings, after the intelligent terminal determines the target working mode, the target working mode is sent to the local equipment, the intelligent terminal determines the second sub-target character string corresponding to the target working mode according to the second corresponding relationship and the third corresponding relationship, the local equipment receives the second sub-target character string, and starts operation after determining that the second sub-target character string is the same as the first sub-target character string. The method and the device have the advantages that the secondary encryption of the data encrypted by the random number is realized, the encrypted data is more complicated, the repetition rate is low when the command is determined according to the encrypted data, and the encryption performance is good. Therefore, the interaction between the local equipment and the intelligent terminal is safer.
Optionally, the determining, by the intelligent terminal, a second sub-target character string corresponding to the target operating mode according to the second corresponding relationship and the third corresponding relationship includes: and determining a second sub-target character string corresponding to the target working mode according to the first corresponding relation between the second sub-target character string and a local equipment control instruction and the second corresponding relation between the local equipment control instruction and the working mode of the local equipment.
Specifically, a local equipment control instruction corresponding to the second sub-target character string is determined according to the first corresponding relation and the second sub-target character string; and determining a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the target working mode. For example, according to reference numeral 5591 representing standard cleaning which belongs to a cleaning mode, it is determined that a second sub-target character string corresponding to the standard cleaning mode in the cleaning mode is 5591.
Optionally, the determining, by the local device, a first sub-target character string corresponding to the target operating mode according to the first corresponding relationship and the second corresponding relationship includes: and determining a second sub-target character string corresponding to the target working mode according to the first corresponding relation between the first sub-target character string and the local equipment control instruction and the second corresponding relation between the local equipment control instruction and the working mode of the local equipment.
Similarly, according to the first corresponding relation and the first sub-target character string, determining a local equipment control instruction corresponding to the first sub-target character string; and determining a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the target working mode. For example, reference numeral 1243 denotes a power wash, the power wash belongs to a wash mode, and it is determined that the second sub-target character string corresponding to the power wash mode in the wash mode is 1243.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an instruction determining apparatus according to a third embodiment of the present invention, which is suitable for executing an instruction determining method according to the third embodiment of the present invention. As shown in fig. 3, the apparatus may specifically include:
the data encryption module 310 is configured to encrypt a random number provided by the local device by using a set encryption algorithm to determine encrypted data;
a data conversion module 320 for converting each byte of the encrypted data into a corresponding decimal number;
a character string splicing module 330, configured to splice the decimal number to determine a target character string;
the character string splitting module 340 is configured to split the target character string to determine sub-target character strings;
a corresponding relation determining module 350, configured to determine a corresponding relation between the sub-target character string and the local device control instruction.
Further, the method also comprises the following steps:
and the data processing module is used for processing the decimal number according to a set rule after each byte of the encrypted data is converted into the corresponding decimal number and the decimal number is determined to be a single digit, wherein the set rule is that a set number is added before or after the decimal number, and the number comprises the serial number of the byte corresponding to the decimal number in the encrypted data.
Further, the character string splitting module 340 is specifically configured to:
and sequentially selecting a set number of character strings as sub-target character strings from low bytes to split the target character strings.
Further, the encryption algorithm set by the application is an AES encryption algorithm.
The instruction determining device provided by the embodiment of the invention can execute the instruction determining method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the executing method.
Example four
Fig. 4 is a schematic structural diagram of an apparatus control system according to a fourth embodiment of the present invention, where the system includes a local apparatus 410 and an intelligent terminal 420, and the system is adapted to execute an apparatus control method according to the fourth embodiment of the present invention, and refer to fig. 4.
The local device 410 encrypts the currently displayed random number by using a set encryption algorithm to determine first encrypted data; converting each byte of the first encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a first target character string; splitting the first target character string to determine a first sub-target character string; determining a first corresponding relation between the first sub-target character string and a local equipment control command, and determining a second corresponding relation between the local control command and a working mode of local equipment; and sending the second corresponding relation to the intelligent terminal 420.
The intelligent terminal 420 receives the random number displayed on the local device; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string to determine a second sub-target character string; determining a third corresponding relation between the second sub-target character string and the local equipment control instruction; a second correspondence is received.
The intelligent terminal 420 determines a target working mode and sends the target working mode to the local device 410; and determining a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the third corresponding relation.
The local device 410 receives the second sub-target string; if the second sub-target character string is determined to be the same as the first sub-target character string, starting operation; and determining a first sub-target character string corresponding to the target working mode according to the first corresponding relation and the second corresponding relation.
Specifically, the intelligent terminal 420 determines a second sub-target character string corresponding to the target working mode according to the second corresponding relationship and the third corresponding relationship, which may be implemented in such a way that the second sub-target character string corresponding to the target working mode is determined according to a first corresponding relationship between the second sub-target character string and a local device control instruction and a second corresponding relationship between the local device control instruction and the working mode of the local device.
Specifically, the local device 410 determines the first sub-target character string corresponding to the target operating mode according to the first corresponding relationship and the second corresponding relationship, and may be implemented as follows: and determining a second sub-target character string corresponding to the target working mode according to the first corresponding relation between the first sub-target character string and the local equipment control instruction and the second corresponding relation between the local equipment control instruction and the working mode of the local equipment.
The embodiment of the invention realizes the secondary encryption of the data encrypted by the random number, so that the encrypted data is more complicated, the repetition rate is low when the instruction is determined according to the encrypted data, and the encryption is good. Therefore, the interaction between the local equipment and the intelligent terminal is safer.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 5 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 5, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more first application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement the instruction determination method provided by the embodiment of the present invention:
that is, the processing unit implements, when executing the program: encrypting the random number provided by the local equipment by using a set encryption algorithm to determine encrypted data; converting each byte of the encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a target character string; splitting the target character string to determine sub-target character strings; and determining the corresponding relation between the sub-target character strings and the local equipment control instructions.
The device control method provided in the embodiment of the present invention may also be implemented, that is, when the processing unit executes the program, the following is implemented:
the local equipment encrypts the currently displayed random number by using a set encryption algorithm to determine first encrypted data; converting each byte of the first encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a first target character string; splitting the first target character string to determine a first sub-target character string; determining a first corresponding relation between the first sub-target character string and a local equipment control command, and determining a second corresponding relation between the local control command and a working mode of local equipment; sending the second corresponding relation to the intelligent terminal;
the intelligent terminal receives the random number displayed on the local equipment; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string to determine a second sub-target character string; determining a third corresponding relation between the second sub-target character string and the local equipment control instruction; receiving a second corresponding relation;
the intelligent terminal determines a target working mode and sends the target working mode to the local equipment; the intelligent terminal determines a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the third corresponding relation;
the local equipment receives the second sub-target character string; the local equipment determines that the second sub-target character string is the same as the first sub-target character string, and then starts operation; and the local equipment determines a first sub-target character string corresponding to the target working mode according to the first corresponding relation and the second corresponding relation.
EXAMPLE six
A sixth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, for example, implements an instruction determining method provided in the sixth embodiment of the present invention:
that is, the processing unit implements, when executing the program: encrypting the random number provided by the local equipment by using a set encryption algorithm to determine encrypted data; converting each byte of the encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a target character string; splitting the target character string to determine sub-target character strings; and determining the corresponding relation between the sub-target character strings and the local equipment control instructions.
The device control method provided in the embodiment of the present invention may also be implemented, that is, when the processing unit executes the program, the following is implemented:
the local equipment encrypts the currently displayed random number by using a set encryption algorithm to determine first encrypted data; converting each byte of the first encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a first target character string; splitting the first target character string to determine a first sub-target character string; determining a first corresponding relation between the first sub-target character string and a local equipment control command, and determining a second corresponding relation between the local control command and a working mode of local equipment; sending the second corresponding relation to the intelligent terminal;
the intelligent terminal receives the random number displayed on the local equipment; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string to determine a second sub-target character string; determining a third corresponding relation between the second sub-target character string and the local equipment control instruction; receiving a second corresponding relation;
the intelligent terminal determines a target working mode and sends the target working mode to the local equipment; the intelligent terminal determines a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the third corresponding relation;
the local equipment receives the second sub-target character string; the local equipment determines that the second sub-target character string is the same as the first sub-target character string, and then starts operation; and the local equipment determines a first sub-target character string corresponding to the target working mode according to the first corresponding relation and the second corresponding relation.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An instruction determination method, comprising:
encrypting the random number provided by the local equipment by using a set encryption algorithm to determine encrypted data;
converting each byte of the encrypted data to a corresponding decimal number;
splicing the decimal numbers to determine a target character string;
splitting the target character string to determine sub-target character strings; the number of characters contained in each sub-target character string is greater than or equal to 3;
and determining the corresponding relation between each sub-target character string and the local equipment control command.
2. The method of claim 1, after converting each byte of the encrypted data to a corresponding decimal number, further comprising:
and processing the decimal number according to a set rule after determining that the decimal number is a single digit, wherein the set rule is that a set number is added before or after the decimal number, and the number comprises the serial number of the byte corresponding to the decimal number in the encrypted data.
3. The method of claim 1, wherein splitting the target string to determine a sub-target string comprises:
and sequentially selecting a set number of character strings as sub-target character strings from low bytes to split the target character strings.
4. A method according to any of claims 1-3, characterized in that the encryption algorithm set by the application is the AES encryption algorithm.
5. An apparatus control method characterized by comprising:
the local equipment encrypts the currently displayed random number by using a set encryption algorithm to determine first encrypted data; converting each byte of the first encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a first target character string; splitting the first target character string according to a preset splitting rule to determine a first sub-target character string; the number of characters contained in each sub-target character string is greater than or equal to 3; determining a first corresponding relation between the first sub-target character string and a local equipment control command, and determining a second corresponding relation between the local equipment control command and a working mode of local equipment; sending the second corresponding relation to the intelligent terminal;
the intelligent terminal receives the random number displayed on the local equipment; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string according to the splitting rule to determine a second sub-target character string; determining a third corresponding relation between the second sub-target character string and the local equipment control instruction; receiving a second corresponding relation;
the intelligent terminal determines a target working mode and sends the target working mode to the local equipment;
the intelligent terminal determines a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the third corresponding relation;
the local equipment receives the second sub-target character string;
the local equipment determines that the second sub-target character string is the same as the first sub-target character string, and then starts operation;
and the local equipment determines a first sub-target character string corresponding to the target working mode according to the first corresponding relation and the second corresponding relation.
6. The method according to claim 5, wherein the determining, by the intelligent terminal, the second sub-target character string corresponding to the target operating mode according to the second correspondence and the third correspondence includes:
determining a second sub-target character string corresponding to the target working mode according to the first corresponding relation between the second sub-target character string and a local equipment control instruction and the second corresponding relation between the local equipment control instruction and the working mode of the local equipment;
the local device determines a first sub-target character string corresponding to the target working mode according to the first corresponding relationship and the second corresponding relationship, and the method comprises the following steps:
and determining a second sub-target character string corresponding to the target working mode according to the first corresponding relation between the first sub-target character string and the local equipment control instruction and the second corresponding relation between the local equipment control instruction and the working mode of the local equipment.
7. An instruction determination device, comprising:
the data encryption module is used for encrypting the random number provided by the local equipment by applying a set encryption algorithm to determine encrypted data;
the data conversion module is used for converting each byte of the encrypted data into a corresponding decimal number;
the character string splicing module is used for splicing the decimal number to determine a target character string;
the character string splitting module is used for splitting the target character string to determine sub-target character strings; the number of characters contained in each sub-target character string is greater than or equal to 3;
and the corresponding relation determining module is used for determining the corresponding relation between each sub-target character string and the local equipment control command.
8. The equipment control system is characterized by comprising local equipment and an intelligent terminal:
the local equipment encrypts the currently displayed random number by using a set encryption algorithm to determine first encrypted data; converting each byte of the first encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a first target character string; splitting the first target character string according to a preset splitting rule to determine a first sub-target character string; the number of characters contained in each sub-target character string is greater than or equal to 3; determining a first corresponding relation between the first sub-target character string and a local equipment control command, and determining a second corresponding relation between the local equipment control command and a working mode of local equipment; sending the second corresponding relation to the intelligent terminal;
the intelligent terminal receives the random number displayed on the local equipment; encrypting the random number provided by the local equipment by using a set encryption algorithm to determine second encrypted data; converting each byte of the second encrypted data to a corresponding decimal number; splicing the decimal numbers to determine a second target character string; splitting the second target character string according to the splitting rule to determine a second sub-target character string; determining a third corresponding relation between the second sub-target character string and the local equipment control instruction; receiving a second corresponding relation;
the intelligent terminal determines a target working mode and sends the target working mode to the local equipment; determining a second sub-target character string corresponding to the target working mode according to the second corresponding relation and the third corresponding relation;
the local equipment receives the second sub-target character string; if the second sub-target character string is determined to be the same as the first sub-target character string, starting operation; and determining a first sub-target character string corresponding to the target working mode according to the first corresponding relation and the second corresponding relation.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the instruction determination method of any one of claims 1 to 4 or the device control method of any one of claims 5 to 6 when executing the program.
10. A computer-readable storage medium on which a computer program is stored, the program being characterized by implementing, when executed by a processor, the instruction determination method according to any one of claims 1 to 4 or the apparatus control method according to any one of claims 5 to 6.
CN201810392495.5A 2018-04-27 2018-04-27 Instruction determination method, equipment control method, device and system Active CN108595973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810392495.5A CN108595973B (en) 2018-04-27 2018-04-27 Instruction determination method, equipment control method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810392495.5A CN108595973B (en) 2018-04-27 2018-04-27 Instruction determination method, equipment control method, device and system

Publications (2)

Publication Number Publication Date
CN108595973A CN108595973A (en) 2018-09-28
CN108595973B true CN108595973B (en) 2021-03-23

Family

ID=63610744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810392495.5A Active CN108595973B (en) 2018-04-27 2018-04-27 Instruction determination method, equipment control method, device and system

Country Status (1)

Country Link
CN (1) CN108595973B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314184B (en) * 2018-12-12 2021-10-15 深圳市云海物联科技有限公司 Control method and system based on transparent transmission mechanism
CN113346999B (en) * 2021-08-09 2021-10-26 国网浙江省电力有限公司杭州供电公司 Splitting encryption-based brain central system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103901824A (en) * 2012-12-26 2014-07-02 海尔集团公司 Intelligent household control method and system, intelligent household control center and mobile terminal
CN104811298A (en) * 2015-05-14 2015-07-29 中国联合网络通信集团有限公司 Method and device for realizing encryption
CN105827582A (en) * 2015-09-14 2016-08-03 维沃移动通信有限公司 Communication encryption method, device and system
CN107395751A (en) * 2017-08-23 2017-11-24 绵阳美菱软件技术有限公司 A kind of remote control system of intelligent household electrical appliance and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8560829B2 (en) * 2006-05-09 2013-10-15 Broadcom Corporation Method and system for command interface protection to achieve a secure interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103901824A (en) * 2012-12-26 2014-07-02 海尔集团公司 Intelligent household control method and system, intelligent household control center and mobile terminal
CN104811298A (en) * 2015-05-14 2015-07-29 中国联合网络通信集团有限公司 Method and device for realizing encryption
CN105827582A (en) * 2015-09-14 2016-08-03 维沃移动通信有限公司 Communication encryption method, device and system
CN107395751A (en) * 2017-08-23 2017-11-24 绵阳美菱软件技术有限公司 A kind of remote control system of intelligent household electrical appliance and method

Also Published As

Publication number Publication date
CN108595973A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
EP3916604B1 (en) Method and apparatus for processing privacy data of block chain, device, storage medium and computer program product
CN107612683B (en) Encryption and decryption method, device, system, equipment and storage medium
CN110489440B (en) Data query method and device
CN109951546A (en) Transactions requests processing method, device, equipment and medium based on intelligent contract
CN110312054B (en) Image encryption and decryption method, related device and storage medium
CN114186256B (en) Training method, device, equipment and storage medium of neural network model
CN111464297A (en) Transaction processing method and device based on block chain, electronic equipment and medium
CN115051798A (en) Random number generation method and device, electronic equipment and storage medium
US10440001B2 (en) Method to securely authenticate management server over un-encrypted remote console connection
CN108595973B (en) Instruction determination method, equipment control method, device and system
CN111343207A (en) Multi-node joint encryption data transmission method, equipment and storage medium
CN111400760A (en) Method, device, server and storage medium for web application to access database
CN113794706B (en) Data processing method and device, electronic equipment and readable storage medium
CN109711178B (en) Key value pair storage method, device, equipment and storage medium
CN110545542A (en) Main control key downloading method and device based on asymmetric encryption algorithm and computer equipment
CN113946863A (en) Data encryption storage method, system, equipment and storage medium
CN111400743A (en) Transaction processing method and device based on block chain network, electronic equipment and medium
CN116170180A (en) Encryption method, encryption device, storage medium and electronic equipment
CN115333851A (en) Automatic driving data transmission method and device and electronic equipment
CN107315970B (en) Sensitive data interaction method and device
CN111062053B (en) Method, device, equipment and medium for processing biological characteristic data
CN115134793A (en) Data processing method, device, equipment and storage medium
CN111104363B (en) FPGA cloud platform using method, device, equipment and medium
WO2021027145A1 (en) Non-application payment method and apparatus, and computing device and storage medium
CN114996169B (en) Device diagnosis method, device, electronic device, and storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200402

Address after: 510530 Guangdong city of Guangzhou province YUNPU Whampoa district four Road No. 6

Applicant after: GUANGZHOU SHIYUAN ELECTRONICS Co.,Ltd.

Address before: 510530, No. four, 6, Po Po Road, Yun Po Industrial Zone, Whampoa District, Guangzhou, Guangdong

Applicant before: GUANGZHOU SHIYUAN ELECTRONICS Co.,Ltd.

Applicant before: GUANGZHOU RUIXIN ELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant