Data quantum transmission method and device, electronic equipment and storage medium
By forming digital signatures and encrypting data through quantum encoding, the problem of traditional encryption algorithms being deciphered and tampered during data transmission is solved, and higher data transmission security is achieved.
Patent Information
- Application Number
- CN202510163717.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-14
AI Technical Summary
In the prior art, the data encrypted by traditional key encryption algorithms faces the risk of being deciphered, resulting in the data being stolen and tampered during transmission, reducing the security of data during data transmission.
A data quantum transmission method is proposed. By obtaining the initial transmission data, quantum encoding the data according to the preset quantum coded random numbers, forming a digital signature to prevent data tampering, and by encrypting the initial transmission data, quantum transfer data and quantum coded random numbers, the target transmission data is obtained to prevent the data from being deciphered.
It prevents data from being deciphered and tampered during data transmission, and improves security during data transmission.
Smart Images

Figure CN119995866A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a data quantum transmission method and device, an electronic device and a storage medium. Background Art
[0002] Data transmission refers to the transmission of data from one data node to another. In order to ensure the security of the transmission process, the data is usually encrypted to prevent the data from being stolen or tampered with during the transmission process. At present, traditional key encryption algorithms are widely used in data encryption, but with the improvement of computer computing power, the data encrypted by the key encryption algorithm faces the risk of being decrypted, which makes the data likely to be stolen and tampered with during the transmission process, which reduces the security of the data during the data transmission process. Therefore, how to improve the security of data during transmission has become an urgent problem to be solved. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a data quantum transmission method and device, an electronic device and a storage medium, aiming to improve the security of data during the transmission process.
[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a data quantum transmission method, the method comprising:
[0005] Get initial transmission data;
[0006] Performing quantum encoding on the initial transmission data according to a preset quantum encoding random number to obtain quantum transmission data;
[0007] Encrypting the initial transmission data, the quantum transmission data and the quantum coded random number to obtain target transmission data;
[0008] Data transmission is performed to a preset data receiving end according to the target transmission data.
[0009] In some embodiments, the step of performing quantum encoding on the initial transmission data according to a preset quantum encoding random number to obtain quantum transmission data includes:
[0010] Binary-encoding the initial transmission data to obtain an initial binary data string;
[0011] Performing coding base mapping on the initial binary data string according to the quantum coded random number to obtain an initial coding base;
[0012] The initial binary data string is quantum encoded according to the initial coding basis to obtain the quantum transmission data.
[0013] In some embodiments, performing coding base mapping on the initial binary data string according to the quantum coded random number to obtain an initial coding base includes:
[0014] Obtaining the number of bits of the initial binary data string to obtain the number of bits of the coding base;
[0015] Create a coding base according to the number of bits of the coding base to obtain an alternative coding base;
[0016] The candidate coding base is data mapped according to the initial binary data string and the quantum coded random number to obtain the initial coding base.
[0017] In some embodiments, the step of performing quantum encoding on the initial binary data string according to the initial coding basis to obtain the quantum transmission data includes:
[0018] The position information of the bits of the initial coding base is screened according to the value of the bits of the initial coding base and the preset calculation base value to obtain the calculation base bit position data;
[0019] Filtering the position information of the bits of the initial coding basis according to the calculation basis bit position data to obtain Hadamard basis bit position data;
[0020] The initial binary data string is quantum encoded according to the calculation basis bit position data and the Hadamard basis bit position data to obtain the quantum transmission data.
[0021] In some embodiments, the step of performing quantum encoding on the initial binary data string according to the calculation basis bit position data and the Hadamard basis bit position data to obtain the quantum transmission data includes:
[0022] Performing calculation basis encoding on the initial binary data string according to the calculation basis bit position data to obtain at least one calculation basis quantum code and bit position data of the calculation basis quantum code;
[0023] Performing Hadamard-based encoding on the initial binary data string according to the Hadamard-based bit position data to obtain at least one Hadamard-based quantum code and the bit position data of the Hadamard-based quantum code;
[0024] Tensor calculation is performed according to the calculation basis quantum code, the bit position data of the calculation basis quantum code, the Hadamard basis quantum code, and the bit position data of the Hadamard basis quantum code to obtain the quantum transmission data.
[0025] In some embodiments, encrypting the initial transmission data, the quantum transmission data, and the quantum coded random number to obtain the target transmission data includes:
[0026] Symmetrically encrypting the initial transmission data to obtain symmetric transmission data;
[0027] Asymmetrically encrypt the quantum transmission data, the quantum coded random number, and the symmetric transmission data to obtain the target transmission data.
[0028] In some embodiments, the asymmetric encryption of the quantum transmission data, the quantum coded random number, and the symmetric transmission data to obtain the target transmission data includes:
[0029] Encapsulating the quantum transmission data, the quantum coded random number and the symmetric transmission data to obtain encapsulated transmission data;
[0030] The encapsulated transmission data is encrypted according to a preset public key to obtain the target transmission data.
[0031] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a data quantum transmission device, the device comprising:
[0032] A data acquisition module is used to acquire initial transmission data;
[0033] A quantum coding module, used to perform quantum coding on the initial transmission data according to a preset quantum coding random number to obtain quantum transmission data;
[0034] A data encryption module, used to encrypt the initial transmission data, the quantum transmission data and the quantum coded random number to obtain target transmission data;
[0035] The data transmission module is used to transmit data to a preset data receiving end according to the target transmission data.
[0036] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0037] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0038] The present application proposes a data quantum transmission method and device, an electronic device, and a storage medium, which first obtains initial transmission data, then quantum encodes the initial transmission data according to a preset quantum coding random number to obtain quantum transmission data, and forms a digital signature for the initial transmission data based on quantum coding, thereby preventing the data from being tampered with during transmission and improving the security of the data during data transmission; further, encrypting the initial transmission data, the quantum transmission data, and the quantum coding random number to obtain target transmission data, preventing the data from being deciphered during transmission, obtaining encrypted target transmission data, and finally transmitting the target transmission data to a preset data receiving end, thereby realizing secure data transmission that can prevent the data from being deciphered and tampered with. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flow chart of a data quantum transmission method provided in an embodiment of the present application;
[0040] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.
[0041] Figure 3 yes Figure 2 Flow chart of step S202 in FIG.
[0042] Figure 4 yes Figure 2 Flow chart of step S203 in FIG.
[0043] Figure 5 yes Figure 4 Flow chart of step S403 in FIG.
[0044] Figure 6 yes Figure 1 Flow chart of step S103 in FIG.
[0045] Figure 7 yes Figure 6 Flowchart of step S602 in FIG.
[0046] Figure 8 is a schematic diagram of the structure of a data quantum transmission device provided in an embodiment of the present application;
[0047] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0051] First, some nouns involved in this application are analyzed:
[0052] Reed-Muller Codes: Reed-Muller coding is a linear error correction code widely used for error detection and correction in communication and storage systems. This coding technology was developed by David E. Muller and Irving S. Reed in the 1950s and is a type of polynomial code. Reed-Muller coding mainly constructs the coding matrix by generating polynomials. It has good minimum distance characteristics and can effectively handle multiple random errors. The application of this technology includes wireless communication, satellite communication, data storage, and digital broadcasting. In the field of artificial intelligence, Reed-Muller coding can be used to protect the data integrity during machine learning data transmission, especially to reduce the error rate when transmitting large amounts of data. By using advanced encoding and decoding algorithms, Reed-Muller coding not only improves the reliability of data transmission, but also enhances the ability of information systems to process data, providing more stable data support for artificial intelligence systems.
[0053] Hadamard Matrix: A Hadamard matrix is a square matrix consisting of +1 and -1, where any two rows or columns are orthogonal. This matrix has important applications in mathematics and engineering, especially in technical fields such as information theory, signal processing, image processing, and data compression. The properties of the Hadamard matrix make it particularly useful in constructing error correction codes and performing fast data transformations. In the field of artificial intelligence, the Hadamard matrix can be used to optimize the weight initialization of neural networks and improve the efficiency and stability of learning algorithms. In addition, the Hadamard transform, a mathematical transform based on the Hadamard matrix, is widely used in digital signal processing, such as image analysis and compression, and in the implementation of quantum logic gates in quantum computing. The Hadamard matrix not only improves the efficiency of processing signals and images, but also expands the application capabilities of artificial intelligence systems in complex data analysis and processing.
[0054] Computational Basis: The computational basis is a set of base states used in quantum computing, usually consisting of all possible binary sequence states, such as |0> and |1> or their Cartesian products such as |00>, |01>, |10>, and |11>. These base states represent the standard states of quantum bits (qubits) and are used to describe the complete state space of quantum systems. In quantum computer science, computational basis is the basis for quantum algorithms and quantum logic operations because they allow quantum computers to efficiently represent and manipulate information. The concept of computational basis is central to understanding quantum computing, quantum coding, and quantum error correction. These technologies are advanced research in the field of artificial intelligence, which aims to use the principles of quantum mechanics to simulate, extend, and expand computing power, allowing quantum computers to handle problems that are extremely complex for traditional computers. By developing quantum algorithms based on computational basis, researchers can explore new computing paradigms and thus promote the development of artificial intelligence technology.
[0055] Tensor Product: A tensor product is a mathematical operation used to create a new high-dimensional vector space between multiple vector spaces. In linear algebra and multidimensional data processing, the tensor product allows data of different dimensions to be combined to form new structures with composite features. In physics and engineering, the tensor product is a key tool for describing the state of complex systems, especially in quantum mechanics and relativity. In the field of artificial intelligence, the tensor product is often used to represent and process data in multidimensional arrays, such as processing image, sound, and video data in multi-layer neural networks. In addition, the tensor product is used in machine learning models to construct and optimize parameter spaces, especially when dealing with complex models in deep learning algorithms. The tensor product provides a powerful way to represent nonlinear relationships in learning algorithms. In this way, the tensor product expands the processing power of artificial intelligence systems, enabling them to simulate and analyze various complex functions of human intelligence in higher dimensions.
[0056] Data transmission refers to the transmission of data from one data node to another. In order to ensure the security of the transmission process, the data is usually encrypted to prevent the data from being stolen or tampered with during the transmission process. At present, traditional key encryption algorithms are widely used in data encryption, but with the improvement of computer computing power, the data encrypted by the key encryption algorithm faces the risk of being decrypted, which makes the data likely to be stolen and tampered with during the transmission process, which reduces the security of the data during the data transmission process. Therefore, how to improve the security of data during transmission has become an urgent problem to be solved.
[0057] Based on this, the embodiments of the present application provide a data quantum transmission method and device, an electronic device and a storage medium, aiming to improve the security of data during the transmission process.
[0058] A data quantum transmission method and device, electronic device, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the data quantum transmission method in the embodiments of the present application is described.
[0059] The data quantum transmission method provided in the embodiment of the present application relates to the field of data transmission technology. The data quantum transmission method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the data quantum transmission method, etc., but is not limited to the above forms.
[0060] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0061] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0062] Figure 1 is an optional flow chart of the data quantum transmission method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S104.
[0063] Step S101, obtaining initial transmission data;
[0064] Step S102, quantum encoding the initial transmission data according to a preset quantum encoding random number to obtain quantum transmission data;
[0065] Step S103, encrypting the initial transmission data, quantum transmission data and quantum coded random numbers to obtain target transmission data;
[0066] Step S104: performing data transmission to a preset data receiving end according to the target transmission data.
[0067] In steps S101 to S104 shown in the embodiment of the present application, initial transmission data is first acquired, and then quantum encoding is performed on the initial transmission data according to a preset quantum encoding random number to obtain quantum transmission data, and a digital signature is formed on the initial transmission data based on quantum encoding, thereby preventing the data from being tampered with during transmission and improving the security of the data during data transmission; further, the initial transmission data, the quantum transmission data and the quantum encoding random number are encrypted to obtain target transmission data to prevent the data from being deciphered during transmission, and encrypted target transmission data is obtained, and finally the target transmission data is transmitted to a preset data receiving end, thereby realizing secure data transmission that can prevent the data from being deciphered and tampered with.
[0068] In step S101 of some embodiments, the initial transmission data refers to the original information or data set to be transmitted at the beginning of the data transmission process, that is, the initial transmission data includes all the original content that needs to be securely transmitted. For example, on a registration website, the user's identity registration information sent by the user end to the data receiving end can be the initial transmission data.
[0069] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S203:
[0070] Step S201, binary encoding the initial transmission data to obtain an initial binary data string;
[0071] Step S202, performing coding base mapping on the initial binary data string according to the quantum coded random number to obtain an initial coding base;
[0072] Step S203, quantum encoding the initial binary data string according to the initial coding basis to obtain quantum transmission data.
[0073] In steps S201 to S203 shown in the embodiment of the present application, the initial transmission data is binary-encoded to obtain an initial binary data string, and then the initial binary data string is mapped to a coding base according to a quantum coding random number to obtain an initial coding base, and finally the initial binary data string is quantum-encoded according to the initial coding base to obtain quantum transmission data, thereby forming a digital signature for the initial transmission data based on quantum coding, thereby preventing the data from being tampered with during the transmission process and improving the security of the data during the data transmission process.
[0074] In step S201 of some embodiments, binary encoding is to convert the original data into binary form, that is, a bit sequence composed of 0 and 1, and the initial binary data string refers to a bit sequence after binary encoding, which is composed of a series of 0 and 1. The binary encoding method may include but is not limited to including converting the initial transmission data into ASCII encoding or UTF-8 binary encoding, for example, ASCII encoding of the character string "Hello" obtains a binary string of "01001000 0110010101101100 01101100 01101111".
[0075] See also Figure 3 In some embodiments, step S202 may include but is not limited to steps S301 to S303:
[0076] Step S301, obtaining the number of bits of the initial binary data string to obtain the number of bits of the coding base;
[0077] Step S302, creating a coding base according to the number of coding base bits to obtain an alternative coding base;
[0078] Step S303, data mapping is performed on the candidate coding base according to the initial binary data string and the quantum coded random number to obtain the initial coding base.
[0079] In steps S301 to S303 shown in the embodiment of the present application, the number of bits of the initial binary data string is obtained to obtain the number of bits of the coding base, and then the coding base is created according to the number of bits of the coding base to obtain the candidate coding base, and finally the candidate coding base is data mapped according to the initial binary data string and the quantum coding random number to obtain the initial coding base, thereby determining the coding base corresponding to the initial binary data string, that is, the initial coding base, which provides a data basis for the subsequent quantum coding of the initial binary data string.
[0080] In step S301 of some embodiments, the number of bits of the initial binary data string refers to the total number of single bits constituting the initial binary data string. For example, if the initial binary data string is 1101010, the number of bits of the initial binary data string, i.e., the number of bits of the coding base, is 7.
[0081] In step S302 of some embodiments, the coding base is created based on Reed-Muller Codes (RM). The construction of RM codes includes two parameters, order r and dimension m. The code length of RM codes is 2 m Power.
[0082] When creating the coding base, let the code length of RM coding be 2 m The number of bits n of the coding base is consistent, that is, the dimension m of the RM coding is determined, and then r = m / 2, that is, the dimension m in the RM coding is determined to be log2n, and the order of the RM coding is determined to be Then the RM code is determined, that is, the candidate code base is obtained.
[0083] It should be noted that when the order of RM coding is half of the dimension, that is, RM(m / 2,m), the minimum Hamming distance of any codeword in RM is At this time, the different candidate coding bases corresponding to any two different initial binary data strings have anti-collision properties, as shown in formula (1):
[0084]
[0085] Among them, x1 is the first initial binary data string, x2 is the second initial binary data string, and x1 is different from x2, b1 is the alternative coding basis corresponding to the first initial binary data string, b2 is the alternative coding basis corresponding to the second initial binary data string, H(x1,x2) is the Hamming distance between the first initial binary data string and the second initial binary data string, and H(b1,b2) is the Hamming distance between the alternative coding basis corresponding to the first initial binary data string and the alternative coding basis corresponding to the second initial binary data string.
[0086] It should be noted that when different candidate coding bases corresponding to any two different initial binary data strings have anti-collision properties, the probability of different quantum codes being misjudged as the same is reduced. For example, in the case of a first initial binary data string and a second initial binary data string, the first initial binary data string corresponds to the first initial coding base, and the second initial binary data string corresponds to the second initial coding base. Then, the first initial binary data string is quantum encoded according to the first initial coding base to obtain the first quantum transmission data, and at the same time, the second initial binary data string is quantum encoded according to the second initial coding base to obtain the second quantum transmission data. At this time, since the minimum Hamming distance between the first initial coding base and the second initial coding base is greater than or equal to Therefore, the sum of the Hamming distance between the first initial binary data string and the second initial binary data string and the Hamming distance between the first initial coding base and the second initial coding base is greater than or equal to This determines that the difference between the number of different bits of the first quantum transmission data and the second quantum transmission data is greater than a preset difference threshold, thereby reducing the difference between the first quantum transmission data and the second quantum transmission data being misjudged as the same quantum data, that is, the first quantum transmission data and the second quantum transmission data will not be considered to be the same quantum data. On this basis, the quantum transmission data formed by an initial binary data string is ultimately unique, that is, the quantum transmission data corresponding to an initial binary data string is different from the quantum transmission data corresponding to another initial binary data string, so the quantum transmission data can be used as a digital signature of the initial binary data string.
[0087] It should be noted that when the coding base is created, the code length of the RM code is set to 2 m The number of bits n of the coding base is consistent, that is, the dimension m of the RM coding is determined, and then r = m / 2, that is, the dimension m in the RM coding is determined to be log2n, and the order of the RM coding is determined to be Under the premise of determining RM coding, the code length of RM coding must be the same as the number of bits of the initial binary data string. For example, if the number of bits of the initial binary data string is 8, the code length of RM coding must be 8.
[0088] It should be noted that when the initial transmission data is binary-encoded to obtain the initial binary data string, the number of bits of the initial binary data string must be 2 according to the preset binary encoding algorithm. k The length of k is a natural number greater than or equal to 1. This ensures that the code length of the subsequent RM encoding can be consistent with the number of bits of the initial binary data string.
[0089] In step S303 of some embodiments, data mapping of the candidate coding base according to the initial binary data string and the quantum coding random number is specifically mapping the initial binary data string according to the quantum coding random number according to a preset mapping rule, and the mapping rule can be addition, multiplication, or other mapping rules that can make an initial binary data string uniquely correspond to an initial coding base. For example, the initial binary data string is "1010", the mapping rule is addition, the quantum coding random number is 6, the corresponding binary string is "0110", and the data string after binary addition, that is, the initial coding base is "1100".
[0090] See also Figure 4 In some embodiments, step S203 may include but is not limited to steps S401 to S403:
[0091] Step S401, filtering the position information of the bits of the initial coding base according to the value of the bits of the initial coding base and the preset calculation base value to obtain the calculation base bit position data;
[0092] Step S402, filtering the position information of the bits of the initial coding basis according to the calculated basis bit position data to obtain the Hadamard basis bit position data;
[0093] Step S403, quantum encoding the initial binary data string according to the calculated basis bit position data and the Hadamard basis bit position data to obtain quantum transmission data.
[0094] In steps S401 to S403 shown in the embodiment of the present application, the position information of the bits of the initial coding basis is screened according to the value of the bits of the initial coding basis and the preset calculation basis value to obtain the calculation basis bit position data, and then the position information of the bits of the initial coding basis is screened according to the calculation basis bit position data to obtain the Hadamard basis bit position data, and finally the initial binary data string is quantum encoded according to the calculation basis bit position data and the Hadamard basis bit position data to obtain the quantum transmission data, thereby determining which bit in the initial coding basis needs to be quantum encoded by the calculation basis, and determining which bit in the initial coding basis needs to be quantum encoded by the Hadamard basis, and by performing different quantum encodings on different positions, the complexity of the quantum transmission data is increased, and finally the characteristic that the data cannot be tampered with during the transmission process is achieved.
[0095] In step S401 of some embodiments, the position of the bit is screened according to the value of each bit in the initial coding basis and the preset calculation basis value. The specific rule is that when the value of the bit is 0, the bit is determined to be subjected to calculation basis quantum coding.
[0096] It should be noted that this application does not limit the value of the calculation base, and the calculation base can be either 0 or 1. Therefore, when the value of the bit is 1, the calculation base quantum encoding can also be selected for the bit, and the specific restrictions can be set according to the actual scenario.
[0097] In step S402 of some embodiments, the data of the calculation basis bit position determines which bits in the initial coding basis need to use the calculation basis for quantum encoding, and the bit positions not determined by the calculation basis bit position data are quantum encoded using the Hadamard basis.
[0098] See also Figure 5 In some embodiments, step S403 includes but is not limited to steps S501 to S503:
[0099] Step S501, performing calculation basis encoding on the initial binary data string according to the calculation basis bit position data, to obtain at least one calculation basis quantum code and bit position data of the calculation basis quantum code;
[0100] Step S502, performing Hadamard-based encoding on the initial binary data string according to the Hadamard-based bit position data to obtain at least one Hadamard-based quantum code and bit position data of the Hadamard-based quantum code;
[0101] Step S503, performing tensor calculation according to the calculation basis quantum code, the bit position data of the calculation basis quantum code, the Hadamard basis quantum code and the bit position data of the Hadamard basis quantum code to obtain quantum transmission data.
[0102] In steps S501 to S503 shown in the embodiment of the present application, the initial binary data string is subjected to calculation basis encoding according to the calculation basis bit position data to obtain at least one calculation basis quantum code and bit position data of the calculation basis quantum code, and then the initial binary data string is subjected to Hadamard basis encoding according to the Hadamard basis bit position data to obtain at least one Hadamard basis quantum code and bit position data of the Hadamard basis quantum code, and finally tensor calculation is performed according to the calculation basis quantum code, the bit position data of the calculation basis quantum code, the Hadamard basis quantum code, and the bit position data of the Hadamard basis quantum code to obtain quantum transmission data, thereby realizing quantum encoding of the initial binary data string, forming a digital signature that cannot be tampered with and has high complexity, and improving the security of data during data transmission.
[0103] In step S501 of some embodiments, the calculation base bit position data indicates which bits in the initial binary data string need to be calculated based quantum coding. Then, the corresponding bits are quantum coded according to these specified positions to generate at least one calculation base quantum coding and its corresponding bit position data. For example, the initial binary data string is 1101, and the calculation base bit position data indicates that the second and fourth bits need to be calculated based quantum coding. The second bit 1 is calculated based quantum coding to obtain the quantum state |1>, that is, the calculation base quantum coding is |1> and the bit position data 2 of the calculation base quantum coding. The fourth bit 1 is calculated based quantum coding to obtain the quantum state |1>, that is, the calculation base quantum coding |1> and the bit position data 4 of the calculation base quantum coding.
[0104] In step S502 of some embodiments, the Hadamard base bit position data indicates which bits in the initial binary data string need to be quantum coded by the Hadamard base. Then, the corresponding bits are quantum coded according to the specified positions to generate at least one Hadamard base quantum code and its corresponding bit position data. For example, the initial binary data string is 1101, and the Hadamard base bit position data indicates that the first and third bits need to be quantum coded by the calculation base. The first bit 1 is quantum coded by the Hadamard base to obtain the quantum state |->, that is, the Hadamard base quantum code is |-> and the bit position data of the Hadamard base quantum code is 1. The third bit 0 is quantum coded by the Hadamard base to obtain the quantum state 1+>, the Hadamard base quantum code is |+>, and the bit position data of the Hadamard base quantum code is 3.
[0105] In step S503 of some embodiments, the bit position data of the calculation base quantum code and the bit position data of the Hadamard base quantum code are sorted from small to large, and then the calculation base quantum code and the Hadamard base quantum code at the corresponding position are tensor-producted to obtain quantum transmission data. For example, the first bit of the Hadamard base quantum code |->, the second bit of the calculation base quantum code |1>, the third bit of the Hadamard base quantum code |+>, and the fourth bit of the calculation base quantum code |1>, and the tensor product operation is performed on each quantum state from the first bit to the fourth bit in the order of the bit positions to obtain the entire quantum transmission data
[0106] See also Figure 6 In some embodiments, step S103 includes but is not limited to steps S601 to S602:
[0107] Step S601, symmetrically encrypting the initial transmission data to obtain symmetrical transmission data;
[0108] Step S602, asymmetrically encrypting the quantum transmission data, quantum coded random numbers and symmetric transmission data to obtain target transmission data.
[0109] In steps S601 to S602 shown in the embodiment of the present application, the initial transmission data is symmetrically encrypted to obtain symmetrical transmission data, and then the quantum transmission data, the quantum encoded random number and the symmetrical transmission data are asymmetrically encrypted to obtain the target transmission data, thereby preventing the data from being deciphered during the transmission process and improving the security of the data during the transmission process.
[0110] In step S601 of some embodiments, symmetric encryption is an encryption method that uses the same key in the encryption and decryption process, and the sender uses this key to convert the initial transmission data into symmetric transmission data. The receiver uses the same key to convert the symmetric transmission data into the initial transmission data. Symmetric encryption can be Advanced Encryption Standard (AES), Data Encryption Standard (DES) or 3DES (Triple Data Encryption Standard), and this application does not make specific restrictions.
[0111] See also Figure 7 In some embodiments, step S602 may include but is not limited to steps S701 to S702:
[0112] Step S701, encapsulating the quantum transmission data, the quantum coded random number and the symmetric transmission data to obtain encapsulated transmission data;
[0113] Step S702: encrypt the encapsulated transmission data according to a preset public key to obtain target transmission data.
[0114] In steps S701 to S702 shown in the embodiment of the present application, encapsulation of quantum transmission data, quantum coded random numbers and symmetric transmission data is performed to obtain encapsulated transmission data, and then the encapsulated transmission data is encrypted according to a preset public key to obtain target transmission data, thereby further improving the security of the data and improving the security of the data during the transmission process.
[0115] In step S701 of some embodiments, data encapsulation refers to combining multiple different types of data units, namely quantum transmission data, quantum coded random numbers, and symmetric transmission data, into a unified, structured data packet. For example, the quantum transmission data, quantum coded random numbers, and symmetric transmission data are encapsulated using the JSON format. For example, the quantum transmission data, quantum coded random numbers, and symmetric transmission data are encapsulated using the ZIP compression format.
[0116] In step S702 of some embodiments, in an asymmetric encryption algorithm, a public key and a private key are included, and data can be encrypted by the public key, and only the private key can decrypt the data encrypted by the public key. In this embodiment, the data sending end includes a preset public key, and the data sending end encrypts the encapsulated transmission data by the public key to obtain the target transmission data, and the target transmission data can only be decrypted by the end with the private key, thereby ensuring that the data is not stolen during the data transmission process. The data encryption method can be an RSA algorithm or an ECC algorithm, and this application does not make specific restrictions.
[0117] In step S104 of some embodiments, the preset data receiving end is the data receiving party, and the data sending party transmits the target transmission data to the data receiving party. The data transmission method may be RPC, HTTP or HTTPS, and this application does not impose any specific restrictions.
[0118] In one embodiment, the data transmitting end performs random number generation processing to obtain quantum coded random numbers, then performs quantum coding on the initial transmission data according to the quantum coded random numbers to obtain quantum transmission data, then performs symmetric encryption on the initial transmission data to obtain symmetric transmission data, then performs data encapsulation on the quantum transmission data, the quantum coded random numbers and the symmetric transmission data to obtain encapsulated transmission data, and finally performs data encryption on the encapsulated transmission data according to a preset public key to obtain target transmission data. The target transmission data is then transmitted to the data receiving end.
[0119] After obtaining the target transmission data, the data receiving end decrypts the target transmission data according to the preset private key to obtain the encapsulated transmission data, and then parses the encapsulated transmission data to obtain quantum transmission data, quantum coding random numbers and symmetric transmission data. The data receiving end then performs symmetric decryption based on the symmetric transmission data to obtain the initial transmission data. The initial transmission data is then quantum-encoded according to the quantum coding random number to obtain verification transmission data, and then the verification transmission data and the quantum transmission data are compared. Since the quantum coding is collision-resistant during the quantum coding process, if the data is tampered with in the middle, the verification transmission data and the quantum transmission data will not be judged to be the same, that is, if the verification transmission data and the quantum transmission data are judged to be the same, the data has not been modified during the data transmission process. In the case where the verification transmission data and the quantum transmission data are the same, the data receiving end determines that the decrypted initial transmission data is consistent with the initial transmission data sent by the data sending end.
[0120] See also Figure 8 The embodiment of the present application further provides a data quantum transmission device, which can implement the above-mentioned data quantum transmission method, and the device includes:
[0121] The data acquisition module 801 is used to acquire initial transmission data;
[0122] The quantum coding module 802 is used to perform quantum coding on the initial transmission data according to a preset quantum coding random number to obtain quantum transmission data;
[0123] The data encryption module 803 is used to encrypt the initial transmission data, quantum transmission data and quantum coded random numbers to obtain target transmission data;
[0124] The data transmission module 804 is used to transmit data to a preset data receiving end according to target transmission data.
[0125] The specific implementation of the data quantum transmission device is basically the same as the specific implementation of the above-mentioned data quantum transmission method, and will not be repeated here.
[0126] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above data quantum transmission method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0127] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0128] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0129] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the data quantum transmission method of the embodiment of the present application;
[0130] Input / output interface 903, used to implement information input and output;
[0131] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0132] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0133] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0134] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned data quantum transmission method is implemented.
[0135] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0136] The data quantum transmission method, data quantum transmission device, electronic device and storage medium provided in the embodiments of the present application first obtain initial transmission data, then quantum encode the initial transmission data according to a preset quantum coding random number to obtain quantum transmission data, and form a digital signature for the initial transmission data based on quantum coding, thereby preventing the data from being tampered with during transmission and improving the security of the data during data transmission; further, encrypt the initial transmission data, quantum transmission data and quantum coding random number to obtain target transmission data, prevent the data from being deciphered during transmission, obtain encrypted target transmission data, and finally transmit the target transmission data to a preset data receiving end, thereby realizing secure data transmission that can prevent the data from being deciphered and tampered with.
[0137] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0138] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0139] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0140] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0141] The terms "second", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0142] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0144] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0147] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A data quantum transmission method, characterized in that: The method comprises: Get initial transmission data; Performing quantum encoding on the initial transmission data according to a preset quantum encoding random number to obtain quantum transmission data; Encrypting the initial transmission data, the quantum transmission data and the quantum coded random number to obtain target transmission data; Data transmission is performed to a preset data receiving end according to the target transmission data.
2. The method according to claim 1, characterized in that The step of performing quantum encoding on the initial transmission data according to a preset quantum encoding random number to obtain quantum transmission data includes: Binary-encoding the initial transmission data to obtain an initial binary data string; Performing coding base mapping on the initial binary data string according to the quantum coded random number to obtain an initial coding base; The initial binary data string is quantum encoded according to the initial coding basis to obtain the quantum transmission data.
3. The method according to claim 2, characterized in that The step of performing coding base mapping on the initial binary data string according to the quantum coded random number to obtain an initial coding base includes: Obtaining the number of bits of the initial binary data string to obtain the number of bits of the coding base; Create a coding base according to the number of bits of the coding base to obtain an alternative coding base; The candidate coding base is data mapped according to the initial binary data string and the quantum coded random number to obtain the initial coding base.
4. The method according to claim 2, characterized in that: The step of performing quantum coding on the initial binary data string according to the initial coding basis to obtain the quantum transmission data comprises: The position information of the bits of the initial coding base is screened according to the value of the bits of the initial coding base and the preset calculation base value to obtain the calculation base bit position data; Filtering the position information of the bits of the initial coding basis according to the calculation basis bit position data to obtain Hadamard basis bit position data; The initial binary data string is quantum encoded according to the calculation basis bit position data and the Hadamard basis bit position data to obtain the quantum transmission data.
5. The method according to claim 4, characterized in that The step of performing quantum encoding on the initial binary data string according to the calculation basis bit position data and the Hadamard basis bit position data to obtain the quantum transmission data comprises: Performing calculation basis encoding on the initial binary data string according to the calculation basis bit position data to obtain at least one calculation basis quantum code and bit position data of the calculation basis quantum code; Performing Hadamard-based encoding on the initial binary data string according to the Hadamard-based bit position data to obtain at least one Hadamard-based quantum code and the bit position data of the Hadamard-based quantum code; Tensor calculation is performed according to the calculation basis quantum code, the bit position data of the calculation basis quantum code, the Hadamard basis quantum code, and the bit position data of the Hadamard basis quantum code to obtain the quantum transmission data.
6. The method according to any one of claims 1 to 5, characterized in that: The encrypting the initial transmission data, the quantum transmission data and the quantum coded random number to obtain the target transmission data includes: Symmetrically encrypting the initial transmission data to obtain symmetric transmission data; Asymmetrically encrypt the quantum transmission data, the quantum coded random number, and the symmetric transmission data to obtain the target transmission data.
7. The method according to claim 1, characterized in that The asymmetric encryption of the quantum transmission data, the quantum coded random number and the symmetric transmission data to obtain the target transmission data includes: Encapsulating the quantum transmission data, the quantum coded random number and the symmetric transmission data to obtain encapsulated transmission data; The encapsulated transmission data is encrypted according to a preset public key to obtain the target transmission data.
8. A data quantum transmission device, characterized in that: The device comprises: A data acquisition module is used to acquire initial transmission data; A quantum coding module, used to perform quantum coding on the initial transmission data according to a preset quantum coding random number to obtain quantum transmission data; A data encryption module, used to encrypt the initial transmission data, the quantum transmission data and the quantum coded random number to obtain target transmission data; The data transmission module is used to transmit data to a preset data receiving end according to the target transmission data.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the data quantum transmission method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data quantum transmission method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Visual quantum computing programming system
CN116911396A
Key generation and distribution system based on quantum random number
CN119254439A
Quantum cryptography with multi-party randomness
US7697693B1
Cited By
Data transmission method and system for fusion of quantum communication and 5G network
CN121283525A