Secure talkback method and system based on quantum encryption, medium and product
By generating unique quantum keys and employing asynchronous encryption, the risk of key cracking in intercom systems is resolved, achieving secure isolation and data integrity in group communication, and avoiding system response delays and data accumulation.
Patent Information
- Application Number
- CN202511098412.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-12-02
AI Technical Summary
In existing intercom systems, the use of fixed keys increases the risk of key cracking, making it impossible to guarantee communication security.
A secure intercom method based on quantum encryption is adopted. The transmitting terminal requests group identifiers and key identifiers from the service terminal to generate multiple quantum keys. A unique quantum key is generated. The transmitting terminal encrypts the data based on the audio data to generate a unique quantum key. The encryption is processed asynchronously through a dedicated encryption thread to ensure that each group obtains a unique quantum key, thereby achieving precise isolation of group communication.
It achieves precise isolation of group communication, ensuring data security. Even if the quantum key of one group is leaked, it will not affect other groups. It avoids system response delay caused by the encryption process blocking the main thread. Furthermore, by combining the producer-consumer pattern with a queue buffer mechanism, it solves the problems of data accumulation and packet loss caused by encryption time consumption.
Smart Images

Figure CN121056178A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security, and in particular to a secure intercom method, system, medium and product based on quantum encryption. Background Technology
[0002] With the rapid development of information technology, intercom communication has been widely used in emergency command, public safety, and industrial production. Intercom communication often involves the transmission of important instructions and the exchange of sensitive information, therefore, it has high security requirements.
[0003] Currently, intercom systems primarily employ quantum key distribution technology for communication encryption: the intercom system establishes a quantum key through a quantum channel and distributes the quantum key to both communicating parties. When intercom communication is needed, the sender uses the quantum key to encrypt the audio data, and the receiver uses the same quantum key to decrypt it.
[0004] However, in practical applications, the use of fixed keys increases the risk of the key being cracked. Once the key is leaked, the communication security between the two parties cannot be guaranteed. Summary of the Invention
[0005] This application provides a secure intercom method, system, medium, and product based on quantum encryption to improve the security of intercom communication.
[0006] Firstly, this application provides a secure intercom method based on quantum encryption, applied to a secure intercom system. The secure intercom system includes a transmitting terminal, a serving terminal, and a receiving terminal. The method includes: after the transmitting terminal sends an intercom request to the serving terminal, it receives a group identifier and a key identifier corresponding to each group identifier returned by the serving terminal. The intercom request includes one or more groups to be intercomdted; the transmitting terminal adds the collected audio data to be transmitted to a data encryption queue and determines the corresponding key identifier according to the group identifier of the group to which the audio data belongs, so as to generate multiple quantum keys; based on an encryption thread, the transmitting terminal encrypts the audio data in the data encryption queue according to the quantum keys to obtain encrypted audio data. The encryption thread is a dedicated thread for the corresponding data encryption queue, which is used to obtain audio data from the data encryption queue and encrypt it; the transmitting terminal transmits the encrypted audio data to the receiving terminal corresponding to the group to which the encrypted audio data belongs.
[0007] By adopting the above technical solution, when the transmitting terminal needs to conduct intercom communication, it sends an intercom request to the service terminal to obtain the group identifier and the corresponding key identifier returned by the service terminal. This ensures that each group obtains a unique quantum key, achieving precise isolation of group communication and guaranteeing data security. Even if the quantum key of one group is leaked, it will not affect other groups. The transmitting terminal processes the audio data in the data encryption queue through a dedicated encryption thread, achieving asynchronous encryption processing of the audio data and avoiding system response delays caused by the encryption process blocking the main thread.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, after the transmitting terminal sends an intercom request to the serving terminal, and before receiving the group identifier and the key identifier corresponding to each group identifier returned by the serving terminal, and before the intercom request includes one or more groups to be established for intercom, the method further includes: after the transmitting terminal initializes the running environment of the quantum encryption SDK, detecting whether a quantum medium exists; if no quantum medium exists, the transmitting terminal sends a no quantum medium prompt.
[0009] By employing the above technical solution, the transmitting terminal detects the presence of a quantum medium before establishing an intercom connection to determine whether the hardware required for quantum encryption is ready. This pre-detection mechanism avoids communication interruptions caused by discovering the absence of a quantum medium during actual communication, thus improving the availability and user experience of the secure intercom system.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of the transmitting terminal encrypting audio data in the data encryption queue according to the quantum key based on the encryption thread to obtain encrypted audio data, and the encryption thread being a dedicated thread for the corresponding data encryption queue, the method further includes: if the transmitting terminal does not obtain data in the data encryption queue within a preset time period, then terminating the encryption thread.
[0011] By adopting the above technical solution, if the sending terminal does not obtain data from the data encryption queue within a preset time period, it will automatically terminate idle encryption threads and release resources in a timely manner. This mechanism can ensure the real-time performance of encryption processing while effectively reducing memory usage and processor load, thus avoiding resource waste.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, based on an encryption thread, the transmitting terminal encrypts audio data in a data encryption queue according to a quantum key to obtain encrypted audio data. The encryption thread is a dedicated thread for the corresponding data encryption queue. The encryption thread is used to obtain audio data from the data encryption queue and encrypt it. Specifically, it includes: based on the encryption thread, the transmitting terminal obtains target audio data from the data encryption queue; the transmitting terminal determines a target quantum key from multiple quantum keys corresponding to the group to which the target audio data belongs, according to the target group identifier of the group to which the target audio data belongs; the transmitting terminal encrypts the target audio data using the target quantum key to obtain the target encrypted audio data.
[0013] By adopting the above technical solution, the transmitting terminal matches the group to which the audio data belongs with the quantum key, ensuring data isolation and security between different groups. Even if the quantum key of one group is leaked, it will not affect the data security of other groups. Furthermore, to solve the problem of data accumulation and packet loss caused by encryption time during audio data encryption, a producer-consumer model combined with a queue buffer mechanism is adopted. The transmitting terminal stores the collected audio data in a data encryption queue (producer), while an independent encryption thread retrieves audio data from the data encryption queue sequentially for encryption processing (consumer). This allows acquisition and encryption to work in parallel. The data encryption queue, acting as a buffer, effectively alleviates the speed mismatch between the two, ensuring that even if encryption takes a long time, it will not block real-time acquisition, thereby avoiding data accumulation and transmission errors, while maintaining the order and integrity of the data.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, after the sending terminal transmits the encrypted audio data to the receiving terminal corresponding to the group to which the encrypted audio data belongs, the method further includes: after the receiving terminal sends an intercom request to the service terminal, it receives the group identifier and the key identifier corresponding to each group identifier returned by the service terminal, the intercom request including one or more groups to be intercomdted; the receiving terminal adds the received encrypted audio data to a data decryption queue, and determines the corresponding key identifier according to the group identifier of the group to which the encrypted audio data belongs, so as to generate multiple quantum keys; based on the decryption thread, the receiving terminal decrypts the encrypted audio data in the data decryption queue according to the quantum key to obtain decrypted audio data, the decryption thread is a dedicated thread for the corresponding data decryption queue, the decryption thread is used to obtain the encrypted audio data from the data decryption queue and decrypt it; the receiving terminal plays the decrypted audio data.
[0015] By adopting the above technical solution, the receiving terminal receives the group identifier and the corresponding key identifier sent by the service terminal, and uses the decryption thread to process the encrypted audio data in the data decryption queue in sequence, thereby achieving group isolation, ensuring data security, avoiding data accumulation problems caused by decryption delay, and ensuring the real-time performance and integrity of audio transmission.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of the receiving terminal decrypting the audio encrypted data in the data decryption queue according to the quantum key based on the decryption thread to obtain audio decrypted data, the method further includes: if the receiving terminal does not obtain the data in the data decryption queue within a preset time period, then the decryption thread is terminated.
[0017] By adopting the above technical solution, if the receiving terminal does not obtain data from the data decryption queue within a preset time period, the decryption thread will be automatically terminated, effectively preventing the problem of idle decryption threads continuously occupying system resources and optimizing the resource utilization efficiency of the receiving terminal.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, based on a decryption thread, the receiving terminal decrypts the audio encrypted data in the data decryption queue according to the quantum key to obtain the audio decrypted data. The decryption thread is a dedicated thread for the corresponding data decryption queue. The decryption thread is used to obtain the audio encrypted data from the data decryption queue and decrypt it. Specifically, it includes: based on the decryption thread, the receiving terminal obtains the target audio encrypted data from the data decryption queue; the receiving terminal determines the target quantum key of the group to which the target audio encrypted data belongs among multiple quantum keys according to the target group identifier of the group to which the target audio encrypted data belongs; the receiving terminal decrypts the target audio encrypted data using the target quantum key to obtain the target audio decrypted data.
[0019] By adopting the above technical solution, the receiving terminal accurately matches the quantum key according to the group to which the audio encrypted data belongs, ensuring data isolation protection for different groups. The threaded decryption process avoids blocking the main thread during decryption and improves system response performance.
[0020] In a second aspect, embodiments of this application provide a secure intercom system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, which includes computer instructions, and the one or more processors call the computer instructions to cause the secure intercom system to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a secure intercom system, cause the secure intercom system to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a secure intercom system, cause the secure intercom system to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the secure intercom system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By adopting the above technical solution, when the transmitting terminal needs to conduct intercom communication, it sends an intercom request to the service terminal to obtain the group identifier and the corresponding key identifier returned by the service terminal. This ensures that each group obtains a unique quantum key, achieving precise isolation of group communication and guaranteeing data security. Even if the quantum key of one group is leaked, it will not affect other groups. The transmitting terminal processes the audio data in the data encryption queue through a dedicated encryption thread, achieving asynchronous encryption processing of the audio data and avoiding system response delays caused by the encryption process blocking the main thread.
[0025] 2. By adopting the above technical solution, the transmitting terminal matches the group to which the audio data belongs with the quantum key, ensuring data isolation and security between different groups. Even if the quantum key of one group is leaked, it will not affect the data security of other groups. Furthermore, to solve the problem of data accumulation and packet loss caused by encryption time during audio data encryption, a producer-consumer model combined with a queue buffer mechanism is adopted. The transmitting terminal stores the collected audio data in a data encryption queue (producer), while an independent encryption thread retrieves audio data from the data encryption queue sequentially for encryption processing (consumer). This allows acquisition and encryption to work in parallel. The data encryption queue, acting as a buffer, effectively alleviates the speed mismatch between the two, ensuring that even if encryption takes a long time, it will not block real-time acquisition, thereby avoiding data accumulation and transmission errors, while maintaining the order and integrity of the data.
[0026] 3. By adopting the above technical solution, if the receiving terminal does not obtain data from the data decryption queue within a preset time period, the decryption thread will be automatically terminated, which effectively prevents the problem of idle decryption threads continuously occupying system resources and optimizes the resource utilization efficiency of the receiving terminal. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating a secure intercom method based on quantum encryption in an embodiment of this application; Figure 2 This is another flowchart illustrating the secure intercom method based on quantum encryption in this application embodiment; Figure 3 This is a schematic diagram of the physical device structure of a security intercom system in the embodiments of this application. Detailed Implementation
[0028] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.
[0029] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0030] The secure intercom system described in this application is as follows. The secure intercom system includes a transmitting terminal, a serving terminal, and a receiving terminal, wherein: The transmitting terminal is the client device in a secure intercom system responsible for audio acquisition, encryption, and transmission. It is typically a user's handheld device (such as an encrypted walkie-talkie or smartphone), and its core functions include: (1) Initialization and detection: Initialize the quantum encryption SDK at startup and detect whether the quantum medium (such as a quantum key card) exists. If not, prompt the user. (2) Key synchronization: Send an intercom request to the service terminal, obtain the group identifier and the corresponding key identifier, and generate multiple quantum keys; (3) Audio encryption processing: The collected audio data is stored in the data encryption queue and encrypted asynchronously through a dedicated encryption thread (using the quantum key corresponding to the group) to generate encrypted audio data; (4) Data transmission: Distribute the encrypted audio data to the receiving terminals of the group to ensure transmission reliability (e.g., retransmission of lost packets).
[0031] The service terminal is the core server of the secure intercom system, responsible for group management, key distribution, and communication coordination. Its core functions include: (1) Group and key management: After receiving the intercom request, verify the permissions and assign a unique group identifier and key identifier to each group.
[0032] (2) Secure distribution: The key identifier and group information are returned to the sending / receiving terminal through a secure channel.
[0033] The receiving terminal is the client device in a secure intercom system responsible for audio decryption and playback. It is typically a user's handheld device (such as an encrypted walkie-talkie or smartphone), and its core functions include: (1) Initialization and detection: Initialize the quantum encryption SDK at startup and detect whether the quantum medium (such as a quantum key card) exists. If not, prompt the user. (2) Key synchronization: Send an intercom request to the service terminal, obtain the group identifier and the corresponding key identifier, and generate multiple quantum keys; (3) Audio decryption processing: The received encrypted audio data is stored in the data decryption queue and decrypted asynchronously through a dedicated decryption thread (using the quantum key corresponding to the group) to generate decrypted audio data; (4) Audio playback: Real-time playback of decrypted audio data, supporting data splitting processing for multiple groups.
[0034] The following describes the process of the method provided in this implementation. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a secure intercom method based on quantum encryption in an embodiment of this application.
[0035] S101. After the transmitting terminal sends an intercom request to the service terminal, it receives the group identifier and the key identifier corresponding to each group identifier returned by the service terminal. The intercom request includes one or more groups to be established for intercom. In this context, a talk request refers to an application initiated by the sending terminal to the serving terminal to establish talk communication. A group identifier is used to uniquely identify a group. A key identifier is used to identify the quantum key corresponding to a specific group. A group refers to a set of terminals with the same communication needs.
[0036] Specifically, when a user needs to establish intercom communication, the sending terminal sends an intercom request to the service terminal. The request includes information about one or more groups the user wishes to connect to, which may include group names, member lists, etc. Upon receiving the intercom request, the service terminal immediately performs authorization verification to confirm whether the sending terminal can join these groups. If the authorization verification is successful, the service terminal assigns a unique group identifier to each group and generates a corresponding key identifier for each group. These identifiers are generated using specific encoding rules to ensure their uniqueness and security. The service terminal returns these group identifiers and their corresponding key identifiers to the sending terminal, which then stores them in its local secure storage area for subsequent encrypted communication.
[0037] S102. The transmitting terminal adds the collected audio data to be transmitted to the data encryption queue, and determines the corresponding key identifier according to the group identifier of the group to which the audio data belongs, so as to generate multiple quantum keys. Audio data refers to the raw speech signal data acquired through audio acquisition equipment. A data encryption queue is a first-in, first-out (FIFO) queue structure used to store the audio data to be encrypted. A quantum key represents the key generated using quantum encryption technology for data encryption.
[0038] Specifically, after acquiring the group identifier and key identifier, the transmitting terminal collects the user's audio data through devices such as microphones. This audio data is added to a data encryption queue for temporary storage in real time. For each piece of audio data in the data encryption queue, the transmitting terminal finds the corresponding key identifier based on the group identifier to which it belongs. The transmitting terminal then calls the quantum encryption module to generate a corresponding quantum key based on these key identifiers. The quantum key generation process uses quantum encryption technology, which has extremely high security, and each group uses an independent quantum key, ensuring secure isolation of communication between different groups.
[0039] The principle by which the sending terminal generates a quantum key based on the key identifier is as follows: The sending terminal sends a request to the key management platform through the key identifier and its corresponding key handle, using the quantum encryption SDK as an interface intermediate layer. The key management platform generates a quantum key through the algorithm mechanism in the key pool.
[0040] S103. Based on the encryption thread, the transmitting terminal encrypts the audio data in the data encryption queue according to the quantum key to obtain encrypted audio data. The encryption thread is a dedicated thread for the corresponding data encryption queue. The encryption thread is used to obtain audio data from the data encryption queue and encrypt it. In this context, an encryption thread refers to a dedicated execution thread for performing audio data encryption tasks. A dedicated thread refers to an execution thread that is independent of the main thread and specifically designed for processing specific tasks. Audio encrypted data refers to ciphertext audio data encrypted using quantum key distribution.
[0041] Specifically, when there is audio data to be processed in the data encryption queue, the sending terminal will start a dedicated encryption thread for processing. The use of an encryption thread avoids blocking the main thread during the encryption process, improving system responsiveness. The encryption thread continuously monitors the data encryption queue, and processes new audio data immediately upon detection. During processing, the encryption thread first retrieves the audio data from the data encryption queue, and then encrypts it using the quantum key corresponding to the group to which the audio data belongs. The encryption process employs a quantum encryption algorithm, dividing the audio data into blocks. Each data block is encrypted using a quantum key, ultimately generating encrypted audio data.
[0042] Optionally, generally, based on the encryption thread, the transmitting terminal encrypts the audio data in the data encryption queue according to the quantum key to obtain encrypted audio data. The encryption thread is a dedicated thread for the corresponding data encryption queue. The encryption thread is used to obtain audio data from the data encryption queue and encrypt it. This can be achieved in the following ways, which are not limited here: Based on the encryption thread, the transmitting terminal obtains the target audio data from the data encryption queue; the transmitting terminal determines the target quantum key for the group to which the target audio data belongs from multiple quantum keys according to the target group identifier of the group to which the target audio data belongs; the transmitting terminal encrypts the target audio data using the target quantum key to obtain the target encrypted audio data.
[0043] The following is a specific example to illustrate this encryption process: Suppose that in an emergency communication scenario, there is an emergency command group (group ID: GROUP_001) and an on-site rescue group (group ID: GROUP_002), and Commander A is conducting multi-group intercom communication.
[0044] 1. Audio Acquisition Phase: Commander A speaks: "Immediately proceed to the accident site for rescue, and pay attention to personnel safety." This speech is captured by the microphone of the transmitting terminal and converted into audio data. Assuming this is a 3-second speech with a sampling rate of 16kHz and a 16-bit deep PCM format, it will generate approximately 96KB of audio data. 2. Data queuing stage: The transmitting terminal divides the 96KB audio data into 12 8KB data blocks. Each data block is labeled with two group identifiers, GROUP_001 and GROUP_002. These data blocks are then sequentially placed into the data encryption queue to await processing. 3. Encryption Processing Stage: When the encryption thread detects new audio data in the data encryption queue, the processing procedure for the first 8KB data block is as follows (the processing method for subsequent data blocks is similar): (1) Obtain the group identifiers (GROUP_001 and GROUP_002) of the data blocks. (2) Find the corresponding quantum keys respectively (such as QK_001 for GROUP_001 and QK_002 for GROUP_002), use quantum key QK_001 to encrypt the data block once, and use quantum key QK_002 to encrypt the data block once, to generate two different encrypted data blocks; 4. Verification of encryption results: Data before encryption: [-128, 120, 50, 60, 0, 1, -74, -64, 0, 126, 33, 37, 24, 5, -111, 93, 27, -32, 98, 19, -34, -15, 79, -97, -86, -89, -98, -54, 94, 22, -2, -28, 82, -73, -75, -71, -60, 21, -124, 29, -23, -16, 93, 13, 113, 68, -84, -121, 97, 80]; Data length before encryption: encDecData data.length 50; Length of encrypted data: resultList.size 64; Encrypted data: [-5, 115, 12, 83, 44, -76, -80, 119, 72, -3, 64, 112, 47, -123, -101, -37, -127, -61, -76, 24, 20, 100, 102, 17, 20, 10, -10, 116, -9, -47, -110, 71, 47, 62, -9, 126, -33, 101, 121, 18, 19, -112, -11, -18, -26, 123, 1, -15, -107, -7, -35, -19, 21, -104, 20, 109, -22, -122, -97, -55, -45, 67, 34, -12].
[0045] S104. The sending terminal transmits the encrypted audio data to the receiving terminal corresponding to the group to which the encrypted audio data belongs.
[0046] Transmission refers to the process of sending encrypted audio data from the sending terminal to the receiving terminal via a network.
[0047] Specifically, after the audio data is encrypted, the sending terminal identifies all receiving terminals within the group to which the encrypted audio data belongs. For each receiving terminal, the sending terminal establishes a dedicated network connection channel. During transmission, the sending terminal segments the encrypted audio data into packets, attaching necessary control information to each packet, such as sequence number, timestamp, and group identifier. This information helps the receiving terminal correctly reassemble and process the received packets. The sending terminal also monitors network transmission quality; if packet loss is detected, it automatically retransmits to ensure data transmission reliability. The entire transmission process is protected by quantum encryption, making it unbreakable even if the data is intercepted.
[0048] By adopting the above technical solution, when the transmitting terminal needs to conduct intercom communication, it sends an intercom request to the service terminal to obtain the group identifier and the corresponding key identifier returned by the service terminal. This ensures that each group obtains a unique quantum key, achieving precise isolation of group communication and guaranteeing data security. Even if the quantum key of one group is leaked, it will not affect other groups. The transmitting terminal processes the audio data in the data encryption queue through a dedicated encryption thread, achieving asynchronous encryption processing of the audio data and avoiding system response delays caused by the encryption process blocking the main thread.
[0049] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the secure intercom method based on quantum encryption in this application embodiment.
[0050] S201. After the sending terminal initializes the running environment of the quantum encryption SDK, it checks whether there is a quantum medium. If there is no quantum medium, the sending terminal sends a message indicating that there is no quantum medium.
[0051] The Quantum Encryption SDK refers to a software development kit used to implement quantum encryption functionality, containing various quantum encryption algorithms and interfaces. The runtime environment refers to the hardware and software configuration requirements for the Quantum Encryption SDK to function properly. Quantum media refers to dedicated hardware devices used for storing and processing quantum keys, such as quantum key cards and quantum encryption chips. Initialization refers to the process of configuring necessary parameters and allocating resources for the Quantum Encryption SDK. A "No Quantum Media" warning message indicates that no quantum media has been detected.
[0052] Specifically, first, the transmitting terminal needs to initialize the quantum encryption SDK. This initialization process includes loading SDK library files, configuring runtime parameters, and allocating system resources. After the quantum encryption SDK initialization is complete, the transmitting terminal immediately checks the presence of the quantum medium. This check involves scanning system hardware interfaces, reading device information, and verifying device validity. If the detection finds that no quantum medium is installed or is not correctly connected, the transmitting terminal will immediately push a warning to the user. This warning may appear as a pop-up window, notification bar message, or status indicator light, reminding the user that they need to insert or activate the quantum medium to conduct secure communication.
[0053] S202. After sending an intercom request to the service terminal, the transmitting terminal receives the group identifier and the key identifier corresponding to each group identifier returned by the service terminal. The intercom request includes one or more groups for which an intercom session needs to be established. (For details, please refer to step S101, which will not be repeated here.) S203. The transmitting terminal adds the collected audio data to be transmitted to the data encryption queue, and determines the corresponding key identifier according to the group identifier of the group to which the audio data belongs, so as to generate multiple quantum keys. (For details, please refer to step S102, which will not be repeated here.) S204. Based on the encryption thread, the transmitting terminal encrypts the audio data in the data encryption queue according to the quantum key to obtain encrypted audio data. The encryption thread is a dedicated thread for the corresponding data encryption queue, and it is used to retrieve audio data from the data encryption queue and encrypt it. (For details, please refer to step S103, which will not be repeated here.) S205. If the sending terminal does not obtain data from the data encryption queue within the preset time period, the encryption thread will be terminated.
[0054] Here, "preset duration" refers to a predefined time period used to determine the idle state of the encryption thread. "Terminate" indicates an operation that forcibly terminates the encryption thread and releases related system resources. "Get" indicates an operation that reads data from the data encryption queue. "Data" represents the audio data awaiting processing in the data encryption queue.
[0055] Specifically, once the encryption thread starts running, the sending terminal continuously monitors its status. If the encryption thread fails to retrieve new audio data from the data encryption queue within a preset time (e.g., 30 seconds), it indicates that there is currently no data requiring encryption, and the encryption thread is idle. In this case, the sending terminal will proactively terminate the encryption thread to avoid unnecessary occupation of system resources. The termination process includes stopping thread execution, cleaning up thread resources, and releasing memory space. It should be noted that when new audio data needs encryption, the sending terminal will create a new encryption thread.
[0056] S206. The sending terminal transmits the encrypted audio data to the receiving terminal corresponding to the group to which the encrypted audio data belongs. (For details, please refer to step S104, which will not be repeated here.) S207. After the receiving terminal sends an intercom request to the service terminal, it receives the group identifier and the key identifier corresponding to each group identifier returned by the service terminal. The intercom request includes one or more groups for which an intercom is to be established.
[0057] In this context, a talk request refers to the application information initiated by the receiving terminal to the serving terminal to establish talk communication. A group identifier is used to uniquely identify a group. A key identifier is used to identify the quantum key corresponding to a specific group.
[0058] Specifically, when a user needs to join a two-way communication session, the receiving terminal sends a two-way request to the serving terminal. This request includes information about one or more groups the user wishes to join, which may include group names, member lists, etc. Upon receiving the request, the serving terminal returns the group identifier and its corresponding key identifier to the receiving terminal.
[0059] S208. The receiving terminal adds the received encrypted audio data to the data decryption queue and determines the corresponding key identifier according to the group identifier of the group to which the encrypted audio data belongs, so as to generate multiple quantum keys.
[0060] Here, the data decryption queue refers to a first-in, first-out (FIFO) queue structure used to store encrypted audio data to be decrypted. The quantum key refers to the key generated based on quantum encryption technology used for data decryption.
[0061] Specifically, after receiving encrypted audio data, the receiving terminal adds the encrypted audio data to the data decryption queue for temporary storage. The receiving terminal parses the group identifier corresponding to the encrypted audio data, looks up the corresponding key identifier based on the group identifier, and calls the quantum encryption module to generate a quantum key for decryption based on these key identifiers. Different quantum keys are used to decrypt encrypted audio data from different groups.
[0062] S209. Based on the decryption thread, the receiving terminal decrypts the audio encrypted data in the data decryption queue according to the quantum key to obtain the audio decrypted data. The decryption thread is a dedicated thread for the corresponding data decryption queue. The decryption thread is used to obtain the audio encrypted data from the data decryption queue and decrypt it.
[0063] The decryption thread refers to a dedicated execution thread for performing the task of decrypting encrypted audio data. The decrypted audio data refers to the original audio data obtained after decryption.
[0064] Specifically, when there is unprocessed encrypted audio data in the data decryption queue, the receiving terminal will start a dedicated decryption thread. The decryption thread continuously monitors the status of the data decryption queue, and immediately processes any new encrypted audio data detected. During processing, firstly, the decryption thread retrieves the encrypted audio data from the data decryption queue; then, it finds the corresponding key identifier based on the group identifier of the encrypted audio data to generate a quantum key; next, the decryption thread uses the quantum key to decrypt the encrypted audio data, employing a quantum decryption algorithm corresponding to the encryption.
[0065] Optionally, generally, based on the decryption thread, the receiving terminal decrypts the encrypted audio data in the data decryption queue according to the quantum key to obtain the decrypted audio data. The decryption thread is a dedicated thread for the corresponding data decryption queue. The decryption thread is used to obtain and decrypt the encrypted audio data from the data decryption queue. This can be achieved in the following ways, which are not limited here: Based on the decryption thread, the receiving terminal obtains the target encrypted audio data from the data decryption queue; the receiving terminal determines the target quantum key corresponding to the group to which the target encrypted audio data belongs from multiple quantum keys according to the target group identifier of the group to which the target encrypted audio data belongs; the receiving terminal decrypts the target encrypted audio data using the target quantum key to obtain the target decrypted audio data.
[0066] S210. If the receiving terminal does not obtain data from the data decryption queue within the preset time period, the decryption thread is terminated.
[0067] Here, "preset duration" refers to a predefined time period used to determine the idle state of the decryption thread. "Terminate" indicates the operation of forcibly ending the decryption thread and releasing related system resources. "Get" represents the process of reading data from the data decryption queue. "Data" represents the audio encryption data awaiting processing in the data decryption queue.
[0068] Specifically, once the decryption thread starts running, the receiving terminal continuously monitors its status. If the decryption thread fails to retrieve new encrypted audio data from the data decryption queue within a preset time (e.g., 30 seconds), it indicates that there is currently no data to be decrypted, and the decryption thread is idle. In this case, the receiving terminal will actively terminate the decryption thread to release system resources. The termination process includes stopping thread execution, cleaning up the memory space occupied by the thread, and releasing related system resources. It should be noted that when new encrypted audio data needs to be decrypted, the receiving terminal will create a new decryption thread.
[0069] S211, The receiving terminal plays audio and decrypts the data.
[0070] In this context, playback refers to the process of converting digital audio signals into sound signals and outputting them through an audio playback device. An audio playback device is a hardware device used for sound output, such as a speaker or headphones.
[0071] Specifically, after the receiving terminal decrypts the encrypted audio data, it transmits the decrypted audio data to the audio playback device for playback.
[0072] The secure intercom system in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference]. Figure 3 This is a schematic diagram of the physical device structure of a security intercom system in the embodiments of this application.
[0073] It should be noted that, Figure 3 The structure of the security intercom system shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0074] like Figure 3 As shown, the secure intercom system includes a CPU 301, which can perform various appropriate actions and processes based on a program stored in the read-only memory ROM 302 or a program loaded from the storage section 308 into the random access memory RAM 303, such as performing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An I / O interface 305 is also connected to the bus 304.
[0075] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.
[0076] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by CPU 301, it performs the various functions defined in the present invention.
[0077] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0078] 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 the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains 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 shown in the drawings.
[0079] Specifically, the secure intercom system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the quantum encryption-based secure intercom method provided in the above embodiment.
[0080] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the secure intercom system described in the above embodiments; or it may exist independently and not incorporated into the secure intercom system. The storage medium carries one or more computer programs that, when executed by a processor of the secure intercom system, cause the secure intercom system to implement the quantum encryption-based secure intercom method provided in the above embodiments.
[0081] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0082] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0083] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A secure intercom method based on quantum encryption, characterized in that, Applied to a secure intercom system, the secure intercom system including a transmitting terminal, a serving terminal, and a receiving terminal, the method includes: After the transmitting terminal sends an intercom request to the service terminal, it receives a group identifier and a key identifier corresponding to each group identifier returned by the service terminal. The intercom request includes one or more groups to be established for intercom. The transmitting terminal adds the collected audio data to be transmitted to the data encryption queue, and determines the corresponding key identifier according to the group identifier of the group to which the audio data belongs, so as to generate multiple quantum keys; Based on the encryption thread, the transmitting terminal encrypts the audio data in the data encryption queue according to the quantum key to obtain encrypted audio data. The encryption thread is a dedicated thread corresponding to the data encryption queue. The encryption thread is used to obtain audio data from the data encryption queue and encrypt it. The sending terminal transmits the encrypted audio data to the receiving terminal corresponding to the group to which the encrypted audio data belongs.
2. The method according to claim 1, characterized in that, After the transmitting terminal sends an intercom request to the serving terminal, and before receiving the group identifier and the key identifier corresponding to each group identifier returned by the serving terminal, the method further includes: After the sending terminal initializes the running environment of the quantum encryption SDK, it detects whether a quantum medium exists. If the quantum medium is not present, the transmitting terminal sends a message indicating that there is no quantum medium.
3. The method according to claim 1, characterized in that, Following the step of the transmitting terminal encrypting audio data in the data encryption queue according to the quantum key based on the encryption thread to obtain encrypted audio data, where the encryption thread is a dedicated thread corresponding to the data encryption queue and is used to retrieve audio data from the data encryption queue and encrypt it, the method further includes: If the sending terminal does not receive data from the data encryption queue within a preset time period, the encryption thread is terminated.
4. The method according to claim 1, characterized in that, The method based on an encryption thread involves the transmitting terminal encrypting audio data in the data encryption queue using the quantum key to obtain encrypted audio data. The encryption thread is a dedicated thread corresponding to the data encryption queue, and it is used to retrieve audio data from the data encryption queue and encrypt it, specifically including: Based on the encryption thread, the sending terminal obtains the target audio data from the data encryption queue; The transmitting terminal determines the target quantum key corresponding to the group to which the target audio data belongs from among the plurality of quantum keys, based on the target group identifier of the group to which the target audio data belongs; The transmitting terminal encrypts the target audio data using the target quantum key to obtain encrypted target audio data.
5. The method according to claim 1, characterized in that, After the step of transmitting the encrypted audio data from the transmitting terminal to the receiving terminal corresponding to the group to which the encrypted audio data belongs, the method further includes: After the receiving terminal sends an intercom request to the service terminal, it receives a group identifier and a key identifier corresponding to each group identifier returned by the service terminal. The intercom request includes one or more groups to be established for intercom. The receiving terminal adds the received encrypted audio data to the data decryption queue and determines the corresponding key identifier according to the group identifier of the group to which the encrypted audio data belongs, so as to generate multiple quantum keys; Based on the decryption thread, the receiving terminal decrypts the audio encrypted data in the data decryption queue according to the quantum key to obtain the audio decrypted data. The decryption thread is a dedicated thread corresponding to the data decryption queue. The decryption thread is used to obtain the audio encrypted data from the data decryption queue and decrypt it. The receiving terminal plays the decrypted audio data.
6. The method according to claim 5, characterized in that, Following the step of the receiving terminal decrypting the encrypted audio data in the data decryption queue according to the quantum key based on the decryption thread to obtain decrypted audio data, wherein the decryption thread is a dedicated thread corresponding to the data decryption queue and is used to obtain and decrypt the encrypted audio data from the data decryption queue, the method further includes: If the receiving terminal fails to acquire data from the data decryption queue within a preset time period, the decryption thread will be terminated.
7. The method according to claim 5, characterized in that, The decryption thread is used by the receiving terminal to decrypt the encrypted audio data in the data decryption queue according to the quantum key, thereby obtaining decrypted audio data. The decryption thread is a dedicated thread corresponding to the data decryption queue, and it is used to retrieve and decrypt the encrypted audio data from the data decryption queue, specifically including: Based on the decryption thread, the receiving terminal obtains the target audio encrypted data from the data decryption queue; The receiving terminal determines the target quantum key among the plurality of quantum keys that corresponds to the group to which the target audio encrypted data belongs, based on the target group identifier of the group to which the target audio encrypted data belongs; The receiving terminal decrypts the target audio encrypted data using the target quantum key to obtain the target audio decrypted data.
8. A secure intercom system, characterized in that, The secure intercom system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the secure intercom system to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the secure intercom system, the secure intercom system performs the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on the secure intercom system, the secure intercom system performs the method as described in any one of claims 1-7.
