Quantum-based random number generation method, system, and apparatus

By using a quantum key distribution network and distributed nodes to collaboratively generate random numbers, the problems of easily cracked random numbers and high hardware costs in lottery systems are solved, achieving a balance between security and economy.

CN118944875BActive Publication Date: 2026-02-24CHINA MOBILE SHANGHAI ICT CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411083411.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2026-02-24
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

In the existing lottery system, the software-based random numbers are easily cracked, while the hardware-based physical encryption machine is expensive, making it difficult to balance security and economy.

Method used

A quantum-based random number generation system is adopted, which generates random numbers through the collaboration of quantum key distribution network and distributed nodes. The security of quantum key distribution and the multi-source random number generation of distributed nodes are used to generate the target random number.

Benefits of technology

It improves the security of random numbers, reduces encryption costs, ensures that the lottery results are not easily cracked, and does not rely on a single hardware encryption machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118944875B_ABST
    Figure CN118944875B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a quantum-based random number generation method, system and device, the system comprising: a client configured to send a random number generation request to a target distributed node and send a key acquisition request to a quantum key distribution network; the target distributed node configured to receive the random number generation request sent by the client and send the random number generation request to the remaining distributed nodes in the system; the quantum key distribution network configured to acquire the key acquisition request sent by the client and send a target key to each distributed node in the system; the target distributed node is further configured to receive the target key sent by the quantum key distribution network and send a target random number to the client; and the client is further configured to receive the target random number sent by the target distributed node. Since the generated target random number does not depend on a single computing source, the final lottery result relies on the random numbers generated by each distributed node in the system, making the final random number more secure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of quantum security technology, and in particular to quantum-based random number generation methods, systems and devices. Background Technology

[0002] Currently, lottery systems are widely used, such as for housing selection, vehicle license plate allocation, and on-site lucky draws. However, with technological breakthroughs and evolution, the fairness and security of lottery systems face increasingly severe challenges.

[0003] Related technologies typically include two lottery methods: software-based and hardware-based. The software-based lottery method uses the random number generated by the software as the key seed for the lottery result. However, since the random number generated by the software is pseudo-random, it is easy to crack and poses a security problem. The hardware-based lottery method requires the generation of highly secure random numbers through a physical hardware encryption machine, but this method is more costly. Summary of the Invention

[0004] This disclosure provides a quantum-based random number generation method, system, and apparatus.

[0005] According to a first aspect of this disclosure, a quantum-based random number generation system is provided, the system comprising: a client, a quantum key distribution network, and multiple distributed nodes;

[0006] The client is configured to send a random number generation request to a target distributed node among the plurality of distributed nodes, and to send a key acquisition request to the quantum key distribution network; wherein the random number generation request and the key acquisition request respectively carry the client's identification information;

[0007] The target distributed node is used to receive the random number generation request sent by the client and send the random number generation request to the other distributed nodes in the system;

[0008] The quantum key distribution network is used to receive the key acquisition request sent by the client and send the target key generated based on the identification information to each distributed node in the system;

[0009] The target distributed node is also configured to receive the target key sent by the quantum key distribution network, generate a target random number based on the target key, a locally generated random number and random numbers sent by other distributed nodes, and send the target random number to the client;

[0010] The client is also used to receive a target random number sent by the target distributed node.

[0011] According to a second aspect of this disclosure, a quantum-based random number generation method is provided, applied to distributed nodes, the method comprising:

[0012] Receive a random number generation request sent by a client, the random number generation request carrying the client's identification information;

[0013] Receive the target key sent by the quantum key distribution network based on the identification information;

[0014] Obtain random numbers generated locally by distributed nodes and random numbers generated by other distributed nodes, and generate a target random number based on the target key and each random number;

[0015] Send the target random number to the client.

[0016] According to a third aspect of this disclosure, a quantum-based random number generation device is provided for use in distributed nodes, the device comprising:

[0017] A request receiving module is used to receive a random number generation request sent by a client, wherein the random number generation request carries the client's identification information;

[0018] The request sending module is used to send a key acquisition request containing the identification information to the quantum key distribution network;

[0019] A key receiving module is used to receive the target key sent by the quantum key distribution network based on the identification information;

[0020] The random number acquisition module is used to acquire random numbers generated locally by distributed nodes and random numbers generated by other distributed nodes, and generate a target random number based on the target key and each random number;

[0021] A random number sending module is used to send the target random number to the client.

[0022] According to a fourth aspect of this disclosure, an electronic device is provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described above.

[0023] According to a fifth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the methods described above.

[0024] According to a sixth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the methods described above in this disclosure.

[0025] The quantum-based random number generation method, system, and apparatus provided in this disclosure receive a random number generation request from a client, send a key acquisition request containing identification information to a quantum key distribution network, and receive a target key sent by the quantum key distribution network based on the identification information. It acquires random numbers generated locally by a target distributed node and random numbers generated by other distributed nodes, generates a target random number based on the target key and the random numbers, and sends the target random number to the client. Since the target random number generated in this embodiment does not rely on a single computational source, the final lottery result depends on the random numbers generated by each distributed node in the system, making the final generated random number more secure and less prone to cracking; furthermore, the generation of the random number does not rely on a physical hardware encryption machine, resulting in lower encryption costs. Attached Figure Description

[0026] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0027] Figure 1 A schematic diagram of a quantum-based random number generation system provided as an exemplary embodiment of this disclosure;

[0028] Figure 2 A flowchart illustrating a quantum-based random number generation method provided as an exemplary embodiment of this disclosure;

[0029] Figure 3 A schematic block diagram of the functional modules of a quantum-based random number generation device provided for an exemplary embodiment of this disclosure;

[0030] Figure 4 A structural block diagram of an electronic device provided as an exemplary embodiment of this disclosure;

[0031] Figure 5 A block diagram of a computer system provided for an exemplary embodiment of this disclosure. Detailed Implementation

[0032] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0033] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0034] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0035] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0036] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0037] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0038] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0039] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device. It is understood that the above notification and user authorization process is merely illustrative and does not constitute a limitation on the implementation of this disclosure; other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0040] In the embodiments provided in this disclosure, a quantum-based random number generation system is provided, which may include a client, a quantum key distribution network, and multiple distributed nodes. In the embodiments, such as... Figure 1 As shown, the distributed nodes in this quantum-based random number generation system can be multiple, for example, at least two. This embodiment uses a quantum-based random number generation system with four distributed nodes as an example, specifically including distributed node 1, distributed node 2, distributed node 3, and distributed node 4. Wherein:

[0041] The client is used to send random number generation requests to the target distributed node among multiple distributed nodes, and to send key acquisition requests to the quantum key distribution network. The random number generation request and the key acquisition request each carry the client's identification information.

[0042] In this embodiment, when a user needs to participate in a lottery, they can initiate a lottery application through a client. The lottery range can be a set R{R1, R2...RN}, the client's identification information is KEYID, and R'{r1, r2...rN} is generated based on R. The KEYID and R' are then sent to any distributed node 1 in the system.

[0043] For example, if a user needs to randomly draw a ball of one color from 10 colors, these 10 colors can be converted into 10 different fields or identifiers R', such as converting the 10 different colored balls into 10 different numbers. The client can send its own client identification information KEYID and R' to any node in the system.

[0044] In addition, the client will send a key acquisition request to the quantum key distribution network, which will carry the client's identification information KEYID. The quantum key distribution network can specifically be a quantum key distribution (QKD), but the implementation is not limited to this.

[0045] Quantum Key Distribution (QKD) utilizes the properties of quantum mechanics to ensure communication security. It enables both communicating parties to generate and share a random, secure key to encrypt and decrypt messages. A crucial and unique property of QKD is that any attempt by a third party to eavesdrop on the password will be detected by both parties. This property is based on the fundamental principle of quantum mechanics: any measurement of a quantum system will interfere with the system. A third party attempting to eavesdrop must measure the password in some way, and these measurements will introduce detectable anomalies. By transmitting information through quantum superposition or quantum entanglement states, the communication system can detect eavesdropping. When the eavesdropping is below a certain threshold, a secure key can be generated. The security of QKD is based on the fundamental principles of quantum mechanics, while traditional cryptography relies on the computational complexity of certain mathematical algorithms. Traditional cryptography cannot detect eavesdropping and therefore cannot guarantee key security. QKD is only used to generate and distribute keys; it does not transmit any actual messages. The key can be used with certain encryption algorithms to encrypt messages, and the encrypted messages can be transmitted over standard channels. The most common algorithm associated with quantum key distribution is the one-time key, which is provably secure if a secret and random key is used. In practical applications, quantum key distribution is often used in conjunction with symmetric-key encryption methods, such as Advanced Encryption Standards (AES).

[0046] The target distributed node is used to receive the random number generation request sent by the client and send the random number generation request to the other distributed nodes in the system. The target distributed node can be any one of the aforementioned distributed nodes, or it can be the distributed node closest to the client; the embodiment is not limited to this.

[0047] In this embodiment, when a distributed node in the system receives a random number generation request sent by a client, it can synchronously forward the random number generation request to other distributed nodes.

[0048] A quantum key distribution network is used to receive key acquisition requests sent by clients and send target keys generated based on identification information to each distributed node in the system.

[0049] In this embodiment, upon receiving a key acquisition request from a client, the quantum key distribution network sends a target key generated based on identification information to each distributed node in the system. This embodiment uses a system with four distributed nodes as an example. Figure 1 As shown, the quantum key distribution network will send the target key to distributed node 1, distributed node 2, distributed node 3 and distributed node 4 respectively.

[0050] It should be noted that, in this embodiment, the quantum key distribution network can pre-generate multiple keys, each of which can correspond to a client identification information. When the quantum key distribution network receives a key acquisition request from a client, it retrieves the key that matches the client's identification information from among the multiple keys, based on the client identification information carried in the key acquisition request.

[0051] In this embodiment, the quantum key distribution network may also generate a key corresponding to the client's identification information carried in the key acquisition request when it receives a key acquisition request from the client, and send the key as the target key to each distributed node of the system.

[0052] The target distributed node is also used to receive the target key sent by the quantum key distribution network, generate a target random number based on the target key, locally generated random number and random number sent by other distributed nodes, and send the target random number to the client.

[0053] In this embodiment, each distributed node can generate its own random number. When generating a local random number, the node can do so either through software or hardware. The method by which each distributed node generates its local random number is not limited to these methods. After generating its own random number locally, each distributed node will send the generated random number to the other distributed nodes in the system.

[0054] To improve system security, each distributed node can encrypt the randomly generated number sent to other distributed nodes in the system using the target key sent by the quantum key distribution network, thereby improving the security of communication between distributed nodes.

[0055] It should be noted that the encryption of communication data between distributed nodes using the target key in this embodiment employs quantum encryption communication. Quantum encryption communication is an uninterrupted and unbreakable method of communication encryption, meaning it is unconditionally secure. Quantum encryption communication mainly consists of two steps: first, quantum key distribution via a quantum channel. The communicating parties obtain a pair of completely random quantum keys known only to the two parties through quantum key distribution. In this step, only the key is generated and distributed. Second, ciphertext transmission via a traditional channel. Using the obtained quantum key, the sender encrypts the information into ciphertext, and the receiver decrypts the received ciphertext, thus achieving complete confidentiality of the communication. Therefore, quantum encryption protects the "key" in traditional encrypted communication, which is the so-called quantum key distribution.

[0056] In this way, after receiving random numbers sent by other distributed nodes, each distributed node in the system can generate the final target random number based on the locally generated random number, the random numbers sent by other nodes, and the target key.

[0057] The client is also used to receive target random numbers sent by the target distributed nodes.

[0058] When the client receives a target random number from the target distributed node, or when the client times out sending a random number from the target distributed node, it sends a random number retrieval request to the other distributed nodes in the system. The client receives the target random numbers from the other distributed nodes in the system, and if the received target random numbers from all distributed nodes are the same, the client confirms the validity of the target random number.

[0059] The quantum-based random number generation system provided in this embodiment receives a random number generation request from a client, sends a key acquisition request containing identification information to a quantum key distribution network, and receives a target key sent by the quantum key distribution network based on the identification information. It acquires random numbers generated locally by the target distributed node and random numbers generated by other distributed nodes, generates a target random number based on the target key and the random numbers, and sends the target random number to the client. Since the target random number generated in this embodiment does not rely on a single computational source, the final lottery result depends on the random numbers generated by each distributed node in the system, making the final generated random number more secure and less prone to cracking; furthermore, the generation of the random number does not rely on a physical hardware encryption machine, resulting in lower encryption costs.

[0060] Based on the above embodiments, in another embodiment provided in this disclosure, the target distributed node is further configured to send a random number acquisition request to the other distributed nodes and receive the target random number sent by the other distributed nodes. Furthermore, the distributed node is further configured to send the target random number to the client if the target random number generated locally is the same as the target random number sent by the other distributed nodes.

[0061] Specifically, after each distributed node generates its own target random number, it synchronously sends the locally generated target random number to the other distributed nodes in the system and receives the target random numbers sent by the other distributed nodes. If the locally generated target random number is the same as the random numbers sent by the other distributed nodes, the target random number is considered valid. Otherwise, if the target random number generated by a distributed node is different from the target random numbers generated by the other distributed nodes, the target random number needs to be regenerated. Through mutual confirmation among the distributed nodes, when the target random numbers generated by all distributed nodes are the same, the distributed node sends the generated target random number to the client. In this way, by verifying whether the target random numbers generated by the distributed nodes are the same, the security of target random number generation can be improved, avoiding security problems caused by sending the target random number to the client when the random numbers generated by the distributed nodes are inconsistent. The distributed node can be the target distributed node that receives the random number generation request sent by the client; the embodiment is not limited to this.

[0062] In the embodiments provided in this disclosure, when the target distributed node generates a target random number based on the target key, a locally generated random number, and random numbers sent by other distributed nodes, the target distributed node obtains the locally generated random number and the random numbers sent by the other distributed nodes. This allows the target distributed node to obtain the random numbers generated by each distributed node in the system. By obtaining the node identifier of each distributed node and determining the node order based on the node identifier, the random numbers can be arranged into a sequence array based on the node order. Then, the target random number is obtained by performing target operations on the sequence array using the target key.

[0063] Specifically, for example, the target distributed node in the system can sort the locally generated random numbers and the random numbers sent by the other distributed nodes according to the node order. For instance, the system includes four distributed nodes: distributed node 1, distributed node 2, distributed node 3, and distributed node 4. The random numbers generated by distributed nodes 1 to 4 are S1, S2, S3, and S4, respectively. The node order is distributed node 1 to distributed node 4. A sequence array is formed by combining the random numbers S1, S2, S3, and S4 generated by distributed nodes 1 to 4. Different operations are performed on this sequence array according to the binary sequence of the target key; for example, an XOR operation is performed when the value is 1, and an XNOR operation is performed when the value is 0. Finally, the result is modulo N to obtain the final random result, i.e., the target random number. It should be noted that the method of performing operations on the sequence array using the binary sequence of the target key can be customized as needed, and the embodiment is not limited to this.

[0064] In the embodiments provided in this disclosure, the client is further configured to send a random number retrieval request to other distributed nodes in the system when the random number transmission from the target distributed node times out. For example, a response time threshold can be set, which can be configured according to actual needs, such as 2 seconds or 5 seconds, and the embodiments are not limited thereto. Timing begins when the client sends a random number generation request to the target distributed node. If the target random number is not received from the target distributed node before the response time threshold is exceeded, a random number retrieval request can be sent to other distributed nodes in the system. This avoids transmission delays caused by system downtime or other reasons, thereby improving the transmission efficiency of the target random number.

[0065] In this embodiment, the client is further configured to, upon receiving a target random number sent by a target distributed node, obtain target random numbers sent by other distributed nodes, and determine the validity of the obtained target random number if all target random numbers are identical. In this way, the client obtains target random numbers sent by each distributed node in the system and performs relevant verification using these target random numbers. If the target random numbers sent by each distributed node are identical, the client can determine that the target random number received is secure and valid. Otherwise, the system may be hijacked. To improve security, if the target random numbers sent by each distributed node are not completely identical, the client can discard the received target random number and resend a random number retrieval request to the distributed nodes in the system to re-obtain the target random number. This significantly improves system security.

[0066] The quantum-based random number generation system provided in this embodiment includes a client, a quantum key distribution network (QKD), and distributed nodes. The client sends a random number generation request to a target distributed node among multiple distributed nodes and a key acquisition request to the QKD. The random number generation request and the key acquisition request each carry the client's identification information. The target distributed node receives the random number generation request from the client and sends it to the remaining distributed nodes in the system. The QKD receives the key acquisition request from the client and sends a target key generated based on the identification information to each distributed node in the system. The target distributed node also receives the target key from the QKD, generates a target random number based on the target key, a locally generated random number, and random numbers sent by the remaining distributed nodes, and sends the target random number to the client. The client also receives the target random number from the target distributed node. Because the target random number generated in this embodiment does not rely on a single computational source, the final lottery result depends on the random numbers generated by each distributed node in the system, making the final generated random number more secure and less susceptible to cracking.

[0067] In this embodiment, since the final result of random number generation does not rely entirely on any single computational source, but rather on the sub-results of each distributed node in the distributed cluster, the algorithmic logic between each sub-result and the key ensures that each distributed node produces the same computational result. If the client times out upon receiving the result, it can effectively determine whether the timeout is due to delays or downtime of the distributed node, or whether the timeout is caused by the distributed node being hijacked.

[0068] Furthermore, the implementation relies on the key security of the quantum key distribution network. For a single random application, all distributed nodes in the system obtain the same key through the client's identification information. While communicating with each other using the key, each node calculates the random sub-result array based on the binary sequence of the key. The quantum network ensures communication security, and the key also ensures that the consensus calculation results of the entire system are the same.

[0069] Based on the above embodiments, this disclosure also provides a quantum-based random number generation method, which can be applied to the distributed nodes in the above embodiments, such as... Figure 2 As shown, the method may include the following steps:

[0070] In step S210, a random number generation request sent by the client is received.

[0071] The random number generation request carries the client's identification information.

[0072] In this embodiment, when a user needs to participate in a lottery, the user can send a random number generation request to the distributed nodes through a client. There can be multiple distributed nodes in the system. The client can send a random number generation request to any distributed node, or to a specific distributed node, such as the nearest one; however, this embodiment is not limited to these options.

[0073] In step S220, the target key sent by the quantum key distribution network based on the identification information is received.

[0074] Since the random number generation request carries the client's identification information, a key acquisition request containing the client's identification information can be sent to the key distribution network. The quantum key distribution network will then send the target key, which matches the client's identification information, to the distributed nodes.

[0075] In step S230, the random numbers generated locally by the distributed nodes and the random numbers generated by other distributed nodes are obtained, and a target random number is generated based on the target key and each random number.

[0076] In this embodiment, each distributed node can generate random numbers locally. The generation of these random numbers can be based on existing software-level or hardware-level random number generation methods; the embodiment is not limited to these methods. The distributed nodes will send the generated random numbers to the other distributed nodes in the system and receive random numbers sent by the other distributed nodes. In this way, the distributed nodes can generate the final target random number based on the locally generated random numbers, the random numbers sent by the other distributed nodes, and the target key, according to relevant algorithm logic.

[0077] In step S240, a target random number is sent to the client.

[0078] In this embodiment, since the generation method of the target random number relies on the random numbers and target keys generated by each distributed node, the source data for generating the target key is the same, and the algorithm logic used for the target random numbers generated by each distributed node is the same, making the target random numbers generated by each distributed node theoretically identical. Therefore, a distributed node can send its own generated target random number to the other distributed nodes and receive the target random numbers sent by the other distributed nodes. By comparison, if the target random numbers generated by each distributed node are exactly the same, the validity of the target random number can be confirmed. This verification ensures the security of random number generation.

[0079] Additionally, when the client receives the target random number sent by the distributed nodes, or when the client encounters a timeout while sending a random number from a distributed node, it can send a random number retrieval request to the remaining distributed nodes in the system. By receiving the target random numbers sent by the other distributed nodes in the system, and confirming that the received target random numbers are identical, the client verifies the validity of the target random number. This secondary verification of the received target random number by the client ensures the security of the generated data.

[0080] The quantum-based random number generation method provided in this disclosure receives a random number generation request from a client and a target key sent by a quantum key distribution network based on identification information. It acquires random numbers generated locally by distributed nodes and random numbers generated by other distributed nodes, generates a target random number based on the target key and these random numbers, and sends the target random number to the client. Since the target random number generated in this embodiment does not rely on a single computational source, the final lottery result depends on the random numbers generated by each distributed node in the system, making the final generated random number more secure and less susceptible to cracking.

[0081] By dividing each functional module according to its corresponding function, this disclosure provides a quantum-based random number generation device, which can be a server, a terminal, or a chip applied to a server. Figure 3 A schematic block diagram of the functional modules of a quantum-based random number generation device provided for an exemplary embodiment of this disclosure. Figure 3 As shown, this quantum-based random number generation device includes:

[0082] The request receiving module 10 is used to receive a random number generation request sent by the client, wherein the random number generation request carries the client's identification information;

[0083] Key receiving module 20 is used to receive the target key sent by the quantum key distribution network based on the identification information;

[0084] The random number acquisition module 30 is used to acquire random numbers generated locally by distributed nodes and random numbers generated by other distributed nodes, and generate a target random number based on the target key and each random number;

[0085] The random number sending module 40 is used to send the target random number to the client.

[0086] The quantum-based random number generation device provided in this embodiment receives a random number generation request sent by a client and a target key sent by a quantum key distribution network based on identification information. It acquires random numbers generated locally by distributed nodes and random numbers generated by other distributed nodes, generates a target random number based on the target key and the random numbers, and sends the target random number to the client. Since the target random number generated in this embodiment does not rely on a single computational source, the final lottery result depends on the random numbers generated by each distributed node in the system, making the final generated random number more secure and less prone to being cracked.

[0087] This disclosure also provides an electronic device, including: at least one processor; a memory for storing processor-executable instructions; wherein the at least one processor is configured to execute the instructions to implement the methods disclosed in this disclosure.

[0088] Figure 4 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this disclosure. For example... Figure 4 As shown, the electronic device 1800 includes at least one processor 1801 and a memory 1802 coupled to the processor 1801. The processor 1801 can perform the corresponding steps in the methods disclosed in the embodiments of this disclosure.

[0089] The processor 1801 described above can also be called a central processing unit (CPU), which can be an integrated circuit chip with signal processing capabilities. Each step in the method disclosed in this embodiment can be implemented by the integrated logic circuitry in the processor 1801 or by software instructions. The processor 1801 can be a general-purpose processor, a digital signal processor (DSP), an ASIC (Application Specific Integrated Circuit), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this embodiment can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in the memory 1802, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor 1801 reads information from the memory 1802 and, in conjunction with its hardware, completes the steps of the method described above.

[0090] Furthermore, various operations / processes according to this disclosure, implemented via software and / or firmware, can be transmitted from a storage medium or network to a computer system with a dedicated hardware architecture, such as... Figure 5 The computer system 1900 shown is equipped with the programs that constitute the software. When various programs are installed, the computer system is able to perform various functions, including those described above. Figure 5 A block diagram of a computer system provided for an exemplary embodiment of this disclosure.

[0091] Computer System 1900 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0092] like Figure 5As shown, the computer system 1900 includes a computing unit 1901, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 1902 or a computer program loaded from a storage unit 1908 into a random access memory (RAM) 1903. The RAM 1903 may also store various programs and data required for the operation of the computer system 1900. The computing unit 1901, ROM 1902, and RAM 1903 are interconnected via a bus 1904. An input / output (I / O) interface 1905 is also connected to the bus 1904.

[0093] Multiple components in computer system 1900 are connected to I / O interface 1905, including: input unit 1906, output unit 1907, storage unit 1908, and communication unit 1909. Input unit 1906 can be any type of device capable of inputting information into computer system 1900. Input unit 1906 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. Output unit 1907 can be any type of device capable of presenting information and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1908 may include, but is not limited to, hard disks and optical disks. Communication unit 1909 allows computer system 1900 to exchange information / data with other devices via a network such as the Internet, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0094] The computing unit 1901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1901 performs the various methods and processes described above. For example, in some embodiments, the methods disclosed in this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1908. In some embodiments, part or all of the computer program can be loaded and / or installed on an electronic device via ROM 1902 and / or communication unit 1909. In some embodiments, the computing unit 1901 can be configured to perform the methods disclosed in this disclosure by any other suitable means (e.g., by means of firmware).

[0095] This disclosure also provides a computer-readable storage medium, wherein when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform the methods disclosed in this disclosure.

[0096] The computer-readable storage medium in this disclosure can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. The aforementioned computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specifically, the aforementioned computer-readable storage medium may include electrical connections based on one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0097] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0098] This disclosure also provides a computer program product, including a computer program, wherein the computer program, when executed by a processor, implements the methods disclosed in the embodiments of this disclosure.

[0099] In embodiments of this disclosure, computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include, but are not limited to, object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or it can be connected to an external computer.

[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0101] The modules, components, or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules, components, or units do not necessarily constitute a limitation on the module, component, or unit itself.

[0102] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0103] The above description is merely an embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0104] While specific embodiments of this disclosure have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.

Claims

1. A quantum-based random number generation system, characterized in that, The system includes: a client, a quantum key distribution network, and multiple distributed nodes; The client is configured to send a random number generation request to a target distributed node among the plurality of distributed nodes, and to send a key acquisition request to the quantum key distribution network; wherein the random number generation request and the key acquisition request respectively carry the client's identification information; The target distributed node is used to receive the random number generation request sent by the client and send the random number generation request to the other distributed nodes in the system; The quantum key distribution network is used to receive the key acquisition request sent by the client and send the target key generated based on the identification information to each distributed node in the system; The target distributed node is further configured to receive the target key sent by the quantum key distribution network, obtain the node identifier of each distributed node, determine the node order of each distributed node based on the node identifier, form a sequence array by combining locally generated random numbers and random numbers sent by other distributed nodes based on the node order, perform target operations on the sequence array using the target key to obtain a target random number, and send the target random number to the client; wherein, different operations are performed on the sequence array according to the binary sequence of the target key, and the result of the operation is modulo N to obtain the target random number; The client is also used to receive a target random number sent by the target distributed node.

2. The system according to claim 1, characterized in that, The random numbers sent by the remaining distributed nodes are obtained by encrypting them based on the target key.

3. The system according to claim 1, characterized in that, The distributed node is also used to send a random number acquisition request to the other distributed nodes and receive a target random number sent by the other distributed nodes. The distributed node is also used to send a target random number to the client if the target random number generated locally is the same as the target random number sent by the other distributed nodes.

4. The system according to claim 1, characterized in that, The client is also configured to send a random number acquisition request to the remaining distributed nodes if the random number sending timeout occurs at the target distributed node.

5. The system according to claim 4, characterized in that, The client is further configured to, upon receiving a target random number sent by the target distributed node, obtain target random numbers sent by the other distributed nodes, and determine that the obtained target random number is valid if all target random numbers are the same.

6. A quantum-based random number generation method, characterized in that, Applied to distributed nodes, the method includes: Receive a random number generation request sent by a client, the random number generation request carrying the client's identification information; Receive the target key sent by the quantum key distribution network based on the identification information; Obtain the node identifier of each distributed node, determine the node order of each distributed node based on the node identifier, form a sequence array based on the node order using locally generated random numbers and random numbers sent by other distributed nodes, and perform target operations on the sequence array using the target key to obtain the target random number; wherein, different operations are performed on the sequence array according to the binary sequence of the target key, and the result of the operation is modulo N to obtain the target random number; Send the target random number to the client.

7. A quantum-based random number generation device, characterized in that, The device, applied to distributed nodes, includes: A request receiving module is used to receive a random number generation request sent by a client, wherein the random number generation request carries the client's identification information; The key receiving module is used to receive the target key sent by the quantum key distribution network based on the identification information; The random number acquisition module is used to acquire the node identifiers of each distributed node, determine the node order of each distributed node based on the node identifiers, form a sequence array by combining locally generated random numbers and random numbers sent by other distributed nodes based on the node order, and perform target operations on the sequence array using the target key to obtain a target random number; wherein, different operations are performed on the sequence array according to the binary sequence of the target key, and the result of the operation is modulo N to obtain the target random number; A random number sending module is used to send the target random number to the client.

8. An electronic device, characterized in that, include: At least one processor; Memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the method as described in claim 6.

9. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in claim 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of claim 6.

Citation Information

Patent Citations

  • Random number generation method based on distributed consensus algorithm

    CN110430045A

  • Block chain key generation method and device, equipment, medium and product

    CN118316601A