CN112990910A - Two-dimensional code generation method, related device and computer storage medium - Google Patents
Two-dimensional code generation method, related device and computer storage medium Download PDFInfo
- Publication number
- CN112990910A CN112990910A CN202011566805.4A CN202011566805A CN112990910A CN 112990910 A CN112990910 A CN 112990910A CN 202011566805 A CN202011566805 A CN 202011566805A CN 112990910 A CN112990910 A CN 112990910A
- Authority
- CN
- China
- Prior art keywords
- dimensional code
- trigger data
- generating
- projection unit
- trigger
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000004590 computer program Methods 0.000 claims description 5
- 230000001960 triggered effect Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 abstract description 13
- 238000013478 data encryption standard Methods 0.000 description 25
- 238000004422 calculation algorithm Methods 0.000 description 20
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 6
- 239000011521 glass Substances 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 229910002056 binary alloy Inorganic materials 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003370 grooming effect Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000005693 optoelectronics Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/32—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
- G06Q20/327—Short range or proximity payments by means of M-devices
- G06Q20/3274—Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being displayed on the M-device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06037—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0435—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0442—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/045—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/12—Picture reproducers
- H04N9/31—Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
- H04N9/3141—Constructional details thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/12—Picture reproducers
- H04N9/31—Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
- H04N9/3141—Constructional details thereof
- H04N9/315—Modulator illumination systems
- H04N9/3161—Modulator illumination systems using laser light sources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/12—Picture reproducers
- H04N9/31—Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
- H04N9/3141—Constructional details thereof
- H04N9/317—Convergence or focusing systems
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Optics & Photonics (AREA)
- Accounting & Taxation (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a two-dimensional code generation method, a related device and a computer storage medium, wherein the method comprises the following steps: generating trigger data by receiving a two-dimensional code trigger signal; generating a two-dimensional code based on the trigger data; and the two-dimensional code is projected to a fixed interface of an external environment through a projection unit. Therefore, the commodity payment process is realized by using the virtual reality display equipment, and the user experience is optimized.
Description
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a two-dimensional code generation method, a related apparatus, and a computer storage medium.
Background
Along with the development of the internet, electronic payment is more and more common, the situation that people carry cash with them is less and less at present, and electronic payment has two expression forms at present: static two-dimensional codes (e.g., two-dimensional codes that a merchant posts near an item) and dynamic two-dimensional codes (e.g., two-dimensional codes that are automatically generated in a WeChat payment). At present, two-dimensional codes for payment can be generated and displayed in electronic equipment such as a mobile phone, but the virtual reality display equipment cannot generate the two-dimensional codes.
Disclosure of Invention
The embodiment of the application provides a two-dimensional code generation method, a related device and a computer storage medium.
In a first aspect, an embodiment of the present application provides a two-dimensional code generation method, where the two-dimensional code generation method is applied to a virtual reality display device, where the virtual reality display device includes a projection unit, and the method includes:
receiving a two-dimensional code trigger signal to generate trigger data;
generating a two-dimensional code based on the trigger data;
and projecting the two-dimensional code to a fixed interface of an external environment through the projection unit.
In a second aspect, an embodiment of the present application provides a two-dimensional code generating apparatus, where the two-dimensional code generating apparatus is applied to a virtual reality display device, where the virtual reality display device includes a projection unit, the apparatus includes:
the first generation module is used for receiving a two-dimensional code trigger signal and generating trigger data;
the second generation module is used for generating a two-dimensional code based on the trigger data;
and the releasing module is used for releasing the two-dimensional code to a fixed interface of an external environment through the projection unit.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory;
wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
in the embodiment of the application, the trigger data can be generated by receiving the two-dimensional code trigger signal; generating a two-dimensional code based on the trigger data; and the two-dimensional code is projected to a fixed interface of an external environment through a projection unit. Therefore, the commodity payment process is realized by using the virtual reality display equipment, and the user experience is optimized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic view of a virtual reality display device provided in an embodiment of the present application;
fig. 2 is an application scene diagram of a two-dimensional code generation method according to an embodiment of the present application;
fig. 3 is a system architecture diagram of a two-dimensional code generation method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a two-dimensional code generation method according to an embodiment of the present application;
fig. 5 is a schematic flowchart of another two-dimensional code generation method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a two-dimensional code generating apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated object, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Fig. 1 shows a schematic diagram of a virtual reality display device applied to an embodiment of the present application. As shown in fig. 1, the virtual reality display device 11 may include an electronic information display screen, which may be used to display information generated by various applications in the virtual reality display device, such as a WeChat or Paibao generated two-dimensional code. Wherein the content of the first and second substances,
the virtual reality display device 11 may be a head mounted display device, or simply a head mounted display, that sends optical signals to the eye through various head mounted display devices in different ways, including, but not limited to: different effects such as Virtual Reality (VR), Augmented Reality (AR), Mixed Reality (MR) and the like are achieved.
The VR head display (VR head display for short) or VR glasses are products integrated by various technologies such as simulation technology and computer graphics man-machine interface technology multimedia technology sensing technology network technology, and are a brand-new man-machine interaction means created by computer and latest sensor technology. MR is the application of virtual information to the real world, where real environment and virtual objects coexist superimposed on the same picture or space in real time. Mixed reality is the merging of the real world and the virtual world to create a new environment and to conform to the common visual perception of virtual images, in which the objects in the real world can co-exist with the objects in the virtual world and interact instantly.
Fig. 2 exemplarily shows an application scenario diagram of the two-dimensional code generation method provided in the embodiment of the present application. As shown in fig. 2, the virtual reality display device 21 may include a projection unit, and a user may project information in the electronic information display screen of the virtual reality display device 21 to a fixed interface of an external environment through the projection unit, for example, the two-dimensional code 22 projected to a wall surface in fig. 2.
Fig. 3 is a system architecture diagram of a two-dimensional code generation method applied to an embodiment of the present application. As shown in fig. 3, an executing subject of the embodiment of the present application is a terminal, the terminal has an electronic device with a display screen, and the terminal includes but is not limited to: a virtual reality display device, a handheld device, a personal computer, a tablet computer, an in-vehicle device, a smart phone, a computing device, or other processing device connected to a wireless modem, etc. The terminal devices in different networks may be called different names, for example: user equipment, access terminal, user unit, subscriber station, mobile station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user equipment, cellular telephone, cordless telephone, Personal Digital Assistant (PDA), terminal equipment in a 5th generation mobile network or future evolution network, and the like. The terminal system refers to an operating system which can run on the terminal, is a program for managing and controlling terminal hardware and terminal applications, and is an indispensable system application of the terminal. The system comprises but is not limited to Android system, IOS system, Windows Phone (WP) system, Ubuntu mobile version operating system and the like.
According to some embodiments, the terminal may be connected to the server through a network. The network is used to provide a communication link between the terminal and the server. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. It should be understood that the number of terminals, networks, and servers in fig. 3 is merely illustrative. There may be any number of terminals, networks and servers, as desired for the reality. For example, the server may be a server cluster composed of a plurality of servers. The user can use the terminal to interact with the server through the network so as to obtain the two-dimensional code and the like thrown to the fixed interface.
Next, the two-dimensional code generation method provided in the embodiment of the present application is described with reference to the virtual reality display device shown in fig. 1, the application scenario of the two-dimensional code generation method shown in fig. 2, and the system architecture of the two-dimensional code generation method shown in fig. 3. Fig. 4 exemplarily shows a flowchart of a two-dimensional code generation method provided in an embodiment of the present application. As shown in fig. 4, the method for detecting surface defects of an object may include at least the following steps:
s401, receiving a two-dimensional code trigger signal to generate trigger data.
The two-dimensional code triggering signal is used for representing a signal generated by triggering when a user needs to use a two-dimensional code in application software, for example, when the user purchases a commodity, the user needs to provide the two-dimensional code which can be used for commodity payment to a merchant, the user needs to start a corresponding application program in an electronic information display screen of the virtual reality display device, after the application program is initialized, a payment option is clicked, and the virtual reality display device can receive the two-dimensional code triggering signal to generate triggering data.
S402, generating a two-dimensional code based on the trigger data.
Possibly, the application software that generates the two-dimensional code requires a "two-dimensional code generator" tool, which works on the principle of using a matrix of numbers arranged with 1's and 0's to produce the verification function.
Specifically, the two-dimensional code records data symbol information by black and white alternate patterns distributed on a plane (in a two-dimensional direction) according to a certain rule by using a certain specific geometric figure; the concept of '0' and '1' bit stream which forms the internal logic base of computer is skillfully utilized in coding, a plurality of geometric shapes corresponding to binary system are used for representing literal numerical information, and the information is automatically read by an image input device or an optoelectronic scanning device to realize automatic information processing, and the method has some commonalities of bar code technology: each code system has its specific character set; each character occupies a certain width; has certain checking function and the like. Meanwhile, the method has the characteristics of automatic identification function of information of different rows, processing of figure rotation change and the like. The two-dimensional code can express information in both the horizontal and vertical directions, and thus can express a large amount of information in a small area.
And S403, the two-dimensional code is projected to a fixed interface of an external environment through a projection unit.
The external environment can be a fixed interface which is convenient for a merchant to scan and recognize codes, such as a wall surface and a counter of the merchant.
Possibly, the projection unit may include an image display element and a lens. The projection unit first irradiates light to the image display element to generate an image, and then projects the image through the lens. The image display element of the projection unit may include both a transmissive type that generates an image using light transmission and a reflective type that generates an image using reflected light. However, in either type, the light from the projection lamp is divided into three colors, red, green, and blue, and images of various colors are generated. Since the element itself can perform only a single color display, 3 elements are used to generate 3 color components, respectively. Then the 3 color images are synthesized into an image through a prism, and finally the image is projected to a fixed interface through a lens to form a two-dimensional code.
Illustratively, after the cashier finishes scanning all the articles, the amount to be paid is generated according to the price information of the articles calculated by the cash register device, and the two-dimensional codes put in by the consumer through the VR glasses are identified by a scanner carried by the cash register device to finish the payment process.
In the embodiment of the application, the trigger data can be generated by receiving the two-dimensional code trigger signal; generating a two-dimensional code based on the trigger data; and the two-dimensional code is projected to a fixed interface of an external environment through a projection unit. Therefore, the commodity payment process is realized by using the virtual reality display equipment, and the user experience is optimized.
In some embodiments, before generating the two-dimensional code based on the trigger data, an embodiment of the present application may further include: the trigger data is encrypted to generate encrypted trigger data.
Fig. 5 exemplarily shows a flowchart of a two-dimensional code generation method provided in an embodiment of the present application. As shown in fig. 5, the two-dimensional code generation method may include at least the following steps:
s501, receiving a two-dimensional code trigger signal to generate trigger data.
Specifically, S501 is identical to S401, and is not described herein again.
S502, the trigger data is encrypted to generate encrypted trigger data.
Possibly, the embodiment of the present application may use a DES (Data Encryption Standard, american Data Encryption Standard) algorithm or an RSA algorithm (RSA algorithm), or may use a mixed algorithm of DES and RSA.
S503, the encrypted trigger data is decrypted to obtain decrypted trigger data.
In particular, DES is a block encryption algorithm, and a typical DES uses 64-bit blocks to encrypt data, and the same algorithm is used for encryption and decryption. Its key length is 56 bits (since every 8 th bit is used as parity), and the key can be any number of 56 bits and can be changed at any time.
The algorithm framework for DES encryption is as follows:
firstly, a set of encryption keys is generated, a 64-bit-long password is obtained from a user, and then a set of 16 encryption keys is formed through halving, shifting, selecting and iterating and is used in each round of operation.
DES operates on a 64-bit (bit) plaintext block M, which is permuted to M0 by an initial permutation IP. M0 is divided into left and right halves m0 ═ L0, R0, each 32 bits long. Then 16 rounds of exactly the same operations (iterations) are performed, these operations being called functions f, the data being combined with the corresponding key during each round.
In each round, the key is shifted by 48 bits, and then the key is selected from the 56 bits. The right half of the data is expanded to 48 bits by an expansion permutation and replaced with new 48 bits of data by an exclusive or operation, which is then packed and permuted to 32 bits. These four steps constitute the function f. Then, the output of the function f is combined with the left half by another exclusive-or operation, the result becomes a new right half, and the original right half becomes the new left half. This operation was repeated 16 times.
After 16 iterations, the left and right halves are combined together and subjected to a final permutation (data grooming), thus completing the encryption process.
Specifically, the algorithm of RSA is described as follows:
1. RSA generates public and private key pairs
Specific examples teach how to generate a key pair
1.1, randomly selecting two unequal prime numbers p and q.
alice selects 61 and 53. (in practice, the greater these two prime numbers, the harder it is to break.)
1.2, calculating the product n of p and q. n 61 × 53 3233
The length of n is the key length. 3233 the binary number is 110010100001, which has a total of 12 bits, so this key is 12 bits. In practical applications, the RSA key is generally 1024 bits, and in important cases 2048 bits.
1.3 computing the Euler function of nCalled L according to the formulaalice calculationEqual to 60 x 52, 3120.
1.4, randomly choosing an integer e, i.e. the one of the public keys used for encryption, is And e andare relatively prime. alice is between 1 and 3120 and has randomly chosen 17. (in practice, 65537 is often chosen.)
1.5, calculate e forModulo element d. That is, the number of the key used for decryption, the so-called "modulo element", is the integer d that allows ed to be decryptedThe remainder of the division is 1. ed ≡ 1 (mod)) alice finds 2753, i.e., 17 x 2753mode 3120-1.
1.6, encapsulating n and e into a public key and encapsulating n and d into a private key.
In alice, since n is 3233, e is 17, and d is 2753, the public key is (3233,17) and the private key is (3233,2753).
2. RSA encryption
Firstly, bit string grouping is carried out on plaintext, so that the decimal number corresponding to each group is smaller than n, then encryption is carried out on each group m in sequence, a sequence formed by ciphertext of all groups is the encryption result of an original message, namely m satisfies 0< ═ m < n, and then the encryption algorithm is as follows: c ≡ m ^ e mode n; c is ciphertext, and 0< ═ c < n.
3. RSA decryption
For ciphertext 0< ═ c < n, the decryption algorithm is: m ≡ c ^ d mod n.
Specifically, the hybrid algorithm of DES and RSA is described as follows:
1. encryption scheme basic principle of DES and RSA mixed encryption algorithm
The method comprises the steps of encrypting a plain document by using a DES encryption algorithm method, and simultaneously encrypting a DES key by using an RSA encryption algorithm method.
2. Encryption scheme implementation step of DES and RSA mixed encryption algorithm
2.1 Generation of DES encryption Key k
To improve the security of the data, each key k is used only once.
2.2 generating a Key ck for encrypting plaintext
And encrypting the key k of the DES by using a public encryption key of an RSA encryption algorithm to form a key ck encrypted by the DES, and storing the key ck.
2.3 generating ciphertext c
And performing DES encryption on the plaintext p by using the generated key ck to generate a ciphertext.
3. Decryption scheme basic principle of mixed encryption algorithm based on DES and RSA
And decrypting the ciphertext by using a DES algorithm, and simultaneously decrypting the DES key by using an RSA algorithm.
4. Specific implementation steps of decryption scheme based on DES and RSA mixed encryption algorithm
And 4.1, obtaining an encryption key ck.
4.2 generating Key k for DES decryption
And decrypting the key ck of DES by using a decryption key of RSA to form a key k decrypted by DES.
4.3 generating a plaintext p
And performing DES decryption on the ciphertext c by using the generated key k to generate a plaintext file.
And S504, generating a two-dimensional code based on the decrypted trigger data.
Specifically, S504 is identical to S402, and is not described here.
And S505, the two-dimensional code is projected to a fixed interface of an external environment through a projection unit.
Specifically, S505 is identical to S403, and is not described herein again.
In a specific example, the application program sends a payment request to the background, the background receives the payment request, the two-dimensional code is generated through a payment link by inquiring from the database, and then the two-dimensional code is sent to the front end, and the front end receives data and displays the data into the two-dimensional code. The VR glasses receive the encrypted trigger data, generate the two-dimensional code through decryption, and finally project the two-dimensional code onto the fixed interface, the application program needs to inform the driver to open the projection unit, and after the projection unit is started, the current interface is projected onto the fixed interface.
Therefore, the embodiment of the application can prevent the trigger data from being stolen by criminals by encrypting the transmitted trigger data, thereby protecting the safety of the fund account of the user and improving the user experience.
In some embodiments, after the step of generating the two-dimensional code based on the trigger data, before the two-dimensional code is released to a fixed interface of an external environment through a projection unit, the embodiment of the present application may further include the step of: receiving a releasing instruction triggered by a user; and starting the projection unit based on the throwing instruction.
The projection instruction may correspond to a first projection mode or a second projection mode, and specifically, the output directions of the output light in the first projection mode and the output directions of the output light in the second projection mode are different. The projection instruction is generated by the virtual reality display device according to the received user operation, for example, the user performs operation control on a physical key or a graphical interactive interface on the virtual reality display device, the virtual reality display device collects the operations and generates a corresponding projection instruction, further, the projection unit can monitor the current posture or posture change of the virtual reality display device by using the monitoring unit and send the monitored information to the virtual reality display device to generate a related projection instruction.
In some embodiments, the two-dimensional code in the display interface may be further projected to a fixed interface of an external environment through the projection unit.
Wherein, the projection unit may be an infrared laser device to project the virtual input unit of infrared rays onto a fixed interface of an external environment.
In a particular implementation, the fixed interface of the external environment may be a support surface, for example, the output light of the projection device may be projected on a back wall or ceiling.
Specifically, in the embodiment of the present application, a single camera with only one light sensor carried by the projection unit identifies visible light and infrared light in a time-sharing manner to implement an autofocus and infrared identification application. The embodiment of the application can realize projection automatic focusing and infrared light spot coordinate positioning by switching the cameras of the single light sensor of the double infrared filters in a time-sharing manner through the controller.
The projection automatic focusing is switched in a time-sharing mode to respond to the mobile vibration information transmitted by a preset flow or an acceleration sensor or a gyroscope in a starting-up starting program, and the sharpness reaching experience value is quickly approached by recognizing the scanning edge value of the displacement of the image sharpness driving motor in a specific range.
Fig. 6 is a schematic structural diagram of a two-dimensional code generating apparatus according to an exemplary embodiment of the present application. The two-dimensional code generating device may be disposed in an electronic device such as a terminal device, and execute the two-dimensional code generating method according to any of the embodiments described above. As shown in fig. 6, the two-dimensional code generating apparatus is applied to a virtual reality display device, the virtual reality display device includes a projection unit, and the apparatus includes:
the first generating module 61 is configured to receive a two-dimensional code trigger signal and generate trigger data;
a second generating module 62, configured to generate a two-dimensional code based on the trigger data;
and the releasing module 63 is used for releasing the two-dimensional code to a fixed interface of an external environment through the projection unit.
In the embodiment of the application, the trigger data can be generated by receiving the two-dimensional code trigger signal; generating a two-dimensional code based on the trigger data; and the two-dimensional code is projected to a fixed interface of an external environment through a projection unit. Therefore, the commodity payment process is realized by using the virtual reality display equipment, and the user experience is optimized.
In some possible embodiments, before the first generating module 61, the apparatus further includes: and the receiving module is used for receiving a payment request of a user and generating the two-dimensional code trigger signal.
In some possible embodiments, after the first generating module 61 and before the second generating module 62, the apparatus further includes: and the encryption module is used for encrypting the trigger data to generate encrypted trigger data.
In some possible embodiments, the second generating module 62 includes:
an obtaining unit, configured to decrypt the encrypted trigger data to obtain decrypted trigger data;
a generating unit configured to generate the two-dimensional code based on the decrypted trigger data.
In some possible embodiments, the virtual reality display device includes a display interface;
the device further comprises: and the display module is used for displaying the two-dimensional code on the display interface.
In some possible embodiments, after the second generating module 62 and before the releasing module 63, the apparatus further includes:
the receiving unit is used for receiving a releasing instruction triggered by a user;
and the starting unit is used for starting the projection unit based on the putting instruction.
In some possible embodiments, the releasing module 63 is specifically configured to: and the two-dimensional code in the display interface is released to a fixed interface of the external environment through the projection unit.
It should be noted that, when the two-dimensional code generating apparatus provided in the foregoing embodiment executes the two-dimensional code generating method, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed to different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the functions described above. In addition, the two-dimensional code generation device provided by the above embodiment and the two-dimensional code generation method embodiment belong to the same concept, and details of implementation processes thereof are referred to as method embodiments, and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 7, the electronic device 70 may include: at least one processor 71, at least one network interface 74, a user interface 73, a memory 75, at least one communication bus 72.
Wherein a communication bus 72 is used to enable the connection communication between these components.
The user interface 73 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 73 may also include a standard wired interface and a wireless interface.
The network interface 74 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
The Memory 75 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 75 includes a non-transitory computer-readable medium. The memory 75 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 75 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like involved in the above respective method embodiments. The memory 75 may alternatively be at least one memory device located remotely from the processor 71. As shown in fig. 7, the memory 75, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a two-dimensional code generation application program.
In the electronic device 70 shown in fig. 7, the user interface 73 is mainly used as an interface for providing input for a user to acquire data input by the user; the processor 71 may be configured to call an application program generated by the two-dimensional code stored in the memory 75, and specifically perform the following operations:
receiving a two-dimensional code trigger signal to generate trigger data;
generating a two-dimensional code based on the trigger data;
and projecting the two-dimensional code to a fixed interface of an external environment through the projection unit.
In the embodiment of the application, the trigger data can be generated by receiving the two-dimensional code trigger signal; generating a two-dimensional code based on the trigger data; and the two-dimensional code is projected to a fixed interface of an external environment through a projection unit. Therefore, the commodity payment process is realized by using the virtual reality display equipment, and the user experience is optimized.
In a possible embodiment, the processor 71 further performs, before performing receiving the two-dimensional code trigger signal to generate the trigger data: and receiving a payment request of a user to generate the two-dimension code trigger signal.
In a possible embodiment, after performing receiving the trigger data generated by the two-dimensional code trigger signal, and before performing generating the two-dimensional code based on the trigger data, the processor 71 further performs: and encrypting the trigger data to generate encrypted trigger data.
In a possible embodiment, when the processor 71 executes the generation of the two-dimensional code based on the trigger data, specifically:
decrypting the encrypted trigger data to obtain decrypted trigger data;
generating the two-dimensional code based on the decrypted trigger data.
In one possible embodiment, the virtual reality display device includes a display interface;
the processor 71 further performs: and displaying the two-dimensional code on the display interface.
In a possible embodiment, the processor 71 further performs, after performing generating the two-dimensional code based on the trigger data and before projecting the two-dimensional code to a fixed interface of an external environment through the projection unit:
receiving a release instruction triggered by a user;
and starting the projection unit based on the throwing instruction.
In a possible embodiment, the processor 71, when executing the projection of the two-dimensional code to a fixed boundary of an external environment through the projection unit, specifically executes: and the two-dimensional code in the display interface is released to a fixed interface of the external environment through the projection unit.
Embodiments of the present application also provide a computer-readable storage medium having stored therein instructions, which when executed on a computer or a processor, cause the computer or the processor to perform one or more of the steps in the embodiments shown in fig. 4-5 described above. The constituent modules of the two-dimensional code generating apparatus may be stored in the computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. And the aforementioned storage medium includes: various media capable of storing program codes, such as a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk. The technical features in the present examples and embodiments may be arbitrarily combined without conflict.
The above-described embodiments are merely preferred embodiments of the present application, and are not intended to limit the scope of the present application, and various modifications and improvements made to the technical solutions of the present application by those skilled in the art without departing from the design spirit of the present application should fall within the protection scope defined by the claims of the present application.
Claims (10)
1. A two-dimensional code generation method is applied to a virtual reality display device, the virtual reality display device comprises a projection unit, and the method comprises the following steps:
receiving a two-dimensional code trigger signal to generate trigger data;
generating a two-dimensional code based on the trigger data;
and projecting the two-dimensional code to a fixed interface of an external environment through the projection unit.
2. The method of claim 1, wherein prior to receiving the two-dimensional code trigger signal to generate the trigger data, the method further comprises: and receiving a payment request of a user to generate the two-dimension code trigger signal.
3. The method of claim 1, wherein after receiving the two-dimensional code trigger signal to generate trigger data and before generating the two-dimensional code based on the trigger data, the method further comprises: and encrypting the trigger data to generate encrypted trigger data.
4. The method of claim 3, wherein the generating a two-dimensional code based on the trigger data comprises:
decrypting the encrypted trigger data to obtain decrypted trigger data;
generating the two-dimensional code based on the decrypted trigger data.
5. The method of any of claims 1-4, wherein the virtual reality display device includes a display interface;
the method further comprises the following steps: and displaying the two-dimensional code on the display interface.
6. The method of claim 5, wherein after the generating the two-dimensional code based on the trigger data and before the projecting the two-dimensional code through the projection unit to a fixed interface of an external environment, the method further comprises:
receiving a release instruction triggered by a user;
and starting the projection unit based on the throwing instruction.
7. The method of claim 6, wherein the projecting the two-dimensional code through the projection unit to a fixed interface of an external environment comprises: and the two-dimensional code in the display interface is released to a fixed interface of the external environment through the projection unit.
8. The utility model provides a two-dimensional code generating device which characterized in that, two-dimensional code generating device is applied to virtual reality display device, virtual reality display device includes the projection unit, the device includes:
the first generation module is used for receiving a two-dimensional code trigger signal and generating trigger data;
the second generation module is used for generating a two-dimensional code based on the trigger data;
and the releasing module is used for releasing the two-dimensional code to a fixed interface of an external environment through the projection unit.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any of claims 1-7.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011566805.4A CN112990910A (en) | 2020-12-25 | 2020-12-25 | Two-dimensional code generation method, related device and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011566805.4A CN112990910A (en) | 2020-12-25 | 2020-12-25 | Two-dimensional code generation method, related device and computer storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112990910A true CN112990910A (en) | 2021-06-18 |
Family
ID=76345137
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011566805.4A Withdrawn CN112990910A (en) | 2020-12-25 | 2020-12-25 | Two-dimensional code generation method, related device and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112990910A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113470283A (en) * | 2021-06-29 | 2021-10-01 | 山东派盟网络科技有限公司 | Intelligent payment equipment |
WO2024082439A1 (en) * | 2022-10-20 | 2024-04-25 | 北京凌宇智控科技有限公司 | Display method for information code on head-mounted display device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102118710A (en) * | 2011-03-08 | 2011-07-06 | 上海红松信息技术有限公司 | System and method for transmitting data between mobile terminals |
CN104980332A (en) * | 2014-04-14 | 2015-10-14 | 深圳市亚汇讯实业有限公司 | System and method for remote data management |
CN107040369A (en) * | 2016-10-26 | 2017-08-11 | 阿里巴巴集团控股有限公司 | Data transmission method, apparatus and system |
CN208076827U (en) * | 2017-09-11 | 2018-11-09 | 深圳市屯奇尔科技有限公司 | A kind of head-mounted display apparatus |
KR20180127872A (en) * | 2017-05-22 | 2018-11-30 | 주식회사 페이콕 | Method for encrypting two dimensions code |
CN109636374A (en) * | 2018-12-11 | 2019-04-16 | 上海闻泰电子科技有限公司 | The method and apparatus of two-dimension code safe payment |
CN110490585A (en) * | 2019-08-09 | 2019-11-22 | 珠海格力电器股份有限公司 | Two dimensional code charging method, device, multi-connected machine household cost allocation equipment and storage medium |
CN110850967A (en) * | 2019-10-22 | 2020-02-28 | 苏州日煊数字科技有限公司 | Intelligent supermarket shopping method and system based on virtual reality and cloud computing |
-
2020
- 2020-12-25 CN CN202011566805.4A patent/CN112990910A/en not_active Withdrawn
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102118710A (en) * | 2011-03-08 | 2011-07-06 | 上海红松信息技术有限公司 | System and method for transmitting data between mobile terminals |
CN104980332A (en) * | 2014-04-14 | 2015-10-14 | 深圳市亚汇讯实业有限公司 | System and method for remote data management |
CN107040369A (en) * | 2016-10-26 | 2017-08-11 | 阿里巴巴集团控股有限公司 | Data transmission method, apparatus and system |
KR20180127872A (en) * | 2017-05-22 | 2018-11-30 | 주식회사 페이콕 | Method for encrypting two dimensions code |
CN208076827U (en) * | 2017-09-11 | 2018-11-09 | 深圳市屯奇尔科技有限公司 | A kind of head-mounted display apparatus |
CN109636374A (en) * | 2018-12-11 | 2019-04-16 | 上海闻泰电子科技有限公司 | The method and apparatus of two-dimension code safe payment |
CN110490585A (en) * | 2019-08-09 | 2019-11-22 | 珠海格力电器股份有限公司 | Two dimensional code charging method, device, multi-connected machine household cost allocation equipment and storage medium |
CN110850967A (en) * | 2019-10-22 | 2020-02-28 | 苏州日煊数字科技有限公司 | Intelligent supermarket shopping method and system based on virtual reality and cloud computing |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113470283A (en) * | 2021-06-29 | 2021-10-01 | 山东派盟网络科技有限公司 | Intelligent payment equipment |
WO2024082439A1 (en) * | 2022-10-20 | 2024-04-25 | 北京凌宇智控科技有限公司 | Display method for information code on head-mounted display device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3001637B1 (en) | Methods and devices for authorizing operation | |
CN105490711B (en) | Bluetooth automatic connection method and main equipment, from equipment and system | |
CN102682520A (en) | Information processing apparatus, information processing method, and terminal apparatus | |
CN106575334A (en) | Accessing a secured software application | |
CN112990910A (en) | Two-dimensional code generation method, related device and computer storage medium | |
CN108880791A (en) | Cryptographic key protection method, terminal and computer readable storage medium | |
WO2017113790A1 (en) | Method for implementing code-scan bluetooth automatic connection, master device, slave device, and system | |
CN103310146B (en) | A kind of picture password protection method and terminal | |
WO2019052414A1 (en) | Authentication method, device, vr terminal and vr server based on vr scene | |
CN105447404B (en) | The method and system of image secret protection in a kind of cloud storage | |
CN105976005A (en) | Two-dimensional code encrypting method, two-dimensional code generating device and two-dimensional code scanning device | |
JP2007206762A (en) | Communication method and communication device using two-dimensional code | |
CN109150513A (en) | Private key storage method, computer equipment and storage medium based on block chain | |
CN115883052A (en) | Data encryption method, data decryption method, device and storage medium | |
CN114286131A (en) | Transmission method and device for anchor image model file in live broadcast wheat | |
CN104407838B (en) | A kind of method and apparatus generating random number and random array | |
CN116634424A (en) | Information processing method and device, storage medium, electronic equipment and vehicle | |
CN109033863A (en) | The encryption and decryption method and device of picture | |
WO2015192656A1 (en) | Security mode indication method and device | |
AT&T | ||
CN110414243A (en) | A kind of two dimensional code encryption method, device and two dimensional code decryption method, device | |
CN114339282A (en) | Method and device for transmitting anchor image picture in live broadcast interaction | |
KR100739525B1 (en) | Data transmitter/receiver system using encoded image and method for the same | |
WO2011052180A1 (en) | Encrypted message transmission device, program, encrypted message transmission method and authentication system | |
KR101746577B1 (en) | System and Method for Authenticating a user using Visualize Password and Authentication Sever |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210618 |
|
WW01 | Invention patent application withdrawn after publication |