Data encryption method and device, data decryption method and device, electronic equipment and storage medium

By combining classical encryption and quantum encryption and non-orthogonal conversion of the ciphertext after quantum encryption, the problem of high risk of deciphering existing data encryption methods is solved, and higher data encryption security is achieved.

CN119449468APending Publication Date: 2025-02-14SHENZHEN ZHI HUI LIN NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411781046.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing data encryption methods are based on fixed algorithms and processes, and the risk of deciphering is high. How to improve the security of data encryption is a technical problem that needs to be solved urgently.

Method used

Combining classical encryption and quantum encryption, encrypting the encrypted data, and non-orthogonal conversion of the ciphertext after quantum encryption, improve the security of data encryption.

Benefits of technology

Enhance encryption security through the non-replicability and measurement uncertainty of quantum states, and improve the difficulty of prediction or measurement of ciphertext through non-orthogonal state conversion, further improving the security of data encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449468A_ABST
    Figure CN119449468A_ABST
Patent Text Reader

Abstract

The invention provides a data encryption method and device, a data decryption method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining to-be-encrypted data which is composed of a first sequence; displacement transformation is carried out on the first sequence based on a first rule to obtain first encrypted data, and the first encrypted data is composed of a second sequence; quantum state conversion is carried out on the second sequence to obtain second encrypted data, and the second encrypted data is composed of a third sequence; performing non-orthogonal state conversion on the third sequence based on a second rule to obtain third encrypted data; wherein the first sequence and the second sequence comprise at least one binary numerical value, and the third sequence comprises at least one quantum bit. Therefore, the security of data encryption can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data encryption technology, and in particular to a data encryption and decryption method, device, electronic device and storage medium. Background Art

[0002] At present, data encryption is mainly based on a specific rule (key) to perform a displacement transformation of the binary value of the data, thereby realizing the data encryption process. However, such encryption methods are currently based on fixed algorithms and processes, and the risk of being cracked is relatively high. Therefore, how to improve the security of data encryption is a technical problem that urgently needs to be solved in this field. Summary of the invention

[0003] The present application provides a data encryption and decryption method, device, electronic device and storage medium, which encrypts the data to be encrypted by combining classical encryption and quantum encryption, and finally performs non-orthogonal state conversion on the ciphertext after quantum encryption, thereby further improving the security of data encryption.

[0004] In a first aspect, the present application provides a data encryption method, which is applied to a sending end and includes:

[0005] Obtaining data to be encrypted, where the data to be encrypted consists of a first number sequence;

[0006] Performing a shift transformation on the first number sequence based on a first rule to obtain first encrypted data, wherein the first encrypted data is composed of the second number sequence;

[0007] Performing quantum state conversion on the second number sequence to obtain second encrypted data, wherein the second encrypted data is composed of the third number sequence;

[0008] Performing a non-orthogonal state transformation on the third number sequence based on the second rule to obtain third encrypted data;

[0009] The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

[0010] It can be seen that in this application, when encrypting data, after performing a shift transformation of the binary data to be encrypted based on the first rule, a quantum state transformation is performed on it, thereby enhancing the security of encryption based on the non-replicability and measurement uncertainty of the quantum state. Finally, a non-orthogonal state transformation is performed on each quantum bit, making it difficult to distinguish between these states, further improving the security of data encryption.

[0011] In a feasible example, performing a shift transformation on the first number sequence based on a first rule to obtain first encrypted data includes: performing a cyclic shift on the first number sequence in a target direction based on a first offset value to obtain the first encrypted data.

[0012] In the present application, cyclic shift is performed on the first number sequence to achieve initial encryption of the first number sequence, thereby improving the security of the entire encryption process.

[0013] In a feasible example, a first number series is shifted and transformed based on a first rule to obtain first encrypted data, including: a first number series is shifted and transformed based on a first mapping function to obtain first encrypted data; wherein, the first position of the binary value included in the first number series in the first mapping function corresponds to the second position of the binary value included in the second number series, the first position is the remainder after the first value is divided by the target value, the target value is the number of binary values ​​included in the first number series, and the first value is the product of the second position and the second offset value.

[0014] In the present application, the first number sequence is permuted and shifted based on the first mapping function, so that the complexity of the encryption of the shift operation on the first number sequence can be increased, thereby improving the security of the entire encryption process.

[0015] In a feasible example, the above two examples can be combined to perform a shift transformation on the first number sequence.

[0016] In a feasible example, after performing quantum state conversion on the second number sequence to obtain second encrypted data, the method also includes: modifying the quantum bits included in the third number sequence based on a preset quantum gate to obtain fourth encrypted data, the fourth encrypted data is composed of a fourth number sequence, and the fourth number sequence includes at least one quantum bit; performing a displacement transformation on the fourth number sequence based on the second mapping function to obtain fifth encrypted data, the fifth encrypted data is composed of a fifth number sequence, and the fifth number sequence includes at least one quantum bit; wherein the third position of the quantum bit included in the fourth number sequence in the second mapping function corresponds to the fourth position of the quantum bit included in the fifth number sequence, the fourth position is the remainder after the second value is divided by the target value, the second value is the product of the third position and the third offset value, and the target value is the number of binary values ​​included in the first number sequence.

[0017] In the present application, the security of quantum ciphertext can be improved by modifying the corresponding quantum bit value through a specific quantum gate, and at the same time, a displacement transformation is performed on it based on a second mapping function, which can further improve the security of data encryption.

[0018] In a feasible example, a non-orthogonal state conversion is performed on the third number sequence based on the second rule to obtain third encrypted data, including: evenly splitting the fourth offset value into multiple fourth sub-offset values, and the multiple fourth sub-offset values ​​correspond one-to-one to at least one quantum bit included in the third number sequence; based on each fourth sub-offset value in the multiple fourth sub-offset values, controlling the opening and closing of at least one target quantum gate of each quantum bit corresponding to each fourth sub-offset value in the third number sequence to obtain the third encrypted data; wherein each fourth sub-offset value includes at least one binary value, and the at least one binary value corresponds one-to-one to at least one target quantum gate, and each binary value in the at least one binary value is a fourth value or a fifth value, and the fourth value is used to control the opening of the target quantum gate, and the fifth value is used to control the closing of the target quantum gate.

[0019] In the present application, based on the opening and closing control of the quantum gate corresponding to each quantum bit respectively, the third number series can be transformed into a non-orthogonal state, thereby increasing the difficulty of predicting or measuring the third encrypted data and improving the security of data encryption.

[0020] In a feasible example, after obtaining the third encrypted data, the method further includes: sending the third encrypted data, the first rule, and the second rule.

[0021] In the present application, sending the third encrypted data and the corresponding first rule and second rule to the receiving end can improve the security of the data transmission process, and the receiving end can also implement the decryption process of the encrypted data.

[0022] In a second aspect, the present application provides a data decryption method, which is applied to a receiving end and includes:

[0023] receiving third encrypted data, the first rule, and the second rule;

[0024] Performing an orthogonal transformation on the third encrypted data based on the second rule to obtain second encrypted data, wherein the second encrypted data is composed of a third number sequence;

[0025] Performing quantum state to binary value conversion on the second encrypted data to obtain first encrypted data, wherein the first encrypted data is composed of the second number sequence;

[0026] Performing an inverse shift transformation on the second number sequence based on the first rule to obtain data to be encrypted, where the data to be encrypted consists of the first number sequence;

[0027] The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

[0028] In a third aspect, the present application provides a data encryption device, the device comprising:

[0029] An acquisition unit, used for acquiring data to be encrypted, where the data to be encrypted consists of a first number sequence;

[0030] A first processing unit, configured to perform a shift transformation on the first number sequence based on a first rule to obtain first encrypted data, wherein the first encrypted data is composed of a second number sequence;

[0031] A first processing unit is used to perform quantum state conversion on the second number sequence to obtain second encrypted data, where the second encrypted data is composed of a third number sequence;

[0032] A first processing unit, configured to perform a non-orthogonal state conversion on a third number sequence based on a second rule to obtain third encrypted data;

[0033] The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

[0034] In a fourth aspect, the present application provides a data decryption device, the device comprising:

[0035] A receiving unit, configured to receive third encrypted data, a first rule, and a second rule;

[0036] A second processing unit is used to perform an orthogonal state conversion on the third encrypted data based on a second rule to obtain second encrypted data, where the second encrypted data is composed of a third number sequence;

[0037] A second processing unit is used to convert the second encrypted data from a quantum state to a binary value to obtain first encrypted data, where the first encrypted data is composed of a second number sequence;

[0038] A second processing unit is used to perform a shift inverse transformation on the second number sequence based on the first rule to obtain data to be encrypted, where the data to be encrypted consists of the first number sequence;

[0039] The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

[0040] In a fifth aspect, the present application provides an electronic device, comprising a processor, a memory, and a communication interface. The processor, the memory, and the communication interface are interconnected and perform communication with each other. An executable program code is stored in the memory. The communication interface is used for wireless communication. The processor is used to call the executable program code stored in the memory to execute, for example, some or all of the steps described in any method of the first aspect and / or the second aspect.

[0041] In a sixth aspect, the present application provides a computer-readable storage medium, in which electronic data is stored. When the electronic data is executed by a processor, it is used to execute the electronic data to implement some or all of the steps described in the first aspect and / or second aspect of the present application.

[0042] In a seventh aspect, the present application provides a computer program product, including a computer program, which is operable to cause a computer to execute some or all of the steps described in the first aspect and / or the second aspect of the present application. The computer program product may be a software installation package. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 paying creative work.

[0044] Figure 1 A schematic diagram of the structure of a data encryption system provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of a data encryption method provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of a displacement transformation process provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of a process flow of non-orthogonal state conversion provided in an embodiment of the present application;

[0048] Figure 5 A flowchart of a data decryption method provided in an embodiment of the present application;

[0049] Figure 6 A block diagram of the functional units of a data encryption device provided in an embodiment of the present application;

[0050] Figure 7 A block diagram of the functional units of a data decryption device provided in an embodiment of the present application;

[0051] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not 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 this application.

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

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

[0055] See also Figure 1 , Figure 1 A schematic diagram of the structure of a data encryption system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the data encryption system 100 includes a sending end 101 and a receiving end 102 .

[0056] The sending end 101 and the receiving end 102 can be servers or terminal devices, for example, a single server, a server cluster, a cloud server, a cloud computing service center, or other forms of devices with computing capabilities, for example, desktop computers, laptops, tablet computers, smart phones, etc.

[0057] In this embodiment, the sending end 101 is mainly used for data encryption and data transmission after encryption. The receiving end 102 can be used for data reception and data decryption after data reception. It can be understood that the sending end 101 is not fixed to a certain machine. If the certain machine needs to send encrypted data to another machine, the machine can be the sending end 101. If the machine needs to receive encrypted data sent by another machine, the machine can also be the receiving end 102.

[0058] In this embodiment, the transmitting end 101 obtains data to be encrypted, which is composed of a first number sequence; and performs a shift transformation on the first number sequence based on a first rule to obtain first encrypted data, which is composed of a second number sequence; then performs a quantum state conversion on the second number sequence to obtain second encrypted data, which is composed of a third number sequence; finally, performs a non-orthogonal state conversion on the third number sequence based on a second rule to obtain third encrypted data; wherein the first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

[0059] After the sending end 101 completes data encryption, it can be stored in its corresponding memory, or the encrypted third encrypted data and the corresponding first rule and second rule can be sent to the receiving end 102. After the receiving end 102 receives the third encrypted data, the first rule and the second rule, it can complete the decryption process of the third encrypted data based on the first rule and the second rule, thereby obtaining the data to be encrypted.

[0060] Based on the above, when encrypting data, the binary data to be encrypted is first shifted based on the first rule. However, since the current quantum algorithm can quickly decipher this type of encryption method, it is further quantum-state transformed to further resist such attacks. Subsequently, it is also non-orthogonal-state transformed to make it difficult to distinguish between these states, further improving the security of data encryption.

[0061] Based on this, an embodiment of the present application provides a data encryption method, and the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.

[0062] See also Figure 2 , Figure 2 A schematic diagram of a data encryption method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method comprises the following steps:

[0063] Step S201, obtaining data to be encrypted, where the data to be encrypted consists of a first number sequence.

[0064] The first number sequence includes at least one binary value. It can be understood that the first number sequence refers to a number sequence composed of at least one binary data arrangement, each binary value refers to a value composed of binary, and each binary value can be a basic binary unit, that is, 0 and 1, or a normal value, such as 101 or 10001.

[0065] Step S202: performing a shift transformation on the first number sequence based on a first rule to obtain first encrypted data, where the first encrypted data is composed of the second number sequence.

[0066] The second number sequence includes at least one binary value, and the first number sequence is shifted based on the first rule, which means that the position of at least one binary value included in the first number sequence is shifted in the number sequence. The following is a detailed description of this:

[0067] In a feasible embodiment, performing a shift transformation on the first number sequence based on a first rule to obtain first encrypted data includes: performing a cyclic shift on the first number sequence in a target direction based on a first offset value to obtain the first encrypted data.

[0068] Among them, the displacement transformation for the first number series can be just a circular displacement in a single direction. Circular displacement means moving the first number series as a whole to the same target direction by a first offset value based on the current position of the first number series. It can be understood that since the current position number of the first number series is fixed, if the target direction is to the right, the first offset value is 1. At this time, the binary value of the rightmost edge position in the first number series has no movable position on the right. Since it is a circular displacement, it is moved to the leftmost position for right shifting. For example, if the first number series is 100110, the first offset value is 1 at this time, and the target direction is to the right, then after the first number series is circularly shifted, the second number series obtained is 010011.

[0069] Exemplarily, the first rule can be composed of corresponding mapping relationships. For example, the encrypted data m = (m0, m1, m2, ..., m31), the first offset value is k1, where the length of k1 can be preset, for example, it can be 32 bits, the corresponding first encrypted data can be r = (r0, r1, r2, ..., r31), and the corresponding mapping relationship R is m i →r j ,j≡(k1+i)mod 32,j,i∈0,1,2,…,31. mi and rj are used to represent the binary values ​​included in the first number series and the second number series, respectively, and i and j are used to represent the positions of the aforementioned binary values ​​in the first number series and the second number series, respectively. The aforementioned k1 can determine whether the target direction is right or left based on the positive and negative values ​​of the values.

[0070] Furthermore, subsequent iterations based on the first offset value can be expressed as The iteration formula is: in, Represents the exclusive OR operation. It can be used to indicate the first offset value corresponding to the current data encryption. It is used to represent the first offset value corresponding to the next data encryption. t can be the preset value corresponding to each encryption. t can be the second number series generated after the current data encryption.

[0071] For example, see Figure 3 , Figure 3 A schematic diagram of a displacement transformation process provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, if the first number series includes five binary values, they are defined as 1, 2, 3, 4, and 5 from left to right based on the initial position. At this time, if it is cyclically moved one position to the right, the initial position 1 needs to be moved to position 2, the initial position 2 needs to be moved to position 3, and the initial position 5 needs to be cyclically moved to position 1. Finally, the positions after moving are defined as 5, 1, 2, 3, and 4.

[0072] In this embodiment, cyclic shift is performed on the first number sequence to achieve initial encryption of the first number sequence, thereby improving the security of the entire encryption process.

[0073] Furthermore, in a feasible embodiment, the first number series is shifted and transformed based on the first rule to obtain the first encrypted data, including: the first number series is shifted and transformed based on the first mapping function to obtain the first encrypted data; wherein, the first position of the binary value included in the first number series in the first mapping function corresponds to the second position of the binary value included in the second number series, the first position is the remainder after the first value is divided by the target value, the target value is the number of binary values ​​included in the first number series, and the first value is the product of the second position and the second offset value.

[0074] In addition to the cyclic shift, a permutation shift can also be performed, that is, based on a specific mapping function, the shift position corresponding to each binary value in the first sequence is determined. Based on the above embodiment, the encrypted data m = (m0, m1, m2, ..., m31), and the first encrypted data is p = (p0, p1, p2, ..., p31), then the first mapping function can be expressed as m i →p j ,j≡(i×(k2+1))mod 32, mi and pj are used to represent the binary values ​​included in the first number sequence and the second number sequence respectively, and i and j are used to represent the positions of the aforementioned binary values ​​in the first number sequence and the second number sequence respectively.

[0075] In addition, the subsequent iterations with respect to the second offset value can also be expressed as The iteration formula is: in, Represents the exclusive OR operation. It can be used to indicate the second offset value corresponding to the current data encryption. It is used to indicate the second offset value corresponding to the next data encryption, and x can be the preset value corresponding to each encryption. Among them, x can be the second sequence generated after the current data encryption. The length of k2 can be preset, for example, 6 bits, and in the subsequent iteration process, after the second offset value of the current data encryption is XORed with the preset value, the length of the second offset value generated for the next data encryption may be higher than 6 bits. At this time, the lowest six bits can be selected as the second offset value for the first data encryption.

[0076] In this embodiment, the first number sequence is permuted and shifted based on the first mapping function, so that the complexity of the encryption of the shift operation on the first number sequence can be increased, thereby improving the security of the entire encryption process.

[0077] In addition, the shift transformation of the first number series based on the first rule can be combined with the aforementioned cyclic shift and permutation shift operations, that is, the first number series is first cyclically shifted in the target direction based on the first offset value to obtain sixth encrypted data, and then the sixth encrypted data is shifted based on the first mapping function to obtain the first encrypted data.

[0078] Step S203, performing quantum state conversion on the second number sequence to obtain second encrypted data, where the second encrypted data is composed of the third number sequence.

[0079] Among them, quantum encryption is an encryption method based on the principles of quantum mechanics. Its core lies in using the non-replicability of quantum states and the interference of measurement to ensure the security of information. Quantum cryptography is based on quantum theory and its operation follows the basic principles of physics. Through the quantum channel, the sender and the receiver can exchange quantum states during data transmission. In addition, classical cryptographic technology can also be applied to establish a key between the two parties. If an unauthorized entity attempts to crack the encryption using a quantum computer and quantum key distribution protocol, the quantum system can detect the intrusion and ensure the security of data transmission between users.

[0080] In the process of quantum encryption in this embodiment, the sender first prepares a string of specially processed quantum bits (qubits), usually using the polarization state of photons or other quantum systems. The sender encodes the second sequence into a quantum state, for example, 0 and 1 in the binary value correspond to different quantum states. In the subsequent encrypted data of the quantum state sent to the sender, it is necessary to pass through an optical fiber or other secure channel. It can be understood that after the receiver receives the corresponding quantum bit, it needs to measure according to a predetermined measurement basis. The result of the measurement will correspond to the encoded information. And the sender and the receiver need to disclose their measurement basis so that the corresponding shared key can be determined. In this embodiment, it can mean that 0 and 1 in the binary value correspond to different quantum states. After converting the ordinary binary value into a quantum state, the non-replicability and measurement uncertainty of the quantum state can be fully utilized to enhance the security of encryption. For example, if the first encrypted data is p = (p0, p1, p2, ..., p31), then the 0 and 1 bit states are converted into corresponding quantum states | 0 > and | 1 >. The message is converted into quantum ciphertext represented by quantum states |Q0〉|Q1〉|Q2〉…|Q31〉.

[0081] Step S204: performing a non-orthogonal state transformation on the third number sequence based on the second rule to obtain third encrypted data.

[0082] The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

[0083] In a feasible embodiment, after performing quantum state conversion on the second number sequence to obtain second encrypted data, the method also includes: modifying the quantum bits included in the third number sequence based on a preset quantum gate to obtain fourth encrypted data, the fourth encrypted data is composed of a fourth number sequence, and the fourth number sequence includes at least one quantum bit; performing a displacement transformation on the fourth number sequence based on the second mapping function to obtain fifth encrypted data, the fifth encrypted data is composed of a fifth number sequence, and the fifth number sequence includes at least one quantum bit; wherein the third position of the quantum bit included in the fourth number sequence in the second mapping function corresponds to the fourth position of the quantum bit included in the fifth number sequence, the fourth position is the remainder after the second value is divided by the target value, the second value is the product of the third position and the third offset value, and the target value is the number of binary values ​​included in the first number sequence.

[0084] Among them, after converting the second number sequence into a quantum state, the value corresponding to the quantum state in the second encrypted data can be further modified through a specific quantum gate to obtain the fourth encrypted data, thereby further improving the security of the quantum ciphertext. Quantum gates can include quantum NOT gates, quantum controlled NOT gates, and the like. If the second encrypted data is |Q0〉|Q1〉|Q2〉…|Q31〉, then after modifying the quantum bit value through a specific quantum gate, the quantum state obtained is |λ0〉|λ1〉|λ2〉…|λ31〉.

[0085] After modifying the value of the quantum state through a specific quantum gate, the fourth encrypted data can be shifted by a third offset value. For example, if the fifth encrypted data after the shift transformation is represented as |δ0〉|δ1〉|δ2〉…|δ31〉, then the corresponding second mapping function is λ i →δ j ,j=(i×(k3+1))mod 32, λi and δj are used to represent the quantum bits included in the fourth and fifth number sequences respectively, and i and j are used to represent the positions of the aforementioned quantum bits in the fourth and fifth number sequences respectively.

[0086] In addition, the subsequent iterations with respect to the third offset value can also be expressed as The iteration formula is: in, Represents the exclusive OR operation. It can be used to indicate the third offset value corresponding to the current data encryption. It is used to indicate the third offset value corresponding to the next data encryption. f may be a preset value corresponding to each encryption.

[0087] In this embodiment, the security of quantum ciphertext can be improved by modifying the corresponding quantum bit value through a specific quantum gate, and the security of data encryption can be further improved by performing a shift transformation based on the second mapping function.

[0088] The aforementioned embodiment may be performed before performing a non-orthogonal state transformation on the third number sequence based on the second rule to obtain the third encrypted data. Then, the corresponding non-orthogonal state transformation on the third number sequence based on the second rule to obtain the third encrypted data should be performing a non-orthogonal state transformation on the fifth number sequence based on the second rule to obtain the third encrypted data.

[0089] The following is a detailed description of the current steps:

[0090] In a feasible embodiment, performing a non-orthogonal state conversion on the third number sequence based on the second rule to obtain third encrypted data includes: evenly splitting the fourth offset value into a plurality of fourth sub-offset values, wherein the plurality of fourth sub-offset values ​​correspond one-to-one to at least one quantum bit included in the third number sequence; based on each fourth sub-offset value in the plurality of fourth sub-offset values, controlling the opening and closing of at least one target quantum gate of each quantum bit corresponding to each fourth sub-offset value in the third number sequence to obtain the third encrypted data; wherein each fourth sub-offset value includes at least one binary value, the at least one binary value corresponds one-to-one to at least one target quantum gate, each binary value in the at least one binary value is a fourth value or a fifth value, the fourth value is used to control the opening of the target quantum gate, and the fifth value is used to control the closing of the target quantum gate.

[0091] Exemplarily, if the third sequence includes 32 quantum bits, and each quantum bit corresponds to 3 quantum gates, then the fourth offset value is 96 bits. Then the fourth offset value needs to be evenly split into 32 fourth sub-offset values, each of which is 3 bits, corresponding to three quantum gates, and each fourth offset value is composed of a binary value, such as 101, then 1 represents the opening of the quantum gate, and 0 represents the closing of the quantum gate. The three quantum gates can be Hadamard gate (H gate), Y gate (usually refers to Pauli-Y gate or similar rotation gate), and Z gate (Pauli-Z gate, used for phase flipping).

[0092] It can be understood that the orthogonality of quantum states means that there is no overlap or interference between two quantum states, that is, their inner product is zero. When at least one quantum gate corresponding to multiple quantum bits of the third sequence is opened and closed based on multiple fourth sub-offset values, the evolution path of the quantum state of each quantum bit can be changed. Due to the randomness and unpredictability of each sub-offset value, the evolution path of the quantum state becomes complex and unpredictable. This complexity leads to the non-orthogonality between the quantum states of each quantum bit in the third encrypted data, that is, there is overlap or interference between them. In addition, quantum gates (such as H, Y, and Z gates) themselves have the ability to change quantum states. When these quantum gates are applied to input quantum states in a specific way (controlled by subkeys), they change the phase and amplitude of the quantum state, thereby further increasing the non-orthogonality between the output quantum states.

[0093] For example, see Figure 4 , Figure 4 A schematic diagram of a non-orthogonal state conversion process provided in an embodiment of the present application is shown in FIG. Figure 4As shown, the fourth offset value is 101010001, which is split into three fourth sub-offset values, namely 101, 010, and 001. At this time, the opening and closing of the H gate, Y gate, and Z gate corresponding to ABC included in the third number series are controlled based on the three fourth sub-offset values, wherein 1 corresponds to opening and 0 corresponds to closing.

[0094] In this embodiment, based on the opening and closing control of the quantum gate corresponding to each quantum bit, the third number series can be transformed into a non-orthogonal state, thereby increasing the difficulty of predicting or measuring the third encrypted data and improving the security of data encryption.

[0095] In addition, after the data is encrypted based on the above embodiment, the following steps are also included:

[0096] In a feasible embodiment, after obtaining the third encrypted data, the method further includes: sending the third encrypted data, the first rule and the second rule.

[0097] After completing the data encryption, the third encrypted data, the first rule and the second rule may be sent to the receiving end, so that the receiving end may implement a decryption process of the third encrypted data based on the first rule and the second rule.

[0098] In this embodiment, the third encrypted data and the corresponding first rule and second rule are sent to the receiving end, which can improve the security of the data transmission process, and the receiving end can also implement the decryption process of the encrypted data.

[0099] It can be understood that the first rule and the second rule sent by the sending end can be corresponding offset values, that is, the aforementioned first offset value, second offset value, third offset value and fourth offset value, etc., and the receiving end should be configured with a decryption method with corresponding offset values ​​in advance. Moreover, after the offset value is sent for the first time, the subsequent encrypted data transmission may not need to carry the corresponding offset value, and the offset value may be based on the iterated offset value shown in the aforementioned embodiment, and the receiving end should also be configured with a corresponding offset value iteration method, so as to determine the iterative offset value based on the offset value initially sent. This can improve the security of the subsequent data transmission process.

[0100] Based on this, see Figure 5 , Figure 5 A flowchart of a data decryption method provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the following steps are included:

[0101] Step S501, receiving third encrypted data, a first rule and a second rule.

[0102] The first rule and the second rule may correspond to the first offset value and the fourth offset value in the aforementioned embodiment, respectively.

[0103] Step S502, performing orthogonal state transformation on the third encrypted data based on the second rule to obtain second encrypted data, where the second encrypted data is composed of a third number sequence;

[0104] The orthogonal transformation of the third encrypted data based on the second rule refers to the inverse operation of the non-orthogonal transformation of the third number sequence based on the second rule.

[0105] For example, based on the specific non-orthogonal state conversion steps in the aforementioned embodiment, the inverse gate of at least one quantum gate corresponding to each quantum bit in the third encrypted data can be determined, so that the inverse gate of at least one quantum gate corresponding to each quantum bit is controlled based on each fourth sub-offset value, and the corresponding values ​​for opening and closing remain the same.

[0106] In a feasible embodiment, the fourth offset value is evenly split into a plurality of fourth sub-offset values, and the plurality of fourth sub-offset values ​​correspond one-to-one to at least one quantum bit included in the third encrypted data; based on each fourth sub-offset value in the plurality of fourth sub-offset values, the opening and closing of at least one first quantum gate of each quantum bit corresponding to each fourth sub-offset value in the third encrypted data is controlled to obtain the second encrypted data, and the at least one first quantum gate is an inverse gate of at least one target quantum gate; wherein each fourth sub-offset value includes at least one binary value, and the at least one binary value corresponds one-to-one to the at least one first quantum gate, and each binary value in the at least one binary value is a fourth value or a fifth value, and the fourth value is used to control the opening of the first quantum gate, and the fifth value is used to control the closing of the first quantum gate.

[0107] Step S503, converting the second encrypted data from a quantum state to a binary value to obtain first encrypted data, where the first encrypted data is composed of a second number sequence;

[0108] In order to convert the quantum state of the second encrypted data into a binary value, it is necessary to measure the second encrypted data based on a measurement basis shared by the sender, so as to obtain information of the corresponding binary value.

[0109] Step S504: performing an inverse shift transformation on the second number sequence based on the first rule to obtain data to be encrypted, where the data to be encrypted consists of the first number sequence.

[0110] The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit. Here, the data to be encrypted can be obtained by only performing an inverse operation on the second number sequence based on the first rule.

[0111] In a feasible embodiment, the first encrypted data is cyclically shifted in a first direction based on the first offset value to obtain data to be encrypted, and the first reverse direction is a reverse direction of the target direction.

[0112] In a feasible embodiment, the first encrypted data is shifted and transformed based on a first mapping function to obtain data to be encrypted; wherein the first position of the binary value included in the data to be encrypted in the first mapping function corresponds to the second position of the binary value included in the first encrypted data, the first position is the remainder after the first value is divided by the target value, the target value is the number of binary values ​​included in the first encrypted data, and the first value is the product of the second position and the second offset value.

[0113] It can be understood that the decryption process for data can be performed by performing the inverse operation according to the encryption process to achieve decryption, so it will not be described in detail here.

[0114] It can be seen that in the embodiment of the present application, when encrypting data, after performing the shift transformation of the binary data to be encrypted based on the first rule, the quantum state transformation is performed on it, so that the security of encryption can be enhanced based on the non-replicability and measurement uncertainty of the quantum state. Finally, each quantum bit is transformed into a non-orthogonal state, so that these states are not easy to distinguish from each other, further improving the security of data encryption.

[0115] In accordance with the above-mentioned embodiments, please refer to Figure 6 , Figure 6 This is a functional unit block diagram of a data encryption device provided in an embodiment of the present application. The data encryption device is the above-mentioned sending end or a part of the sending end, such as Figure 6 As shown, the data encryption device 60 includes:

[0116] An acquisition unit 601 is used to acquire data to be encrypted, where the data to be encrypted consists of a first number sequence;

[0117] A first processing unit 602 is used to perform a shift transformation on the first number sequence based on a first rule to obtain first encrypted data, where the first encrypted data is composed of a second number sequence;

[0118] The first processing unit 602 is used to perform quantum state conversion on the second number sequence to obtain second encrypted data, where the second encrypted data is composed of a third number sequence;

[0119] The first processing unit 602 is used to perform non-orthogonal state conversion on the third number sequence based on the second rule to obtain third encrypted data;

[0120] The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

[0121] In a feasible embodiment, in terms of performing a shift transformation on the first number sequence based on the first rule to obtain the first encrypted data, the first processing unit 602 is specifically used to: perform a cyclic shift on the first number sequence in a target direction based on the first offset value to obtain the first encrypted data.

[0122] In a feasible embodiment, in terms of performing a shift transformation on the first number series based on the first rule to obtain the first encrypted data, the first processing unit 602 is specifically used to: perform a shift transformation on the first number series based on the first mapping function to obtain the first encrypted data; wherein the first position of the binary value included in the first number series in the first mapping function corresponds to the second position of the binary value included in the second number series, the first position is the remainder after the first value is divided by the target value, the target value is the number of binary values ​​included in the first number series, and the first value is the product of the second position and the second offset value.

[0123] In a feasible embodiment, the processing unit, after performing quantum state conversion on the second number sequence to obtain second encrypted data, is further used to: modify the quantum bits included in the third number sequence based on a preset quantum gate to obtain fourth encrypted data, the fourth encrypted data is composed of a fourth number sequence, and the fourth number sequence includes at least one quantum bit; perform a displacement transformation on the fourth number sequence based on the second mapping function to obtain fifth encrypted data, the fifth encrypted data is composed of a fifth number sequence, and the fifth number sequence includes at least one quantum bit; wherein the third position of the quantum bit included in the fourth number sequence in the second mapping function corresponds to the fourth position of the quantum bit included in the fifth number sequence, the fourth position is the remainder after the second value is divided by the target value, the second value is the product of the third position and the third offset value, and the target value is the number of binary values ​​included in the first number sequence.

[0124] In a feasible embodiment, in the aspect of performing non-orthogonal state conversion on the third number sequence based on the second rule to obtain the third encrypted data, the first processing unit 602 is specifically used to: evenly split the fourth offset value into multiple fourth sub-offset values, and the multiple fourth sub-offset values ​​correspond one-to-one to at least one quantum bit included in the third number sequence; based on each fourth sub-offset value in the multiple fourth sub-offset values, control the opening and closing of at least one target quantum gate of each quantum bit corresponding to each fourth sub-offset value in the third number sequence to obtain the third encrypted data; wherein each fourth sub-offset value includes at least one binary value, and the at least one binary value corresponds one-to-one to at least one target quantum gate, and each binary value in the at least one binary value is a fourth value or a fifth value, and the fourth value is used to control the opening of the target quantum gate, and the fifth value is used to control the closing of the target quantum gate.

[0125] In a feasible embodiment, the sending unit 603 is used to send the third encrypted data, the first rule and the second rule.

[0126] In accordance with the above-mentioned embodiments, please refer to Figure 7 , Figure 7 This is a block diagram of the functional units of a data decryption device provided in an embodiment of the present application. The data decryption device is the above-mentioned receiving end or a part of the receiving end, such as Figure 7 As shown, the data decryption device 70 includes:

[0127] The receiving unit 701 is used to receive the third encrypted data, the first rule and the second rule;

[0128] The second processing unit 702 is used to perform an orthogonal state transformation on the third encrypted data based on the second rule to obtain second encrypted data, where the second encrypted data is composed of a third number sequence;

[0129] The second processing unit 702 is used to convert the second encrypted data into a binary value from a quantum state to obtain first encrypted data, where the first encrypted data is composed of a second number sequence;

[0130] The second processing unit 702 is used to perform an inverse shift transformation on the second number sequence based on the first rule to obtain data to be encrypted, where the data to be encrypted consists of the first number sequence;

[0131] The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

[0132] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0133] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above data encryption device 60 can execute the above Figure 2 The above data decryption device 70 can execute the above Figure 5 The data decryption method shown.

[0134] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can 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 or computer programs. When a computer instruction or computer program is loaded or executed on a computer, a process or function according to an embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center containing one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0135] Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 800 may include one or more of the following components: a processor 801, a memory 802 and a communication interface 803. The processor 801, the memory 802 and the communication interface 803 are interconnected and perform communication work with each other, wherein the memory 802 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 801.

[0136] The processor 801 may include one or more processing cores. The processor 801 uses various interfaces and lines to connect the various parts of the entire electronic device 800, and executes various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 802, and calling data stored in the memory 802. Optionally, the processor 801 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 801 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU) and a modem. It is understandable that the above-mentioned modem may not be integrated into the processor 801, and may be implemented separately through a communication chip.

[0137] The memory 802 may include a random access memory (RAM) or a read-only memory (ROM). The memory 802 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 800 during use, etc.

[0138] It is understandable that the electronic device 800 may include more or fewer structural elements than those in the above structural block diagram, for example, including a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., which are not limited here.

[0139] The electronic device 800 may be a transmitting end or a receiving end.

[0140] An embodiment of the present application provides a computer-readable storage medium, wherein program data is stored in the computer-readable storage medium, and when the program data is executed by a processor, the program data is used to execute part or all of the steps of any data encryption method recorded in the above method embodiments.

[0141] The present application also provides a computer program product, including a computer program, which can be operated to enable a computer to execute some or all steps of any data encryption method described in the above method embodiment. The computer program product can be a software installation package.

[0142] It should be noted that, for the method embodiments of any of the aforementioned data encryption methods, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.

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

[0144] A person skilled in the art can understand that all or part of the steps in the various methods of the method embodiments of any of the above-mentioned data encryption methods can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a disk or an optical disk, etc.

[0145] The above is a detailed introduction to the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of a data encryption and decryption method, device, electronic device and storage medium of the present application. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present application; at the same time, for a general technician in this field, based on the idea of ​​a data encryption and decryption method, device, electronic device and storage medium of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0146] The present application is described with reference to the flowcharts and / or block diagrams of the methods, hardware products, and computer program products of the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks 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 generate 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.

[0147] 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.

[0148] 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.

[0149] It can be understood that any product that is controlled or configured to execute the processing method of the flowchart described in the method embodiment of a data encryption and decryption method of the present application, such as the terminal and computer program product in the above flowchart, falls within the scope of the related products described in the present application.

[0150] Obviously, those skilled in the art can make various changes and modifications to the data encryption and decryption method, device, electronic device and storage medium provided by 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 equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A data encryption method, characterized in that: The method comprises: Acquire data to be encrypted, wherein the data to be encrypted consists of a first number sequence; Performing a shift transformation on the first number sequence based on a first rule to obtain first encrypted data, wherein the first encrypted data is composed of a second number sequence; Performing quantum state conversion on the second number sequence to obtain second encrypted data, wherein the second encrypted data is composed of a third number sequence; Performing a non-orthogonal state transformation on the third number sequence based on the second rule to obtain third encrypted data; The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

2. The method according to claim 1, characterized in that The performing a shift transformation on the first number sequence based on a first rule to obtain first encrypted data includes: The first number sequence is cyclically shifted in a target direction based on a first offset value to obtain the first encrypted data.

3. The method according to claim 1, characterized in that The performing a shift transformation on the first number sequence based on a first rule to obtain first encrypted data includes: Performing a shift transformation on the first number sequence based on a first mapping function to obtain the first encrypted data; Among them, the first position of the binary value included in the first sequence in the first mapping function corresponds to the second position of the binary value included in the second sequence, the first position is the remainder after the first value is divided by the target value, the target value is the number of binary values ​​included in the first sequence, and the first value is the product of the second position and the second offset value.

4. The method according to any one of claims 1 to 3, characterized in that: After performing quantum state conversion on the second number sequence to obtain second encrypted data, the method further includes: Modify the quantum bits included in the third number sequence based on a preset quantum gate to obtain fourth encrypted data, where the fourth encrypted data is composed of a fourth number sequence, and the fourth number sequence includes at least one quantum bit; Performing a shift transformation on the fourth number sequence based on a second mapping function to obtain fifth encrypted data, wherein the fifth encrypted data is composed of a fifth number sequence, and the fifth number sequence includes at least one quantum bit; Among them, the third position of the quantum bit included in the fourth sequence in the second mapping function corresponds to the fourth position of the quantum bit included in the fifth sequence, the fourth position is the remainder after the second value is divided by the target value, the second value is the product of the third position and the third offset value, and the target value is the number of binary values ​​included in the first sequence.

5. The method according to any one of claims 1 to 4, characterized in that: The performing non-orthogonal state conversion on the third number sequence based on the second rule to obtain third encrypted data includes: Evenly splitting the fourth offset value into a plurality of fourth sub-offset values, wherein the plurality of fourth sub-offset values ​​correspond one-to-one to at least one quantum bit included in the third number sequence; Based on each fourth sub-offset value in the plurality of fourth sub-offset values, controlling the opening and closing of at least one target quantum gate of each quantum bit corresponding to each fourth sub-offset value in the third number sequence to obtain third encrypted data; Each of the fourth sub-offset values ​​includes at least one binary value, the at least one binary value corresponds one-to-one to the at least one target quantum gate, each binary value in the at least one binary value is a fourth value or a fifth value, the fourth value is used to control the opening of the target quantum gate, and the fifth value is used to control the closing of the target quantum gate.

6. The method according to any one of claims 1 to 5, characterized in that: After obtaining the third encrypted data, the method further includes: The third encrypted data, the first rule, and the second rule are sent.

7. A data decryption method, characterized in that: The method comprises: receiving third encrypted data, the first rule, and the second rule; Performing an orthogonal state transformation on the third encrypted data based on the second rule to obtain second encrypted data, wherein the second encrypted data is composed of a third number sequence; Performing quantum state to binary value conversion on the second encrypted data to obtain first encrypted data, wherein the first encrypted data is composed of a second number sequence; Performing an inverse shift transformation on the second number sequence based on the first rule to obtain the data to be encrypted, wherein the data to be encrypted is composed of the first number sequence; The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

8. A data encryption device, characterized in that: The device comprises: An acquisition unit, used for acquiring data to be encrypted, wherein the data to be encrypted consists of a first number sequence; A first processing unit, configured to perform a shift transformation on the first number sequence based on a first rule to obtain first encrypted data, wherein the first encrypted data is composed of a second number sequence; The first processing unit is used to perform quantum state conversion on the second number sequence to obtain second encrypted data, where the second encrypted data is composed of a third number sequence; The first processing unit is used to perform non-orthogonal state conversion on the third number sequence based on the second rule to obtain third encrypted data; The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

9. A data decryption device, characterized in that: The device comprises A receiving unit, configured to receive third encrypted data, a first rule, and a second rule; A second processing unit is used to perform an orthogonal state conversion on the third encrypted data based on the second rule to obtain second encrypted data, where the second encrypted data is composed of a third number sequence; The second processing unit is used to perform quantum state to binary value conversion on the second encrypted data to obtain first encrypted data, where the first encrypted data is composed of a second number sequence; The second processing unit is used to perform a shift inverse transformation on the second number sequence based on the first rule to obtain the data to be encrypted, wherein the data to be encrypted is composed of the first number sequence; The first number sequence and the second number sequence include at least one binary value, and the third number sequence includes at least one quantum bit.

10. An electronic device, comprising a processor, a memory, and a computer program stored in the memory, characterized in that: The processor is used to call the executable program code computer program stored in the memory to execute the method according to any one of claims 1-7.