A robot configuration method, device, robot and storage medium
By using the authorized QR code to determine the target work key, and combining the trigger control QR code and the configuration QR code, the problem of low data security during the robot configuration process is solved, and a high-security network-free configuration is achieved.
Patent Information
- Application Number
- CN202411676638.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The robot configuration process needs to be kept connected, which poses a risk of data leakage and has low data security during the configuration process.
The target work key is determined by authorizing the QR code, so that verification and configuration can be encrypted and decrypted based on the work target key, combined with the trigger control QR code for configuration verification, and the configuration item configuration is configured using the configuration QR code to avoid relying on the wireless/wired network environment.
It improves the security of the robot configuration process, avoids the risk of data leakage, realizes the configuration without relying on the network environment, and enhances data security.
Smart Images

Figure CN119748508A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of robot technology, and in particular, to a robot configuration method, device, robot and storage medium. Background Art
[0002] The robot needs to be configured before or during use, such as setting system parameters, switch parameters, internal and external calibration data, personalized data, etc.
[0003] In the related art, a host is configured to communicate and interact with the robot, and configuration of parameters and functions is achieved through a configuration program.
[0004] However, the robot configuration process needs to remain connected to the Internet, which poses a risk of data leakage and reduces data security during the configuration process. Summary of the invention
[0005] The embodiments of the present application provide a robot configuration method, device, robot and storage medium to improve the safety of the robot configuration process.
[0006] In a first aspect, an embodiment of the present application provides a first robot configuration method, which is applied to a robot, and the method includes:
[0007] In response to the authorization QR code, the authorization QR code is decrypted based on the public key configured by the robot to obtain a target working key; wherein the authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key;
[0008] In response to the trigger control two-dimensional code, decrypt the trigger control two-dimensional code based on the target working key to obtain verification information, and perform verification based on the verification information;
[0009] After the verification is passed, in response to the configuration QR code, the configuration QR code is decrypted based on the target working key to obtain the target configuration item.
[0010] The above scheme determines the target working key through the authorization QR code, so that verification and configuration can be encrypted and decrypted based on the working target key, taking into account both security and configuration efficiency; configuration verification is performed by triggering the control QR code to further improve configuration security; configuration item configuration is performed through the configuration QR code, which does not rely on the wireless / wired network environment that is prone to leakage and wiring, and does not require router forwarding. The robot can complete the configuration without the help of the network environment, thereby improving data security during the configuration process.
[0011] In some optional implementations, the verification information includes a verification item and a verification feature corresponding to the verification item, wherein the verification item represents robot identification verification, face recognition verification, or liveness verification; and verification based on the verification information includes:
[0012] Determine whether the verification feature matches the target feature corresponding to the verification item; wherein the target feature corresponding to the robot identification verification is a preset feature, and the target feature corresponding to the face recognition verification and the liveness verification is a collection feature;
[0013] If they match, the verification passes; otherwise, the verification fails.
[0014] The above scheme sets multiple verification items and determines the verification items used for verification and the verification features corresponding to the verification items after scanning the trigger control QR code; then checks whether the verification features match the collected features or preset features; if they match, it means that the collected or preset features meet the verification requirements and the verification passes; if they match, it means that the collected or preset features do not meet the verification requirements and the verification fails, thereby meeting the verification needs in different scenarios.
[0015] In some optional implementations, the verification information includes a verification item and a verification feature corresponding to the verification item; before decrypting the configuration QR code based on the target working key to obtain the target configuration item, the method further includes:
[0016] Determine whether the configuration permission of the configuration QR code matches the verification item.
[0017] The above scheme sets corresponding permissions for different configuration items. That is to say, different configuration items may require different verification items, scan different trigger control QR codes, and determine different target features, thereby taking into account the security of important configurations and the convenience of common configurations.
[0018] In some optional implementations, the authorization QR code is obtained by:
[0019] Asymmetrically encrypt the target working key and the random number corresponding to the target working key based on the private key to obtain a ciphertext;
[0020] Performing QR code encoding based on the ciphertext and the initial hash value corresponding to the ciphertext to obtain the authorization QR code;
[0021] Decrypting the authorization QR code based on the public key configured by the robot to obtain the target working key includes:
[0022] Calculate the verification hash value of the ciphertext in the authorization QR code;
[0023] If the verification hash value is the same as the initial hash value, decrypting the ciphertext based on the public key to obtain a decryption key and a decryption random number;
[0024] If the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key.
[0025] In the above scheme, when generating an authorization QR code, the private key in the public-private key pair is used to generate a random number for the target working key and the target working key for asymmetric encryption, thereby improving encryption security; in addition, an initial hash value corresponding to the ciphertext is also calculated; after scanning the authorization QR code, the robot determines that the verification hash value of the calculated ciphertext is the same as the initial hash value, thereby ensuring that the authorization QR code is not tampered with; decryption is performed based on the public key in the public-private key pair to obtain a decryption key and a decryption random number; when the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key to ensure that the target working key is not tampered with, thereby obtaining a correct, tamper-proof target working key, thereby allowing subsequent configuration to proceed normally.
[0026] In some optional implementations, after decrypting the configuration QR code based on the target working key to obtain the target configuration item, the method further includes:
[0027] In response to the end control QR code, the configuration is ended.
[0028] The above scheme ends the configuration process of the robot in time after the configuration is completed by ending the control QR code, thereby reducing the impact of the configuration process on normal work.
[0029] Some optional implementations also include:
[0030] In response to the new authorization two-dimensional code, a new target working key is determined based on the new authorization two-dimensional code.
[0031] The above scheme updates the authorization QR code and then updates the target working key, making the trigger control QR code and configuration QR code encrypted based on the original target working key invalid.
[0032] In some optional implementations, all target QR codes are generated by the server after generating the public key and the private key; or,
[0033] Any target QR code is generated by the server in response to a request for generating the target QR code sent by a target terminal and sent to the target terminal, and the target terminal is a terminal that matches the robot and is verified by the server; or
[0034] The partial target QR code is generated by the server after generating the public key and the private key, and the other partial target QR code is generated and sent to the target terminal in response to a generation request for the other partial target QR code sent by the target terminal;
[0035] Among them, the target two-dimensional code includes the authorization two-dimensional code, the trigger control two-dimensional code and the configuration two-dimensional code.
[0036] The above solution generates QR codes statically, dynamically, or in combination with static and dynamic methods to meet the requirements for security and flexibility in different scenarios.
[0037] In a second aspect, an embodiment of the present application provides a first robot configuration device, which is applied to a robot, and the device includes:
[0038] An authorization module is used to respond to the authorization QR code and decrypt the authorization QR code based on the public key configured by the robot to obtain a target working key; wherein the authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key;
[0039] A verification module, configured to respond to the trigger control two-dimensional code, decrypt the trigger control two-dimensional code based on the target working key, obtain verification information, and perform verification based on the verification information;
[0040] The configuration module is used to, after verification, respond to the configuration QR code and decrypt the configuration QR code based on the target working key to obtain the target configuration item.
[0041] In some optional implementations, the verification information includes a verification item and a verification feature corresponding to the verification item, wherein the verification item represents robot identification verification, face recognition verification or liveness verification; and the verification module is specifically used to:
[0042] Determine whether the verification feature matches the target feature corresponding to the verification item; wherein the target feature corresponding to the robot identification verification is a preset feature, and the target feature corresponding to the face recognition verification and the liveness verification is a collection feature;
[0043] If they match, the verification passes; otherwise, the verification fails.
[0044] In some optional implementations, the verification information includes a verification item and a verification feature corresponding to the verification item; before the configuration module decrypts the configuration QR code based on the target working key to obtain the target configuration item, it is further used to:
[0045] Determine whether the configuration permission of the configuration QR code matches the verification item.
[0046] In some optional implementations, the authorization QR code is obtained by:
[0047] Asymmetrically encrypt the target working key and the random number corresponding to the target working key based on the private key to obtain a ciphertext;
[0048] Performing QR code encoding based on the ciphertext and the initial hash value corresponding to the ciphertext to obtain the authorization QR code;
[0049] Authorization module, specifically used for:
[0050] Calculate the verification hash value of the ciphertext in the authorization QR code;
[0051] If the verification hash value is the same as the initial hash value, decrypting the ciphertext based on the public key to obtain a decryption key and a decryption random number;
[0052] If the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key.
[0053] Some optional implementations further include a configuration end module, which is used to end the configuration in response to an end control QR code after the configuration module decrypts the configuration QR code based on the target working key to obtain the target configuration item.
[0054] In some optional implementations, the authorization module is further used to:
[0055] In response to the new authorization two-dimensional code, a new target working key is determined based on the new authorization two-dimensional code.
[0056] In some optional implementations, all target QR codes are generated by the server after generating the public key and the private key; or,
[0057] Any target QR code is generated by the server in response to a request for generating the target QR code sent by a target terminal and sent to the target terminal, and the target terminal is a terminal that matches the robot and is verified by the server; or
[0058] The partial target QR code is generated by the server after generating the public key and the private key, and the other partial target QR code is generated and sent to the target terminal in response to a generation request for the other partial target QR code sent by the target terminal;
[0059] Among them, the target two-dimensional code includes the authorization two-dimensional code, the trigger control two-dimensional code and the configuration two-dimensional code.
[0060] In a third aspect, an embodiment of the present application provides a robot, comprising at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes any robot configuration method described in the first aspect.
[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a processor, wherein when the program runs on the processor, the processor executes the robot configuration method described in any one of the first aspects above. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0063] Figure 1 A schematic diagram of a first robot provided in an embodiment of the present application;
[0064] Figure 2 A schematic diagram of a second robot provided in an embodiment of the present application;
[0065] Figure 3 A schematic diagram of the first application scenario provided in the embodiment of the present application;
[0066] Figure 4 A schematic diagram of a second application scenario provided in an embodiment of the present application;
[0067] Figure 5 A schematic diagram of a third application scenario provided in an embodiment of the present application;
[0068] Figure 6 A schematic diagram of a fourth application scenario provided in an embodiment of the present application;
[0069] Figure 7 A schematic diagram of a flow chart of a first robot configuration method provided in an embodiment of the present application;
[0070] Figure 8 A schematic diagram of a QR code scanning provided in an embodiment of the present application;
[0071] Fig. 9 A system architecture diagram provided for an embodiment of the present application;
[0072] Fig.10 An interactive flow chart of the QR code generation process provided in an embodiment of the present application;
[0073] Fig.11 A schematic diagram of a flow chart of a second robot configuration method provided in an embodiment of the present application;
[0074] Fig.12 A schematic diagram of a flow chart of a third robot configuration method provided in an embodiment of the present application;
[0075] Fig.13 A schematic diagram of a fourth robot configuration method provided in an embodiment of the present application;
[0076] Fig.14 A schematic diagram of the structure of a first robot configuration device provided in an embodiment of the present application;
[0077] Fig.15 A schematic diagram of the structure of a second robot configuration device provided in an embodiment of the present application;
[0078] Fig.16 A schematic diagram of the structure of the robot provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0080] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0081] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal connection of two devices. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0082] The robot needs to be configured before or during use, such as setting system parameters, switch parameters, internal and external calibration data, personalized data, etc.
[0083] The most common robots currently include Figure 1 The humanoid robot shown, and Figure 2Other autonomous mobile robots shown in Figure 1. The robot is equipped with a camera for navigation, obstacle avoidance, detection, or other visual detection tasks. Figure 1 as well as Figure 2 As shown in FIG. 1 , the robot integrates multiple cameras, which generally include at least one red, green, and blue (RGB) camera and a depth camera.
[0084] In the related art, a host is configured to communicate and interact with the robot, and configuration of parameters and functions is achieved through a configuration program.
[0085] See also Figure 3 As shown in the figure, the host and the robot interact based on the LAN mode. The host and the robot to be configured are in a LAN, and the configuration of parameters and functions is realized through the configuration program in the network. Generally, the general transmission control protocol / Internet protocol (TCP / IP) is used, which has poor security, especially in the wireless LAN (WIFI), the host in the hidden LAN can directly control the robot.
[0086] See also Figure 4 As shown in the figure, the host and the robot interact based on a wireless direct network, such as using the general TCP / IP protocol, Bluetooth protocol, etc., or a private protocol customized by the manufacturer. The hardware communication layer can use a variety of wireless standards. This configuration structure is also less secure, and the configuration process is susceptible to interference or data theft.
[0087] See also Figure 5 As shown, the host and the robot interact based on a wired direct network, which can use high-speed buses such as Ethernet and optical fiber, or low-speed controller area network buses (CAN) RS485 / 422 / 232 and other buses, using general protocols, custom protocols or private protocols. This configuration structure is subject to large constraints, and physical bus connections must be made, which must be removed after configuration is completed, and the implementation operation is easily affected by the environment.
[0088] See also Figure 6 As shown in the figure, based on the wireless network topology, it can be remotely configured in the local area network or the wide area network. The host can cooperate with other terminals, such as tablets, mobile phones, etc. This configuration is fast and flexible, but the cost is high and the security is low. Illegal configuration and hijacking of the robot can be achieved through remote control.
[0089] In the above methods, the robot configuration process needs to remain connected to the Internet, which poses a risk of data leakage and has low data security during the configuration process.
[0090] In view of this, an embodiment of the present application proposes a robot configuration method, device, robot and storage medium, the method comprising: in response to an authorization QR code, decrypting the authorization QR code based on a public key configured by the robot to obtain a target working key; wherein the authorization QR code is obtained by asymmetrically encrypting the target working key based on a private key corresponding to the public key; in response to a trigger control QR code, decrypting the trigger control QR code based on the target working key to obtain verification information, and performing verification based on the verification information; after the verification is passed, in response to the configuration QR code, decrypting the configuration QR code based on the target working key to obtain a target configuration item.
[0091] The above scheme determines the target working key through the authorization QR code, so that verification and configuration can be encrypted and decrypted based on the working target key, taking into account both security and configuration efficiency; configuration verification is performed by triggering the control QR code to further improve configuration security; configuration item configuration is performed through the configuration QR code, which does not rely on the wireless / wired network environment that is prone to leakage and wiring, and does not require router forwarding. The robot can complete the configuration without the help of the network environment, thereby improving data security during the configuration process.
[0092] The following will be combined with the accompanying drawings and specific embodiments to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0093] Figure 7 A schematic diagram of the flow chart of the first robot configuration method provided in the embodiment of the present application is as follows: Figure 7 As shown, the following steps are included:
[0094] Step S701: In response to the authorization QR code, the authorization QR code is decrypted based on the public key configured by the robot to obtain a target working key.
[0095] The authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key.
[0096] In this embodiment, the robot manufacturer (server) generates a public-private key pair using an asymmetric encryption algorithm, such as the SM2 algorithm (a national secret algorithm), the RSA algorithm (a public key data encryption algorithm), etc. The public key (MU Key) in the public-private key pair is configured for the robot, and the private key (MV Key) is retained on the server.
[0097] If a public-private key pair is used to directly perform asymmetric encryption and decryption on the information used subsequently, the encryption and decryption process is relatively complicated, and the public-private key pair cannot be changed, which is not flexible enough. Based on this, this embodiment determines the target working key through the authorization QR code, and subsequent verification and configuration can be based on the working target key encryption and decryption, taking into account both security and configuration efficiency.
[0098] Exemplarily, the server asymmetrically encrypts the target working key based on the private key to obtain an authorization QR code, and a robot equipped with a corresponding public key scans the authorization QR code and decrypts the target working key through the corresponding public key.
[0099] Although any device can effectively identify the relevant ciphertext content carried by the authorization QR code, only the robot configured with the corresponding public key can use the public key to correctly decrypt the ciphertext.
[0100] Similarly, any device can generate a QR code, but only the robot's server can generate a QR code that the robot can correctly decrypt based on the private key.
[0101] Step S702: In response to the trigger control two-dimensional code, decrypt the trigger control two-dimensional code based on the target working key to obtain verification information, and perform verification based on the verification information.
[0102] During implementation, the trigger control QR code is obtained by encrypting the verification information through the target working key; correspondingly, after the robot scans the trigger control QR code, the trigger control QR code is decrypted based on the above target working key to obtain the verification information, and verification is performed based on the verification information before configuration to further improve the configuration security.
[0103] Step S703: After the verification is passed, in response to the configuration QR code, the configuration QR code is decrypted based on the target working key to obtain the target configuration item.
[0104] During implementation, the robot enters the configuration state after scanning the trigger control QR code and passing the verification. The configuration QR code is obtained by encrypting the configuration item with the target working key; correspondingly, after the robot scans the configuration QR code, it decrypts the configuration QR code based on the above target working key to obtain the target configuration item, where the target configuration item includes but is not limited to system parameters, switch parameters, internal and external calibration data, personalized data and other configuration contents.
[0105] Exemplarily, after obtaining the target configuration item, the robot can perform configuration, such as performing an integrity check, synchronizing the configuration content after the check passes, and saving the configuration log after the configuration is completed.
[0106] During implementation, after the robot completes the target configuration item, the configuration result can be notified through one or more of the following: light-emitting diode (LED) light color change, buzzer prompt, voice, body movement (for humanoid robots), and facial display component (for humanoid robots).
[0107] Exemplarily, relevant personnel are informed of successful configuration by playing voice messages such as "This page is configured successfully" and "Please proceed to the next item", and relevant personnel are informed of failed configuration by playing voice messages such as "Failed, please configure and identify this page again". Configuration results are prompted by actions such as raising hands, clenching fists, etc.; facial display components are used to provide facial expressions such as blinking, smiling, etc. to prompt configuration results.
[0108] The above scheme determines the target working key through the authorization QR code, so that verification and configuration can be encrypted and decrypted based on the working target key, taking into account both security and configuration efficiency; configuration verification is performed by triggering the control QR code to further improve configuration security; configuration item configuration is performed through the configuration QR code, which does not rely on the wireless / wired network environment that is prone to leakage and wiring, and does not require router forwarding. The robot can complete the configuration without the help of the network environment, thereby improving data security during the configuration process.
[0109] This embodiment does not limit the specific implementation methods of the above-mentioned various two-dimensional codes. For example, QR CODE (a two-dimensional barcode), also known as a chessboard two-dimensional barcode, is used. QR CODE is encoded in a rectangular space by different distributions of black and white pixels in a matrix. At the corresponding element position of the matrix, the appearance of a dot (square dot, round dot or other shape) represents a binary "1", and the absence of a dot represents a binary "0". The arrangement and combination of the dots determines the meaning represented by the matrix two-dimensional barcode. The matrix two-dimensional barcode is a new type of graphic symbol automatic reading and processing code system based on computer image processing technology, combined coding principles, etc. Of course, other types of two-dimensional codes that can carry information can also be used in implementation.
[0110] The robot scanning process can be found in Figure 8 As shown, the robot's visual function has a visual range capability, through the camera ( Figure 8 Taking the RGB camera as an example) configuration can be carried out at a certain distance, without contact and wiring, and does not rely on any network connected to the robot. When the QR code appears in the robot's field of view, it is directly scanned.
[0111] In some optional implementations, all target QR codes are generated by the server after generating the public key and the private key; or,
[0112] Any target QR code is generated by the server in response to a request for generating the target QR code sent by a target terminal and sent to the target terminal, and the target terminal is a terminal that matches the robot and is verified by the server; or
[0113] The partial target QR code is generated by the server after generating the public key and the private key, and the other partial target QR code is generated and sent to the target terminal in response to a generation request for the other partial target QR code sent by the target terminal;
[0114] Among them, the target two-dimensional code includes the authorization two-dimensional code, the trigger control two-dimensional code and the configuration two-dimensional code.
[0115] The following describes the three methods of generating the target QR code:
[0116] The first method to generate the target QR code
[0117] During implementation, the server can statically generate the above-mentioned QR code. For example, before the robot leaves the factory, after the server generates a public-private key pair (the above-mentioned public key and private key), it can generate all target QR codes subsequently used by the robot.
[0118] The second method to generate the target QR code
[0119] See also Fig. 9 As shown, a corresponding terminal can be configured for the robot. When the server determines that the terminal matches the robot, it determines it as the target terminal. Subsequently, after receiving the request of the target terminal, the target QR code is sent to the target terminal.
[0120] See also Fig.10 As shown, the terminal sends a first generation request to the server, and the first generation request carries robot information and user information;
[0121] After receiving the first generation request, the server generates a target working key if it is determined to match the terminal based on the robot information and the verification is passed based on the user information; the target working key is encrypted with the private key to obtain an authorized QR code;
[0122] Send the authorization QR code to the terminal;
[0123] The terminal sends a second generation request to the server;
[0124] The server encrypts the verification information based on the target working key and obtains the trigger control QR code;
[0125] The server sends a trigger control QR code to the terminal;
[0126] The terminal sends a third generation request to the server, where the third generation request carries configuration information (such as an identifier and name of the configuration item).
[0127] The server encrypts the configuration items corresponding to the configuration information based on the target working key to obtain a configuration QR code;
[0128] The server sends a configuration QR code to the terminal.
[0129] The third method to generate the target QR code
[0130] During implementation, some target QR codes (such as authorization QR codes and trigger control QR codes with lower flexibility requirements) can be statically generated by the server, and the specific details can refer to the first method of generating target QR codes; other target QR codes (such as configuration QR codes with higher personalization requirements) can be dynamically generated by the server, and the specific details can refer to the first method of generating target QR codes.
[0131] The above solution generates the QR code statically, dynamically, or by combining static and dynamic methods to meet the requirements for security and flexibility in different scenarios.
[0132] In some optional implementations, the authorization QR code is obtained by:
[0133] Asymmetrically encrypt the target working key and the random number corresponding to the target working key based on the private key to obtain a ciphertext;
[0134] Performing QR code encoding based on the ciphertext and the initial hash value corresponding to the ciphertext to obtain the authorization QR code;
[0135] Correspondingly, the above step S701 can be implemented in the following manner:
[0136] Calculate the verification hash value of the ciphertext in the authorization QR code;
[0137] If the verification hash value is the same as the initial hash value, decrypting the ciphertext based on the public key to obtain a decryption key and a decryption random number;
[0138] If the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key.
[0139] In this embodiment, when the server generates an authorization QR code, a true random number is generated, and a target working key is generated by performing a certain transformation (such as hashing) using the random number as a seed, and the random number and the target working key are asymmetrically encrypted using the private key in the public-private key pair to obtain a ciphertext, such as using a hash algorithm to perform a hash calculation on the ciphertext to obtain a corresponding initial hash value (MAC1); a QR code is encoded based on the ciphertext and the initial hash value to obtain an authorization QR code;
[0140] After scanning the authorization QR code, the robot does not decode it first, but calculates whether the verification hash value (MAC2) of the ciphertext is the same as the initial hash value (MAC1) to ensure that the authorization QR code has not been tampered with; then, the decryption key and the decryption random number are obtained based on the above public key decryption; the decryption key is not directly used as the target working key, but when it is determined that the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key to ensure that the target working key has not been tampered with.
[0141] In the above scheme, when generating an authorization QR code, the private key in the public-private key pair is used to generate a random number for the target working key and the target working key for asymmetric encryption, thereby improving encryption security; in addition, an initial hash value corresponding to the ciphertext is also calculated; after scanning the authorization QR code, the robot determines that the verification hash value of the calculated ciphertext is the same as the initial hash value, thereby ensuring that the authorization QR code is not tampered with; decryption is performed based on the public key in the public-private key pair to obtain a decryption key and a decryption random number; when the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key to ensure that the target working key is not tampered with, thereby obtaining a correct, tamper-proof target working key, thereby allowing subsequent configuration to proceed normally.
[0142] Fig.11 A schematic diagram of a flow chart of a second robot configuration method provided in an embodiment of the present application, such as Fig.11 As shown, the following steps are included:
[0143] Step S1101: In response to the authorization QR code, the authorization QR code is decrypted based on the public key configured by the robot to obtain a target working key.
[0144] The authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key.
[0145] The specific implementation of step S1101 may refer to other embodiments and will not be described in detail here.
[0146] Step S1102: In response to the trigger control two-dimensional code, the trigger control two-dimensional code is decrypted based on the target working key to obtain verification information.
[0147] The verification information includes a verification item and a verification feature corresponding to the verification item, wherein the verification item represents robot identification verification, face recognition verification or liveness verification.
[0148] This embodiment provides multiple verification methods, each verification item represents a verification method, and one or more verification methods can be selected for each robot. If the robot has one verification method, only the control QR code corresponding to the verification method needs to be generated; if the robot has multiple verification methods, a trigger control QR code corresponding to each verification method needs to be generated.
[0149] During implementation, the server uses the target working key to encrypt the trigger control QR code based on the verification item and the corresponding verification feature.
[0150] Step S1103: Determine whether the verification feature matches the target feature corresponding to the verification item; if so, the verification passes; otherwise, the verification fails.
[0151] Among them, the target features corresponding to robot identification verification are preset features, and the target features corresponding to face recognition verification and liveness verification are collected features.
[0152] In the implementation, the server uses the target working key to encrypt the trigger control QR code based on the verification item and the corresponding verification feature. Correspondingly, the robot decrypts the trigger control QR code based on the target working key to obtain the verification item and the corresponding verification feature.
[0153] Exemplarily, for robot identification verification, the server generates a trigger control QR code based on the verification items representing the robot identification verification and the identification configured for one or more robots (such as the robot manufacturer code, robot model code, factory code and other information). That is to say, the trigger control QR code for identification verification can be configured for the robot separately, or multiple robots can share the trigger control QR code for identification verification; after scanning the trigger control QR code, the robot obtains the verification items representing the robot identification verification and the identification configured for the robot; if the identification configured for the robot is the same as the preset identification of the robot, the verification passes; if the identification configured for the robot is different from the preset identification of the robot, the verification fails.
[0154] For face recognition verification, a trigger control QR code is generated based on the verification items representing the face recognition verification and the preset face features; the robot also collects face images when scanning the trigger control QR code. If the preset face features are the same as the features extracted from the collected face images, the verification passes; if the preset face features are different from the features extracted from the collected face images, the verification fails.
[0155] For liveness verification, a trigger control QR code is generated based on the verification items that characterize liveness verification and the preset liveness features. When scanning the trigger control QR code, the robot also collects liveness detection images (collected by two cameras). If the preset liveness features are the same as the features extracted from the liveness detection images, the verification passes. If the preset liveness features are different from the features extracted from the liveness detection images, the verification fails.
[0156] Step S1104: after verification is passed, in response to the configuration QR code, the configuration QR code is decrypted based on the target working key to obtain the target configuration item.
[0157] The specific implementation of step S1104 may refer to other embodiments and will not be described in detail here.
[0158] The above scheme sets multiple verification items and determines the verification items used for verification and the verification features corresponding to the verification items after scanning the trigger control QR code; then checks whether the verification features match the collected features or preset features; if they match, it means that the collected or preset features meet the verification requirements and the verification passes; if they match, it means that the collected or preset features do not meet the verification requirements and the verification fails, thereby meeting the verification needs in different scenarios.
[0159] Fig.12 A schematic diagram of the flow chart of the third robot configuration method provided in the embodiment of the present application, such as Fig.12 As shown, the following steps are included:
[0160] Step S1201: In response to the authorization QR code, the authorization QR code is decrypted based on the public key configured by the robot to obtain a target working key.
[0161] The authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key.
[0162] Step S1202: In response to the trigger control two-dimensional code, decrypt the trigger control two-dimensional code based on the target working key to obtain verification information, and perform verification based on the verification information.
[0163] The verification information includes a verification item and a verification feature corresponding to the verification item.
[0164] The specific implementation of steps S1201 to S1202 may refer to other embodiments and will not be described in detail here.
[0165] Step S1203: After the verification is passed, in response to the configuration QR code, determine whether the configuration authority of the configuration QR code matches the verification item.
[0166] Step S1204: If there is a match, the configuration QR code is decrypted based on the target working key to obtain the target configuration item.
[0167] As mentioned above, one or more verification methods can be selected for each robot. If the robot has multiple verification methods, it is necessary to generate a trigger control QR code corresponding to each verification method. Different verification methods have different security levels, so the configuration permissions of the QR code can be set, and different permissions use different verification methods.
[0168] Exemplarily, a configuration QR code is generated based on the ciphertext and configuration authority. If the configuration authority matches the verification item corresponding to the trigger control QR code, the configuration QR code is decrypted based on the target working key.
[0169] That is to say, after scanning the trigger control QR code, even if the verification is passed, if the configuration item does not match the configuration permission, the configuration will not be performed.
[0170] The above scheme sets corresponding permissions for different configuration items. That is to say, different configuration items may require different verification items, scan different trigger control QR codes, and determine different target features, thereby taking into account the security of important configurations and the convenience of common configurations.
[0171] Fig.13 A schematic diagram of a fourth robot configuration method provided in an embodiment of the present application is shown in FIG. Fig.13 As shown, the following steps are included:
[0172] Step S1301: In response to the authorization QR code, the authorization QR code is decrypted based on the public key configured by the robot to obtain a target working key.
[0173] The authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key.
[0174] Step S1302: In response to the trigger control two-dimensional code, decrypt the trigger control two-dimensional code based on the target working key to obtain verification information, and perform verification based on the verification information.
[0175] Step S1303: After the verification is passed, in response to the configuration QR code, the configuration QR code is decrypted based on the target working key to obtain the target configuration item.
[0176] The specific implementation of steps S1301 to S1303 may refer to other embodiments and will not be described in detail here.
[0177] Step S1304: In response to the end control QR code, the configuration is ended.
[0178] In implementation, if after configuration is completed, you wait for a preset time before ending the configuration, the preset time is difficult to set accurately, and the waiting time may be long, or there may be other configuration QR codes that need to be scanned;
[0179] Based on this, this embodiment also provides an end control QR code, and the robot directly ends the configuration after scanning the end control QR code.
[0180] The above scheme ends the configuration process of the robot in time after the configuration is completed by ending the control QR code, thereby reducing the impact of the configuration process on normal work.
[0181] In some optional implementation manners, based on any of the above embodiments, the following steps are further performed:
[0182] In response to the new authorization two-dimensional code, a new target working key is determined based on the new authorization two-dimensional code.
[0183] The above scheme updates the authorization QR code and then updates the target working key, making the trigger control QR code and configuration QR code encrypted based on the original target working key invalid.
[0184] like Fig.14 As shown, the embodiment of the present application provides a robot configuration device 1400, which includes:
[0185] The authorization module 1401 is used to respond to the authorization QR code and decrypt the authorization QR code based on the public key configured by the robot to obtain a target working key; wherein the authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key;
[0186] A verification module 1402 is used for responding to the trigger control two-dimensional code, decrypting the trigger control two-dimensional code based on the target working key, obtaining verification information, and performing verification based on the verification information;
[0187] The configuration module 1403 is used to, after the verification is passed, respond to the configuration QR code and decrypt the configuration QR code based on the target working key to obtain the target configuration item.
[0188] In some optional implementations, the verification information includes a verification item and a verification feature corresponding to the verification item, wherein the verification item represents robot identification verification, face recognition verification, or liveness verification; the verification module 1402 is specifically used to:
[0189] Determine whether the verification feature matches the target feature corresponding to the verification item; wherein the target feature corresponding to the robot identification verification is a preset feature, and the target feature corresponding to the face recognition verification and the liveness verification is a collection feature;
[0190] If they match, the verification passes; otherwise, the verification fails.
[0191] In some optional implementations, the verification information includes a verification item and a verification feature corresponding to the verification item; before the configuration module 1403 decrypts the configuration QR code based on the target working key to obtain the target configuration item, it is further used to:
[0192] Determine whether the configuration permission of the configuration QR code matches the verification item.
[0193] In some optional implementations, the authorization QR code is obtained by:
[0194] Asymmetrically encrypt the target working key and the random number corresponding to the target working key based on the private key to obtain a ciphertext;
[0195] Performing QR code encoding based on the ciphertext and the initial hash value corresponding to the ciphertext to obtain the authorization QR code;
[0196] The authorization module 1401 is specifically used for:
[0197] Calculate the verification hash value of the ciphertext in the authorization QR code;
[0198] If the verification hash value is the same as the initial hash value, decrypting the ciphertext based on the public key to obtain a decryption key and a decryption random number;
[0199] If the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key.
[0200] In some optional implementations, see Fig.15 As shown, the robot configuration device 1500 also includes a configuration end module 1404, which is used to end the configuration in response to an end control QR code after the configuration module decrypts the configuration QR code based on the target working key to obtain the target configuration item.
[0201] In some optional implementations, the authorization module 1401 is further used to:
[0202] In response to the new authorization two-dimensional code, a new target working key is determined based on the new authorization two-dimensional code.
[0203] In some optional implementations, all target QR codes are generated by the server after generating the public key and the private key; or,
[0204] Any target QR code is generated by the server in response to a request for generating the target QR code sent by a target terminal and sent to the target terminal, and the target terminal is a terminal that matches the robot and is verified by the server; or
[0205] The partial target QR code is generated by the server after generating the public key and the private key, and the other partial target QR code is generated and sent to the target terminal in response to a generation request for the other partial target QR code sent by the target terminal;
[0206] Among them, the target two-dimensional code includes the authorization two-dimensional code, the trigger control two-dimensional code and the configuration two-dimensional code.
[0207] Since the device is the device in the method in the embodiment of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0208] Based on the same technical concept, the embodiment of the present application also provides a robot 1600, such as Fig.16 As shown, it includes at least one processor 1601 and a memory 1602 connected to the at least one processor. The specific connection medium between the processor 1601 and the memory 1602 is not limited in the embodiment of the present application. Fig.16 For example, the processor 1601 and the memory 1602 are connected via a bus 1603. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.16 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0209] Among them, the processor 1601 is the control center of the robot, and can use various interfaces and lines to connect various parts of the robot, and realize data processing by running or executing instructions stored in the memory 1602 and calling data stored in the memory 1602. Optionally, the processor 1601 may include one or more processing units, and the processor 1601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes the issuance of instructions. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1601. In some embodiments, the processor 1601 and the memory 1602 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0210] Processor 1601 can be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the robot configuration method can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0211] Memory 1602 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1602 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1602 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1602 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0212] In the embodiment of the present application, the memory 1602 stores a computer program. When the program is executed by the processor 1601, the processor 1601 executes:
[0213] In response to the authorization QR code, the authorization QR code is decrypted based on the public key configured by the robot to obtain a target working key; wherein the authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key;
[0214] In response to the trigger control two-dimensional code, decrypt the trigger control two-dimensional code based on the target working key to obtain verification information, and perform verification based on the verification information;
[0215] After the verification is passed, in response to the configuration QR code, the configuration QR code is decrypted based on the target working key to obtain the target configuration item.
[0216] In some optional implementations, the verification information includes a verification item and a verification feature corresponding to the verification item, and the verification item represents robot identification verification, face recognition verification, or liveness verification; the processor 1601 specifically executes:
[0217] Determine whether the verification feature matches the target feature corresponding to the verification item; wherein the target feature corresponding to the robot identification verification is a preset feature, and the target feature corresponding to the face recognition verification and the liveness verification is a collection feature;
[0218] If they match, the verification passes; otherwise, the verification fails.
[0219] In some optional implementations, the verification information includes a verification item and a verification feature corresponding to the verification item; before decrypting the configuration QR code based on the target working key to obtain the target configuration item, the processor 1601 further executes:
[0220] Determine whether the configuration permission of the configuration QR code matches the verification item.
[0221] In some optional implementations, the authorization QR code is obtained by:
[0222] Asymmetrically encrypt the target working key and the random number corresponding to the target working key based on the private key to obtain a ciphertext;
[0223] Performing QR code encoding based on the ciphertext and the initial hash value corresponding to the ciphertext to obtain the authorization QR code;
[0224] Decrypting the authorization QR code based on the public key configured by the robot to obtain the target working key includes:
[0225] Calculate the verification hash value of the ciphertext in the authorization QR code;
[0226] If the verification hash value is the same as the initial hash value, decrypting the ciphertext based on the public key to obtain a decryption key and a decryption random number;
[0227] If the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key.
[0228] In some optional implementations, after decrypting the configuration QR code based on the target working key to obtain the target configuration item, the processor 1601 further executes:
[0229] In response to the end control QR code, the configuration is ended.
[0230] In some optional implementations, the processor 1601 further executes:
[0231] In response to the new authorization two-dimensional code, a new target working key is determined based on the new authorization two-dimensional code.
[0232] In some optional implementations, all target QR codes are generated by the server after generating the public key and the private key; or,
[0233] Any target QR code is generated by the server in response to a request for generating the target QR code sent by a target terminal and sent to the target terminal, and the target terminal is a terminal that matches the robot and is verified by the server; or
[0234] The partial target QR code is generated by the server after generating the public key and the private key, and the other partial target QR code is generated and sent to the target terminal in response to a generation request for the other partial target QR code sent by the target terminal;
[0235] Among them, the target two-dimensional code includes the authorization two-dimensional code, the trigger control two-dimensional code and the configuration two-dimensional code.
[0236] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0237] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. 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 data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. 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.
[0238] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising 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.
[0239] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions 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.
[0240] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0241] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A robot configuration method, characterized in that: Applied to a robot, the method comprises: In response to the authorization QR code, the authorization QR code is decrypted based on the public key configured by the robot to obtain a target working key; wherein the authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key; In response to the trigger control two-dimensional code, decrypt the trigger control two-dimensional code based on the target working key to obtain verification information, and perform verification based on the verification information; After the verification is passed, in response to the configuration QR code, the configuration QR code is decrypted based on the target working key to obtain the target configuration item.
2. The method according to claim 1, characterized in that The verification information includes a verification item and a verification feature corresponding to the verification item, wherein the verification item represents robot identification verification, face recognition verification or liveness verification; verification based on the verification information includes: Determine whether the verification feature matches the target feature corresponding to the verification item; wherein the target feature corresponding to the robot identification verification is a preset feature, and the target feature corresponding to the face recognition verification and the liveness verification is a collection feature; If they match, the verification passes; otherwise, the verification fails.
3. The method according to claim 1, characterized in that The verification information includes a verification item and a verification feature corresponding to the verification item; before decrypting the configuration QR code based on the target working key to obtain the target configuration item, the method further includes: Determine whether the configuration permission of the configuration QR code matches the verification item.
4. The method according to claim 1, characterized in that The authorization QR code is obtained in the following way: Asymmetrically encrypt the target working key and the random number corresponding to the target working key based on the private key to obtain a ciphertext; Performing QR code encoding based on the ciphertext and the initial hash value corresponding to the ciphertext to obtain the authorization QR code; Decrypting the authorization QR code based on the public key configured by the robot to obtain the target working key includes: Calculate the verification hash value of the ciphertext in the authorization QR code; If the verification hash value is the same as the initial hash value, decrypting the ciphertext based on the public key to obtain a decryption key and a decryption random number; If the key calculated based on the decryption random number is the same as the decryption key, the decryption key is used as the target working key.
5. The method according to claim 1, characterized in that After decrypting the configuration QR code based on the target working key to obtain the target configuration item, the method further includes: In response to the end control QR code, the configuration is ended.
6. The method according to claim 1, characterized in that Also includes: In response to the new authorization two-dimensional code, a new target working key is determined based on the new authorization two-dimensional code.
7. The method according to claim 1, characterized in that All target QR codes are generated by the server after generating the public key and the private key; or, Any target QR code is generated by the server in response to a request for generating the target QR code sent by a target terminal and sent to the target terminal, the target terminal being a terminal matched with the robot and verified by the server; or The partial target QR code is generated by the server after generating the public key and the private key, and the other partial target QR code is generated and sent to the target terminal in response to a generation request for the other partial target QR code sent by the target terminal; Among them, the target two-dimensional code includes the authorization two-dimensional code, the trigger control two-dimensional code and the configuration two-dimensional code.
8. A robot configuration device, characterized in that: Applied to robots, the device comprises: An authorization module is used to respond to the authorization QR code and decrypt the authorization QR code based on the public key configured by the robot to obtain a target working key; wherein the authorization QR code is obtained by asymmetrically encrypting the target working key based on the private key corresponding to the public key; A verification module, configured to respond to the trigger control two-dimensional code, decrypt the trigger control two-dimensional code based on the target working key, obtain verification information, and perform verification based on the verification information; The configuration module is used to, after verification, respond to the configuration QR code and decrypt the configuration QR code based on the target working key to obtain the target configuration item.
9. A robot, characterized in that: The method comprises at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer, and when the program is run on the computer, the computer is enabled to execute the method according to any one of claims 1 to 7.