Two-dimensional code encryption and decryption method and method for sharing configuration information among multiple electronic devices

By combining configuration file collectors and parsers, and using configuration definitions and keys to encrypt and decrypt QR codes, the problem of QR codes being unable to be transmitted in a targeted manner is solved, enabling secure and rapid sharing of configuration information among multiple electronic devices.

CN114139169BActive Publication Date: 2026-07-07SHENXUN COMP KUNSHAN +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENXUN COMP KUNSHAN
Filing Date
2020-09-04
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing QR codes cannot achieve targeted information delivery, especially when sharing configuration information among multiple electronic devices, as anyone can scan and obtain the information.

Method used

The configuration list is obtained through the configuration file collector, and after being encrypted using the configuration definition, key and credentials, it is encoded into a QR code. The configuration information is then decrypted and restored through the configuration file parser, ensuring that only electronic devices in the same group can decode it.

Benefits of technology

It enables the rapid and secure sharing of configuration information among multiple electronic devices without a network connection, preventing information leakage from unspecified groups.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139169B_ABST
    Figure CN114139169B_ABST
Patent Text Reader

Abstract

The present application discloses a two-dimensional code encryption method and a method for sharing configuration information among multiple electronic devices. The two-dimensional code encryption method is executed in an electronic device and includes the following steps. First, a configuration list of the electronic device is obtained by a configuration file collector, and the configuration list is converted into original instructions according to configuration definitions by a configuration file generator. Then, the original instructions are encoded into encoded instructions according to a key and a certificate by an encoding engine, and the encoded instructions are encoded into at least one QR code by a QR code encoder. Configuration definitions are used to describe the format and / or parsing rules adopted by the original instructions. The configuration definitions, the key and the certificate are shared with other electronic devices belonging to the same group as the electronic device, so that the generated QR code can achieve targeted information transmission. Therefore, the QR code of the present application can achieve targeted information transmission.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the field of QR codes, and in particular to a method for encrypting and decrypting QR codes and a method for sharing configuration information among multiple electronic devices. [Background Technology]

[0002] QR codes are widely used for information transmission. For example, mobile phones with cameras can scan QR codes to read hidden information by having a built-in or downloaded QR code reader. However, to improve readability, the information hidden in QR codes is not encrypted, making it impossible for QR codes to deliver targeted information. For instance, if the configuration information of an electronic device only needs to be shared with multiple electronic devices in the same group, it cannot be achieved through a QR code that anyone can scan and access. [Summary of the Invention]

[0003] To address the aforementioned technical problems, the first embodiment of the present invention provides a QR code encryption method, executed in an electronic device, comprising the following steps: First, obtaining a configuration list of the electronic device through a configuration file collector, and converting the configuration list into raw instructions according to the configuration definition through a configuration file generator; then, encoding the raw instructions into encoded instructions according to the key and credential through an encoding engine, and encoding the encoded instructions into at least one QR code through a QR code encoder.

[0004] The second embodiment of the present invention provides a QR code decryption method, which is executed in an electronic device and includes the following steps: First, at least one QR code is obtained through an image acquisition device, and the at least one QR code is decoded into an encoded instruction through a QR code decoder; then, the encoded instruction is decoded into an original instruction through a decoding engine based on a key and a credential, and the original instruction is restored into a configuration list through a configuration file parser based on the configuration definition.

[0005] A third embodiment of the present invention provides a method for sharing configuration information among multiple electronic devices, comprising the following steps: First, a first electronic device among these electronic devices obtains a configuration list of the first electronic device through a configuration file collector, and converts the configuration list into raw instructions according to the configuration definition through a configuration file generator; then, the first electronic device encodes the raw instructions into encoded instructions according to the key and credentials through an encoding engine, and encodes the encoded instructions into at least one QR code through a QR code encoder, and then publishes the at least one QR code to a second electronic device among these electronic devices.

[0006] To further understand the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are for reference and illustration only and are not intended to limit the present invention. [Attached Image Description]

[0007] Figure 1 This is a flowchart of the steps of the QR code encryption method according to the first embodiment of the present invention.

[0008] Figure 2 This is a flowchart of the steps of the QR code decryption method according to the second embodiment of the present invention.

[0009] Figure 3 This is a schematic diagram of multiple electronic devices sharing configuration information according to the third embodiment of the present invention.

Detailed Implementation Methods

[0010] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content provided in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the concept of the present invention. Furthermore, the accompanying drawings of the present invention are for simple illustrative purposes only and are not depictions of actual dimensions; this is stated in advance. The following embodiments will further describe the relevant technical content of the present invention in detail, but the content provided is not intended to limit the scope of protection of the present invention.

[0011] Please also refer to Figure 1 and Figure 3 , Figure 1 This is a flowchart of the steps of the QR code encryption method according to the first embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the sharing of configuration information among multiple electronic devices according to a third embodiment of the present invention. It should be noted that... Figure 1 The QR code encryption method can be executed in Figure 3 In the electronic device 10, and for ease of understanding, Figure 3 The electronic device 10 is represented by a functional block to indicate its execution. Figure 1 The process of QR code encryption method. For example... Figure 3 As shown, the electronic device 10 may be a portable computer, but the present invention is not limited thereto, and it includes a configuration file collector 102, a configuration file generator 103, an encoding engine 104, and a QR code encoder 105.

[0012] The configuration file collector 102, configuration file generator 103, encoding engine 104, and QR code encoder 105 can be implemented using pure hardware circuitry, or using hardware circuitry in conjunction with firmware or software. In summary, this invention does not limit the specific implementation of the electronic device 10, and the electronic device 10 can begin execution in response to a user interface (UI) 101. Figure 1 The present invention describes a QR code encryption method, but it does not limit the specific implementation of the user interface 101. Additionally, as... Figure 1As shown, in step S110, the electronic device 10 obtains the configuration list of the electronic device 10 through the configuration file collector 102, and in step S120, the configuration file generator 103 converts the configuration list into raw instructions according to the configuration definition 30.

[0013] For example, the configuration list can contain the camera's parameter configuration information, including settings such as aperture, shutter speed, ISO, and white balance. Therefore, when it is necessary to share the camera's parameter configuration information, the electronic device 10 can obtain its camera's parameter configuration information through the configuration file collector 102. Specifically, the configuration file collector 102 can obtain the current camera's parameter configuration information, i.e., the configuration list of the electronic device 10, through an application programming interface (API) or by reading configuration files.

[0014] Configuration definition 30 describes the format and / or parsing rules used by the original instructions. For example, the original instructions may be written in XML, JSON, or other special formats. In summary, the content of configuration definition 30, i.e., the format and / or parsing rules used by the original instructions, is determined by the user of electronic device 10. Configuration definition 30 will be shared with other electronic devices belonging to the same group as electronic device 10, so that other electronic devices in different groups will not be able to restore the original instructions to the configuration list of electronic device 10, or will restore meaningless content, because they do not have configuration definition 30.

[0015] In one embodiment, the content of configuration definition 30 can be determined according to the content agreed upon by users belonging to the same group. In one embodiment, the content of configuration definition 30 can be obtained from a common database accessible only to the same group. In one embodiment, the content of configuration definition 30 can be transmitted to the recipient by a publisher among the users in a manner accessible only to the same group. In one embodiment, the publisher can design or determine different configuration definitions 30 for different groups, so that each group can enjoy its own group-specific configuration definition 30. In one embodiment, the publisher can be a user who does not belong to any specific group; or it can be a single or multiple users who belong to a specific group. In one embodiment, each group can have its own single or multiple publishers to share configuration definition 30.

[0016] Next, in step S130, electronic device 10 encodes the original instruction into an encoded instruction using encoding engine 104 based on the key and credential 40, and in step S140, the encoded instruction is encoded into at least one QR code using QR code encoder 105. Similarly, the key and credential 40 are also shared with other electronic devices belonging to the same group as electronic device 10, so that other electronic devices in different groups will be unable to decode the encoded instruction back to the original instruction, or will decode meaningless content, because they do not possess the key and credential 40. In one embodiment, the sharing of the key and credential 40 can be done in the same way as the sharing in configuration definition 30, to users and other electronic devices belonging to the same group.

[0017] like Figure 3 As shown, configuration definition 30, key, and credential 40 are shared with electronic device 20 belonging to the same group as electronic device 10, enabling electronic device 20 to decrypt the QR code issued by electronic device 10 based on configuration definition 30, key, and credential 40. Therefore, compared to the prior art, the QR code generated by this embodiment of the invention can achieve targeted information transmission. It should be noted that electronic device 10 and electronic device 20 may be classified into the same group because they have the same camera application software installed, but this invention is not limited to this.

[0018] Furthermore, this invention does not limit the specific implementation method of the electronic device 10 publishing the QR code. This invention also does not limit the specific implementation method of sharing the configuration definition 30, key, and credential 40 with the electronic device 20. In one implementation, the configuration definition 30, key, and credential 40 used by the electronic device 10 can be published to other electronic devices 20 in the same group via another QR code. In other words, the information implicitly contained in this other QR code is the configuration definition 30, key, and credential 40, so the electronic device 20 must first obtain the configuration definition 30, key, and credential 40 shared with the electronic device 10 by scanning this other QR code, but this invention is not limited thereto.

[0019] Generally, QR codes only support plain text encoding, but some parameter configuration information is implemented using binary code, so... Figure 3 The encoding engine 104 also has a built-in converter (not shown) to convert binary code into plain text format. Furthermore, compared to existing technologies, when the length of the encoded instruction exceeds the string length supported by a QR code, Figure 3 The QR code encoder 105 will encode multiple QR codes, but for ease of understanding, Figure 3 The diagram is just an example of a QR code encoded by the QR code encoder 105.

[0020] In contrast, please also refer to Figure 2 and Figure 3 , Figure 2This is a flowchart illustrating the steps of the QR code decryption method according to the second embodiment of the present invention. That is to say, Figure 2 The QR code decryption method can be executed in Figure 3 In the electronic device 20, and for ease of understanding, Figure 3 The electronic device 20 is represented by a functional block to indicate its execution. Figure 2 The process of decrypting a QR code. For example... Figure 3 As shown, the electronic device 20 can also be a portable computer, but the present invention is not limited thereto, and it includes an image acquisition device 202, a QR code decoder 203, a decoding engine 204, and a configuration file parser 205.

[0021] The image acquisition device 202, QR code decoder 203, decoding engine 204, and configuration file parser 205 can be implemented using pure hardware circuitry, or using hardware circuitry combined with firmware or software. In summary, this invention does not limit the specific implementation of the electronic device 20, and the electronic device 20 can begin execution in response to the user interface 201. Figure 2 The present invention provides a QR code decryption method, but does not limit the specific implementation of the user interface 201. Additionally, as... Figure 2 As shown, in step S210, the electronic device 20 acquires at least one QR code through the image acquisition device 202, and in step S220, the QR code decoder 203 decodes the at least one QR code into an encoded instruction.

[0022] Next, in step S230, the electronic device 20 decodes the encoded instructions into original instructions using the decoding engine 204 based on the key and credential 40. Then, in step S240, the configuration file parser 205 restores the original instructions into a configuration manifest based on the configuration definition 30. Furthermore, compared to the configuration file collector 102 of the electronic device 10, the electronic device 20 also includes a configuration file dispatcher 206, used to deploy the configuration manifest restored from the original instructions—that is, the configuration manifest of the electronic device 10—via API or other means.

[0023] Similarly, Figure 3 The decoding engine 204 also has a built-in converter (not shown) to convert plain text format into binary code, and when the length of the encoding instruction exceeds the string length supported by a QR code, the image acquisition device 202 will acquire more than one QR code. Since the details have been described in the QR code encryption method, they will not be repeated here.

[0024] In summary, embodiments of the present invention provide a method for encrypting and decrypting QR codes and a method for sharing configuration information among multiple electronic devices. The QR code encryption method involves obtaining the configuration information of a first electronic device, first converting the configuration information according to a configuration definition, then encrypting the converted configuration information using a key and credentials, and finally encoding the encrypted information into at least one QR code. The configuration definition describes the format and / or parsing rules used in the converted configuration information. The configuration definition, key, and credentials are shared with second electronic devices belonging to the same group as the first electronic device. This ensures that other electronic devices in different groups, lacking the configuration definition, key, and credentials, cannot decrypt the at least one QR code issued by the first electronic device to restore the configuration information of the first electronic device, or they may decrypt and restore meaningless content. Therefore, compared with the prior art, the QR codes generated by embodiments of the present invention can achieve targeted information transmission.

[0025] This invention enables mass deployment without a network connection and automatically retrieves pre-defined content from the system. Deployment can be achieved by configuring only one electronic device, and can then be implemented on multiple other devices. Furthermore, the QR codes generated by this invention are specially encoded, making them undecipherable or meaningless to unauthorized individuals. In addition, the modular design allows for rapid application to various scenarios, enabling simple and quick deployment of the same configuration list across a large number of electronic devices.

[0026] The above-described content is merely a preferred embodiment of the present invention and is not intended to limit the scope of the patent application of the present invention. Therefore, all equivalent technical changes made using the description and drawings of the present invention are included within the scope of the patent application of the present invention.

Claims

1. A QR code encryption method, executed in an electronic device, characterized in that, The QR code encryption method includes: A configuration list of the electronic device is obtained through a configuration file collector, and the configuration list is converted into a raw instruction according to a configuration definition through a configuration file generator; wherein the content of the configuration definition is determined according to the content agreed upon by users belonging to the same group. The original instruction is encoded into an encoded instruction based on the key and credential using an encoding engine, and then encoded into at least one QR code using a QR code encoder. When the length of the encoded instruction exceeds the string length supported by a QR code, the at least one QR code encoded by the QR code encoder is multiple QR codes. The configuration definition, the key, and the credentials will be shared with electronic devices belonging to the same group as the electronic device; The encoding engine also includes a built-in converter to convert binary code into plain text format.

2. The QR code encryption method as described in claim 1, characterized in that, The electronic device responds to a user interface to begin executing the QR code encryption method.

3. The QR code encryption method as described in claim 1, characterized in that, The configuration file collector can obtain the configuration list of the electronic device through the application programming interface or by reading the configuration file.

4. The QR code encryption method as described in claim 1, characterized in that, This configuration definition describes the format and / or parsing rules used by the original instruction.

5. The QR code encryption method as described in claim 4, characterized in that, The format and / or parsing rules used in the original instruction are determined by the user of the electronic device, and the configuration definition will be shared with other electronic devices belonging to the same group as the electronic device.

6. A QR code decryption method, executed in an electronic device, characterized in that, The QR code decryption method includes: At least one QR code is acquired by an image acquisition device, and the at least one QR code is decoded into an encoded instruction by a QR code decoder. A decoding engine decodes the encoded instruction into a raw instruction based on the key and credentials, and a configuration file parser restores the raw instruction into a configuration list based on a configuration definition. The content of the configuration definition is determined according to the content agreed upon by users belonging to the same group. When the length of the encoded instruction exceeds the string length supported by a QR code, the image acquisition device acquires at least one QR code as multiple QR codes. The configuration definition, the key, and the credentials will be shared with electronic devices belonging to the same group as the electronic device; The decoding engine also includes a built-in converter to convert plain text format into binary code.

7. The QR code decryption method as described in claim 6, characterized in that, The electronic device responds to a user interface to begin executing the QR code decryption method.

8. The QR code decryption method as described in claim 6, characterized in that, This configuration definition describes the format and / or parsing rules used by the original instruction.

9. A method for sharing configuration information among multiple electronic devices, characterized in that, The method includes: The first electronic device among the plurality of electronic devices obtains a configuration list of the first electronic device through a configuration file collector, and converts the configuration list into a raw instruction according to a configuration definition through a configuration file generator; wherein, the content of the configuration definition is determined according to the content agreed upon by users belonging to the same group; The first electronic device uses an encoding engine to encode the original instruction into an encoded instruction based on the key and credential, and uses a QR code encoder to encode the encoded instruction into at least one QR code, and then publishes the at least one QR code to the second electronic device among the plurality of electronic devices; when the length of the encoded instruction exceeds the string length supported by a QR code, the at least one QR code encoded by the QR code encoder becomes multiple QR codes, and the image acquisition device acquires the multiple QR codes; The configuration definition, the key, and the credentials will be shared with electronic devices belonging to the same group as the electronic device; The encoding and decoding engines each have a built-in converter to convert binary code into plain text format or plain text format into binary code.

10. The method for sharing configuration information among multiple electronic devices as described in claim 9, characterized in that, The method also includes: The second electronic device acquires the at least one QR code through an image acquisition device and decodes the at least one QR code into the encoded instruction through a QR code decoder. The second electronic device uses a decoding engine to decode the encoded instruction into the original instruction based on the key and the credential, and uses a configuration file parser to restore the original instruction into the configuration list based on the configuration definition. Then, it uses a configuration file dispatcher to deploy the configuration list.

11. The method for sharing configuration information among multiple electronic devices as described in claim 9, characterized in that, This configuration definition describes the format and / or parsing rules used by the original instruction.

12. The method for sharing configuration information among multiple electronic devices as described in claim 11, characterized in that, The format and / or parsing rules used in the original instruction are determined by the user of the first electronic device.