Instant messaging data encryption transmission method and system

By using hash encryption and dynamic random entropy seeds in the instant communication system, the key exchange problem of key update delay in the existing technology is solved, and efficient encrypted transmission and security improvement of instant communication data is achieved.

CN120090884AActive Publication Date: 2025-06-03HANGZHOU TANAO TECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510574001.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-06-03
Estimated Expiration
2045-05-06

AI Technical Summary

Technical Problem

In the instant messaging scenario, the existing encryption technology takes longer to update the key due to the increase in the number of people, resulting in a large delay in the encryption transmission of instant messaging data, which cannot meet the timely response needs of instant messaging.

Method used

By obtaining the data transmission information of instant communication, hash encryption is used to generate hash values, and dynamic random entropy value seeds are generated based on user fingerprint information, gyroscope angular velocity change rate and ambient light intensity instantaneous gradient. Key exchange is performed based on the elliptic curve cryptography algorithm and post-quantum Kyber algorithm to obtain dual-encrypted transmission data keys, realizing efficient encrypted transmission of instant communication data.

Benefits of technology

It effectively improves encryption security and transmission timeliness, adapts to complex network environments and resists multiple attacks, reduces the delay problems caused by key updates, and ensures the confidentiality and integrity of instant messaging data during transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120090884A_ABST
    Figure CN120090884A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of instant messaging, and particularly discloses an instant messaging data encryption transmission method and system. According to the method, data transmission information containing communication and hardware equipment information is firstly obtained, communication data is subjected to standardization processing and segmentation encryption to generate a Hash secret value, meanwhile, dynamic factors in the hardware equipment information are mined to generate a dynamic random entropy seed, then, an elliptic curve and a post-quantum Kyber algorithm are utilized to generate a dual encryption secret key based on the result, and the dual encryption secret key is obtained. And finally, a multi-way tree path is constructed according to the number of group chat members, and instant messaging data encryption transmission is realized by using a secret key encryption path node, so that the encryption security and the transmission timeliness are effectively improved, a complex network environment is adapted, various attacks are resisted, meanwhile, multiple encryption nodes can also efficiently adapt to multi-user data transmission in a group chat scene, and the user experience is improved. Each member can be ensured to perform data encryption and decryption through a secure key path, and the delay problem caused by key updating is reduced at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of instant messaging, and in particular to an instant messaging data encryption transmission method and system. Background Art

[0002] With the rapid development of Internet technology, instant messaging applications have become an important tool for people's daily communication and information exchange. However, instant messaging data faces many security threats during the transmission process, such as network eavesdropping, data interception, man-in-the-middle attacks, etc. Therefore, it is necessary to encrypt the transmission of instant messaging. In the existing encryption technology in the instant messaging scenario, as the number of people increases, it takes more time to update the protocol group chat key, resulting in a large delay in the encrypted transmission of instant messaging data, and thus unable to meet the timely response requirements of instant messaging. Therefore, an instant messaging data encryption transmission method and system are needed to solve the above problems. Summary of the Invention

[0003] The purpose of the present invention is to provide an instant messaging data encryption transmission method and system to solve the technical problems raised in the above background art.

[0004] To achieve the above purpose, the present invention provides the following technical solutions: An instant messaging data encryption transmission method, comprising: Obtaining the data transmission information of instant messaging, wherein the data transmission information includes communication data information and instant messaging hardware device information; Obtaining a transmission data stream according to the communication data information, splitting the transmission data stream into multiple encryption units of a fixed size, obtaining corresponding preambles of the encryption units according to the multiple encryption units, and generating multiple hash cipher values based on the multiple encryption unit preambles by hash encryption; Obtaining user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and obtaining the gyroscope angular velocity change rate and the instantaneous gradient of environmental light intensity according to the environmental sensor information; Generating a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of environmental light intensity; Performing key exchange on the multiple hash cipher values and the dynamic random entropy value seed based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key; Encrypting and transmitting the instant messaging data based on the double-encrypted transmission data key.

[0005] Preferably, the step of obtaining a transmission data stream according to the communication data information, splitting the transmission data stream into multiple encryption units of a fixed size, obtaining corresponding preambles of the encryption units according to the multiple encryption units, and generating multiple hash ciphertexts based on the multiple encryption unit preambles by means of hash encryption includes: Based on TLV encoding conversion, standardize the communication data information into a binary data stream, obtain a binary data stream, and define the binary data stream as a transmission data stream; Split the transmission data stream into multiple encryption units of a fixed size according to a preset fixed length; Decompose the multiple encryption units according to standard fields to obtain multiple preambles of the encryption units; Generate a genesis block based on the multiple preambles of the encryption units by means of hash encryption, and perform chain binding on the genesis block to obtain multiple hash ciphertexts, where the chain binding is to concatenate the genesis blocks into an irreversible chain structure based on the forward hash dependency relationship.

[0006] Preferably, the step of obtaining the gyroscope angular velocity change rate and the instantaneous gradient of the ambient light intensity according to the environmental sensor information includes: Obtain gyroscope data according to the environmental sensor information, and perform raw signal correction on the gyroscope data to obtain corrected gyroscope data; Obtain the gyroscope instantaneous velocity and the gyroscope data sampling interval according to the corrected gyroscope data; Obtain the first adjacent sampling points before and after the gyroscope at the current moment based on a preset time series, where the first adjacent sampling points before and after include the first sampling point time and the second sampling point time; Calculate the gyroscope angular velocity change rate according to the gyroscope instantaneous velocity, the gyroscope data sampling interval, the first sampling point time, and the second sampling point time, where the calculation formula is: ; where represents the gyroscope angular velocity change rate, represents the gyroscope instantaneous velocity, represents the first sampling point time, represents the second sampling point time, represents the gyroscope data sampling interval; Obtain the initial measured light intensity value of the photoelectric sensor according to the environmental sensor information; Perform nonlinear compensation on the initial measured light intensity value based on a standard light source to obtain a compensated measured light intensity value; Obtain the initial measured light sampling interval; Obtain the second adjacent sampling points before and after the current moment of the photoelectric sensor based on a preset time series, where the second adjacent sampling points before and after include the third sampling point moment and the fourth sampling point moment; Calculate the instantaneous gradient of the ambient light intensity according to the compensated measured light intensity value, the initial measured light sampling interval, the third sampling point moment, and the fourth sampling point moment, where the calculation formula is: ; Among them, represents the instantaneous gradient of the ambient light intensity, represents the compensated measured light intensity value, represents the third sampling point moment, represents the fourth sampling point moment, represents the initial measured light sampling interval.

[0007] Preferably, the step of generating the dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of the ambient light intensity includes: Extract the pressure gradient of the fingerprint press detected by the pressure sensor array according to the instant messaging hardware device information, and generate a first 256-bit binary code for the pressure gradient based on a quantum random number generator; Generate a second 256-bit binary code for the gyroscope angular velocity change rate based on a quantum random number generator; Generate a third 256-bit binary code for the instantaneous gradient of the ambient light intensity based on a quantum random number generator; Perform XOR superposition mixing on the first 256-bit binary code, the second 256-bit binary code, and the third 256-bit binary code to obtain a mixed code; Process the mixed code based on a hash function to obtain a hash mixed code value, and use the hash mixed code value; Obtain the current timestamp based on a preset time series, and mix the current timestamp and the hash mixed code value based on a quantum random number generator to obtain a dynamic random entropy value seed.

[0008] Preferably, the step of performing key exchange on multiple hash cipher values and the dynamic random entropy value seed based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data secret key includes: Obtain a public-private key pair generated for multiple hash cipher values and the dynamic random entropy value seed based on the elliptic curve cryptography algorithm, where the public-private key pair includes a first private key and a second private key; Obtain a preset valid point on the elliptic curve based on the elliptic curve cryptography algorithm, and calculate a first public key according to the preset valid point and the first private key, where the calculation formula is: ; Among them, represents the first public key, represents the first private key, represents a preset effective point; Calculate the second public key according to the preset effective point and the second private key, where the calculation formula is: ; Among them, represents the second public key, represents the second private key, represents a preset effective point; Perform key conversion on the first public key and the second public key based on a hash function to obtain an ECC key; Generate a Kyber key based on multiple hash ciphertext values and a dynamic random entropy value seed using the post-quantum Kyber algorithm, and perform key exchange on the ECC key and the Kyber key based on hash processing to obtain a doubly encrypted transmission data key.

[0009] Preferably, the step of encrypting and transmitting instant messaging data using the doubly encrypted transmission data key includes: Obtain the number of members in the protocol group chat, and form a multi-way tree path for the protocol group chat based on the number of members; Obtain corresponding path nodes according to the multi-way tree path, and encrypt multiple path nodes according to the preset time sequence using the doubly encrypted transmission data key to obtain multiple encrypted nodes; Encrypt and transmit the instant messaging data of the protocol group chat according to multiple encrypted nodes.

[0010] This application also provides an instant messaging data encryption and transmission system, including: A first acquisition module for acquiring the data transmission information of instant messaging, where the data transmission information includes communication data information and instant messaging hardware device information; A second acquisition module for acquiring a transmission data stream according to the communication data information, splitting the transmission data stream into multiple encrypted units of a fixed size, obtaining corresponding preambles of the encrypted units according to the multiple encrypted units, and generating multiple hash ciphertext values based on the multiple encrypted unit preambles using hash encryption; A third acquisition module for acquiring user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and acquiring the gyroscope angular velocity change rate and the instantaneous gradient of environmental light intensity according to the environmental sensor information; A generation module for generating a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of environmental light intensity; An exchange module, configured to perform key exchange on multiple said hash cipher values and dynamic random entropy value seeds based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a doubly encrypted transmission data secret key; A transmission module, configured to encrypt and transmit instant messaging data based on the doubly encrypted transmission data secret key.

[0011] Preferably, the second acquisition module includes: A first acquisition unit, configured to convert the communication data information into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and define the binary data stream as a transmission data stream; A splitting unit, configured to split the transmission data stream into multiple encrypted units of a fixed size according to a preset fixed length; A second acquisition unit, configured to disassemble multiple said encrypted units according to standard fields to obtain multiple encrypted unit prefixes; A generation unit, configured to generate a genesis block based on hash encryption for multiple said encrypted unit prefixes, and perform chained binding on the genesis block to obtain multiple hash cipher values, wherein the chained binding is to concatenate the genesis blocks into an irreversible chained structure based on the forward hash dependency relationship.

[0012] This application also provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented.

[0013] This application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0014] The beneficial effects of this application are as follows: The present invention first obtains data transmission information including communication and hardware device information, standardizes and splits the communication data for encryption to generate hash cipher values, and at the same time mines dynamic factors in the hardware device information to generate dynamic random entropy value seeds. Then, based on the above results, an elliptic curve and the post-quantum Kyber algorithm are used to generate a doubly encrypted secret key. Finally, a multi-way tree path is constructed according to the number of group chat members, and the secret key is used to encrypt the path nodes to realize the encrypted transmission of instant messaging data, effectively improving the encryption security and transmission timeliness, adapting to complex network environments and resisting various attacks. At the same time, multiple encryption nodes can also efficiently adapt to the multi-user data transmission in the group chat scenario, ensuring that each member can encrypt and decrypt data through a secure key path, and reducing the latency problem caused by key updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a schematic flowchart of the method according to an embodiment of this application.

[0016] Figure 2 Schematic diagram of the system structure according to an embodiment of the present application.

[0017] Figure 3 Internal structure schematic diagram of a computer device according to an embodiment of the present application.

[0018] The realization, functional features and advantages of the purpose of the present application will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments

[0019] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0020] As Figure 1 shown, the present application provides an instant messaging data encryption and transmission method, including: S1. Obtain the data transmission information of instant messaging, where the data transmission information includes communication data information and instant messaging hardware device information; S2. Obtain a transmission data stream according to the communication data information, divide the transmission data stream into multiple encryption units of a fixed size, obtain corresponding preambles of the encryption units according to the multiple encryption units, and generate multiple hash ciphertexts based on the hash encryption for the multiple preambles of the encryption units; S3. Obtain user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and obtain the gyroscope angular velocity change rate and the instantaneous gradient of environmental light intensity according to the environmental sensor information; S4. Generate a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate and the instantaneous gradient of environmental light intensity; S5. Perform key exchange on the multiple hash ciphertexts and the dynamic random entropy value seed based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key; S6. Encrypt and transmit the instant messaging data based on the double-encrypted transmission data key.

[0021] As described in the above steps S1 - S6, in the existing encryption technology in the instant messaging scenario, as the number of people increases, it takes more time to update the protocol group chat key, resulting in a large delay in the encrypted transmission of instant messaging data, and thus unable to meet the requirement of timely response in instant communication. Therefore, the present invention first obtains the data transmission information of instant messaging, where the data transmission information includes communication data information and instant messaging hardware device information. By comprehensively collecting various types of data information required for instant messaging, it provides basic materials for subsequent encryption processing, ensuring that the encryption process can fully consider communication content and device - related factors, enhancing the pertinence and security of encryption. Since communication data usually has complex and diverse formats, it is converted into a unified binary data stream and divided into encryption units to facilitate efficient encryption operations. Hash encryption, due to its strong one - wayness and collision resistance, can generate reliable hash cipher values based on the pre - order of encryption units, providing important intermediate data for subsequent key generation and data security guarantee, and is an indispensable part of the encryption process. Then, according to the communication data information, the transmission data stream is obtained, and the transmission data stream is divided into multiple encryption units of a fixed size. According to the multiple encryption units, the corresponding pre - order of encryption units is obtained, and multiple hash cipher values are generated from the multiple pre - orders of encryption units based on hash encryption. Through standardization conversion and segmentation processing, the communication data is converted into a unit structure suitable for encryption, and hash encryption is used to generate hash cipher values. These cipher values are irreversible and unique, which can effectively guarantee the integrity and originality of the data, preventing the data from being tampered with during transmission. Then, according to the instant messaging hardware device information, the user fingerprint information and environmental sensor information are obtained, and the gyroscope angular velocity change rate and the instantaneous gradient of environmental light intensity are obtained according to the environmental sensor information. By deeply excavating dynamic factors such as user fingerprint information, gyroscope angular velocity change rate, and instantaneous gradient of environmental light intensity from the hardware device information, these factors are random and real - time, which can greatly increase the dynamicity and unpredictability of encryption and resist common static attack means. Immediately afterwards, a dynamic random entropy value seed is generated according to the user fingerprint information, gyroscope angular velocity change rate, and instantaneous gradient of environmental light intensity. In this way, dynamic information from multiple sources is encoded, mixed, and further processed to generate a dynamic random entropy value seed.As a key basis for key generation, the entropy value seed has extremely high randomness and unpredictability, laying the foundation for generating high-strength encryption keys subsequently. At the same time, information from different sources each has unique randomness characteristics. Through operations such as encoding by a quantum random number generator and XOR superposition mixing, these randomnesses are fully integrated, and then combined with a timestamp to further enhance its dynamic change characteristics, ensuring that the generated entropy value seed has sufficient strength in the cryptographic sense and meets the strict requirements of encryption for key randomness, thereby enhancing the security of the overall encryption system. Then, based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm, multiple said hash cipher values and the dynamic random entropy value seed are used for key exchange to obtain a doubly encrypted transmission data key. In this way, the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm are comprehensively used, combined with the previously generated hash cipher values and the dynamic random entropy value seed for key exchange to generate a doubly encrypted transmission data key. This multi-algorithm fusion and double-encryption mechanism significantly improves the security and anti-attack ability of the key, effectively coping with the potential threats brought by emerging technologies such as quantum computing. Among them, the elliptic curve cryptography algorithm has the advantages of high efficiency and security in the traditional cryptography field, while the post-quantum Kyber algorithm is designed for the potential threats of quantum computing. The combination of the two and the key exchange based on multiple key data generated in the early stage can give full play to the strengths of their respective algorithms, ensure the security of the key in different security dimensions, adapt to the increasingly complex network security environment, and ensure the confidentiality and integrity of instant messaging data during transmission. Finally, the instant messaging data is encrypted and transmitted based on the doubly encrypted transmission data key. In this way, a multi-fork tree path is constructed according to the number of group chat members in the protocol, and the path nodes are encrypted and used to encrypt the instant messaging data. This method can efficiently adapt to the multi-user data transmission in the group chat scenario, ensure that each member can encrypt and decrypt data through a secure key path, and at the same time reduce the latency problem caused by key updates, ensuring the timeliness of instant messaging.

[0022] In one embodiment, the step S2 of obtaining a transmission data stream according to the communication data information, splitting the transmission data stream into multiple encryption units of a fixed size, obtaining corresponding preambles of the encryption units according to the multiple encryption units, and generating multiple hash cipher values based on hash encryption includes: S201. Based on TLV encoding conversion, standardize the communication data information into a binary data stream, obtain a binary data stream, and define the binary data stream as a transmission data stream; S202. Split the transmission data stream into multiple encryption units of a fixed size according to a preset fixed length; S203. Decompose the multiple encryption units according to standard fields to obtain multiple preambles of the encryption units; S204. Generate a genesis block for multiple said encryption units based on hash encryption, and perform chain binding on the genesis block to obtain multiple hash cipher values, where the chain binding is to concatenate the genesis blocks into an irreversible chain structure based on the forward hash dependency relationship.

[0023] As described in the above steps S201 - S204, in instant messaging data processing, since the sources of communication data are extensive and the formats are diverse, without standardization processing, subsequent operations such as segmentation and encryption will be difficult to implement effectively. The present invention first converts the communication data information into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and defines the binary data stream as a transmission data stream. By converting the communication data information into a standardized binary stream through TLV encoding conversion, the unification of data formats is achieved. This unification enables subsequent processing procedures to be carried out in a standardized and normalized manner, avoiding the processing complexity and error possibilities caused by data format differences, and laying a foundation for data encryption processing. Among them, TLV encoding conversion provides a general and mature method to achieve the unification of data formats, ensuring that data from different sources and types can be correctly recognized and processed by the system, which is a key step in data pre - processing in the entire encryption process. Then, the transmission data stream is segmented into multiple encryption units of a fixed size according to a preset fixed length. For a large - scale communication data stream, if it is directly encrypted as a whole, the computational workload is huge and a single error may lead to the failure of the entire data transmission. Therefore, segmenting it into encryption units of a fixed size conforms to the engineering practice principles of cryptography and data processing, can reduce the processing difficulty, improve the stability and reliability of the system, and is a necessary means to achieve efficient encryption. Furthermore, by segmenting the binary data stream into multiple encryption units according to a preset fixed length, the originally continuous data stream is decomposed into small blocks that are convenient for management and operation. Such a segmentation method is beneficial to improving encryption efficiency because each encryption unit can be encrypted independently, and it is also convenient for error detection and correction during data transmission, enhancing the reliability of the data. Then, the multiple encryption units are disassembled according to standard fields to obtain multiple encryption unit prefixes. That is, by disassembling the encryption units according to standard fields, the key information parts in each encryption unit are extracted. These prefix information will be important inputs for subsequent hash encryption. By performing hash processing on them, representative and unique hash values can be generated for data integrity verification and key generation and other links. At the same time, not all information in the encryption unit is equally important in encryption and security verification. By disassembling to obtain the key prefix information, the focus can be on the part that plays a core role in data security.Based on these preamble information for hash encryption, it is possible to reduce unnecessary computational effort while ensuring security, improving the overall performance and efficiency of the encryption system. Finally, based on hash encryption, multiple preambles of the encryption units are used to generate the genesis block, and the genesis blocks are chained together to obtain multiple hash cipher values. Among them, chaining is to concatenate the genesis blocks into an irreversible chain structure based on the forward hash dependency relationship. The definition of the genesis block is the initial unit of the hash encryption chain structure, serving as the trust anchor and security root of the entire data chain. Generating the genesis block based on hash encryption and performing chaining creates a hash cipher value chain with irreversibility and relevance. The genesis block, as the starting point and trust anchor of the entire data chain, ensures the reliability and integrity of the data source. The chained structure makes each hash cipher value depend on the previous value, and any tampering with the data will cause changes in subsequent hash values, thus enabling the timely detection of data anomalies and ensuring the security of data during transmission. Among them, the chained structure of hash encryption has important application value in cryptography. It draws on the idea of blockchain technology and provides a powerful anti-tampering and integrity verification mechanism for instant messaging data. The multiple hash cipher values generated in this way become an important basis for subsequent key exchange and data encryption, and are one of the core links in ensuring data security in the entire encryption transmission method, effectively resisting common network attack means such as man-in-the-middle attacks and data tampering.

[0024] In one embodiment, the step S3 of obtaining the gyroscope angular velocity change rate and the instantaneous gradient of the ambient light intensity according to the ambient sensor information includes: S301. Obtain gyroscope data according to the ambient sensor information, and perform raw signal correction on the gyroscope data to obtain corrected gyroscope data; S302. Obtain the gyroscope instantaneous velocity and the gyroscope data sampling interval according to the corrected gyroscope data; S303. Based on a preset time series, obtain the first adjacent sampling points before and after the gyroscope at the current moment, where the first adjacent sampling points before and after include the first sampling point moment and the second sampling point moment; S304. Calculate the gyroscope angular velocity change rate according to the gyroscope instantaneous velocity, the gyroscope data sampling interval, the first sampling point moment, and the second sampling point moment. The calculation formula is: ; Among them, represents the gyroscope angular velocity change rate, represents the gyroscope instantaneous velocity, represents the first sampling point moment, represents the second sampling point moment, represents the gyroscope data sampling interval; S305. Obtain the initial measured light intensity value of the photoelectric sensor according to the environmental sensor information; S306. Perform non-linear compensation on the initial measured light intensity value based on a standard light source to obtain a compensated measured light intensity value; S307. Obtain the initial measured light sampling interval; S308. Obtain the second adjacent sampling points before and after the photoelectric sensor at the current moment based on a preset time series, where the second adjacent sampling points before and after include the third sampling point time and the fourth sampling point time; S309. Calculate the instantaneous gradient of the ambient light intensity according to the compensated measured light intensity value, the initial measured light sampling interval, the third sampling point time, and the fourth sampling point time, where the calculation formula is: ; Where, represents the instantaneous gradient of the ambient light intensity, represents the compensated measured light intensity value, represents the third sampling point time, represents the fourth sampling point time, represents the initial measured light sampling interval.

[0025] As described in the above steps S301 - S309, the present invention first obtains gyroscope data based on the environmental sensor information, and corrects the original signal of the gyroscope data to obtain corrected gyroscope data. In this way, obtaining gyroscope data from the environmental sensor information and performing original signal correction ensures the accuracy and reliability of the data. There may be problems such as noise and deviation in the original gyroscope data. After correction, it can provide high-quality basic data for the subsequent accurate calculation of the angular velocity change rate, reducing the encryption security risk caused by data errors. At the same time, when using gyroscope data for encryption-related operations, the accuracy of the data is crucial. If directly using the uncorrected original data, it may introduce incorrect information and affect the validity of the keys or encryption parameters generated based on these data. Therefore, performing original signal correction is a necessary prerequisite to ensure that the entire encryption system operates based on reliable data. Then, based on the corrected gyroscope data, the gyroscope instantaneous velocity and the gyroscope data sampling interval are obtained. And obtaining the gyroscope instantaneous velocity and the data sampling interval based on the corrected gyroscope data, these parameters are the key elements for calculating the angular velocity change rate. Defining these values provides the necessary input for subsequent accurate mathematical calculations, enabling the accurate quantification of the dynamic characteristics of the gyroscope, and further introducing randomness based on the device's motion state into the encryption process. Then, based on a preset time series, the first adjacent sampling points before and after the gyroscope at the current moment are obtained. Among them, the first adjacent sampling points before and after include the first sampling point time and the second sampling point time. In this way, determining the first adjacent sampling points before and after the gyroscope at the current moment based on the preset time series. This step establishes a time reference framework for the subsequent calculation of the angular velocity change rate. By selecting appropriate adjacent sampling points, the speed change trend of the gyroscope in a short period can be accurately reflected, so as to obtain a representative angular velocity change rate for enhancing randomness in the encryption process. At the same time, when calculating the angular velocity change rate, reasonably selecting sampling points is the key to ensuring that the calculation result accurately reflects the dynamic characteristics of the gyroscope. Selecting adjacent sampling points through the preset time series follows the basic principles of signal processing and mathematical calculations, ensuring that effective dynamic change information can be extracted from continuous gyroscope data and providing a reliable source of randomness for encryption. Immediately afterwards, based on the gyroscope instantaneous velocity, the gyroscope data sampling interval, the first sampling point time, and the second sampling point time, the gyroscope angular velocity change rate is calculated. In this way, using the parameters obtained previously, the gyroscope angular velocity change rate is calculated according to a specific formula. This change rate is a physical quantity that changes in real time and is closely related to the device's motion. Introducing it into the encryption process greatly increases the dynamicity and unpredictability of encryption, effectively resists attacks based on fixed patterns, and improves the security of encryption. Then, based on the environmental sensor information, the initial measured light intensity value of the photoelectric sensor is obtained. And obtaining the initial measured light intensity value of the photoelectric sensor from the environmental sensor information provides the basic data for the subsequent calculation of the instantaneous gradient of the ambient light intensity.The change in the light intensity value reflects the dynamic changes in the environment, which is an important basis for introducing environmental randomness in the encryption process. Subsequently, a non-linear compensation is performed on the initial measured light intensity value based on a standard light source to obtain a compensated measured light intensity value. Furthermore, a non-linear compensation is performed on the initial measured light intensity value based on the standard light source, improving the accuracy and comparability of the light intensity data. The measured values of the optoelectronic sensor in different environments may deviate. Through compensation, subsequent calculations can be carried out under a unified standard, ensuring that the instantaneous gradient of the ambient light intensity calculated based on the change in light intensity can accurately reflect the real changes in the environment, enhancing the reliability of encryption. Then, the initial measured light sampling interval is obtained. Secondly, based on a preset time series, the second adjacent sampling points before and after the optoelectronic sensor at the current moment are obtained. Among them, the second adjacent sampling points before and after include the third sampling point moment and the fourth sampling point moment. Determining the second adjacent sampling points before and after the optoelectronic sensor at the current moment based on a preset time series is similar to the gyroscope data processing, establishing a time reference framework for calculating the instantaneous gradient of the ambient light intensity. By selecting appropriate adjacent sampling points, the change trend of the light intensity within a short period can be accurately reflected, thereby obtaining a representative instantaneous gradient of the ambient light intensity for enhancing randomness in the encryption process. Finally, the instantaneous gradient of the ambient light intensity is calculated based on the compensated measured light intensity value, the initial measured light sampling interval, the third sampling point moment, and the fourth sampling point moment. In this way, using the compensated light intensity value, sampling interval, and adjacent sampling points obtained previously, the instantaneous gradient of the ambient light intensity is calculated according to a specific formula. This gradient value reflects the rapid change of the ambient light. Introducing it into the encryption process further increases the environmental randomness factor in encryption, making the encryption result more difficult to predict and improving the resistance to external attacks. At the same time, the instantaneous gradient of the ambient light intensity, as an important quantitative indicator of environmental randomness, can provide unique random information for encryption. By accurately calculating and applying this gradient value, the dynamic change characteristics of the ambient light can be fully utilized to construct a more powerful encryption system together with other factors, enhancing the security and anti-cracking ability of encryption and effectively protecting the security of instant messaging data during transmission.

[0026] In one embodiment, step S4 of generating a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of the ambient light intensity includes: S401. Extract the pressure gradient of the fingerprint press detected by the pressure sensor array according to the instant messaging hardware device information, and generate a first 256-bit binary code for the pressure gradient based on a quantum random number generator; S402. Generate a second 256-bit binary code for the gyroscope angular velocity change rate based on a quantum random number generator; S403. Generate a third 256-bit binary code for the instantaneous gradient of the ambient light intensity based on a quantum random number generator; S404. Perform XOR superposition mixing on the first 256-bit binary code, the second 256-bit binary code, and the third 256-bit binary code to obtain a mixed code; S405. Process the mixed code based on a hash function to obtain a hash mixed code value, and use the hash mixed code value; S406. Obtain the current timestamp based on a preset time series, and mix the current timestamp and the hash mixed code value based on a quantum random number generator to obtain a dynamic random entropy value seed.

[0027] As described in the above steps S401 - S406, the present invention extracts the pressure gradient of fingerprint pressing detected by the pressure - sensitive array according to the instant messaging hardware device information, and generates a first 256 - bit binary code based on the pressure gradient by using a quantum random number generator. By extracting the fingerprint pressing pressure gradient detected by the pressure - sensitive array from the instant messaging hardware device information and using a quantum random number generator to convert it into a first 256 - bit binary code. The fingerprint pressure gradient is unique, and the binary code generated based on this introduces a randomness factor based on the user's biometric characteristics for subsequent key generation, enhancing the unpredictability of the key and improving the security of encryption. At the same time, during the encryption process, using the user's biometric information can increase the personalization and uniqueness of the key. Fingerprint, as a stable and unique biometric characteristic, the change in its pressure gradient can provide rich random information. The quantum random number generator further ensures the randomness of the code, making the generated binary code have a high strength in cryptography and providing a strong basis for constructing a secure key. Then, based on the quantum random number generator, the change rate of gyroscope angular velocity is generated into a second 256 - bit binary code. The change rate of gyroscope angular velocity is converted into a second 256 - bit binary code by using a quantum random number generator. The change rate of gyroscope angular velocity reflects the dynamic motion state of the device and is a physical quantity that changes in real - time and is difficult to predict. After encoding it, it adds the randomness of the device's dynamic environment to key generation, enabling the key to change continuously with the usage state of the device, effectively resisting attacks based on fixed patterns. At the same time, in modern encryption technologies, introducing the dynamic physical information of the device can significantly improve the security of encryption. The real - time and random nature of gyroscope data make it one of the ideal key - generation elements. Using a quantum random number generator for encoding can convert this physical quantity into a binary form suitable for cryptographic operations, further enriching the source of key randomness and enhancing the encryption system's resistance to dynamic attacks. Then, based on the quantum random number generator, the instantaneous gradient of ambient light intensity is generated into a third 256 - bit binary code. In this way, the instantaneous gradient of ambient light intensity is converted into a third 256 - bit binary code based on the quantum random number generator. The instantaneous gradient of ambient light intensity is also a factor that changes continuously with the environment. After encoding it and incorporating it into the key - generation process, it increases the randomness of environmental factors, making the keys generated each time different due to environmental differences even under the same device and user operations, improving the security and anti - cracking ability of encryption. At the same time, environmental factors are often overlooked in encryption, but in fact, they can provide additional randomness for key generation.The instantaneous change of ambient light intensity is unpredictable. Through the encoding of a quantum random number generator, this environmental randomness is converted into cryptographically usable binary encoding, further broadening the random space of the key, making the encryption system more robust and capable of adapting to different usage environments and attack scenarios. Then, the first 256-bit binary encoding, the second 256-bit binary encoding, and the third 256-bit binary encoding are subjected to bitwise XOR superposition and mixing to obtain a mixed encoding. The mixed encoding is obtained by performing bitwise XOR superposition and mixing on the three 256-bit binary encodings. This mixing operation fuses randomness information from different sources, making the generated mixed encoding incorporate the randomness of user biometrics, device dynamic movement, and environmental factors, further enhancing the complexity and unpredictability of the encoding, providing a stronger randomness basis for subsequent generation of high-quality keys. At the same time, the randomness of a single source may have certain limitations. By performing bitwise XOR superposition and mixing on multiple different types of random encodings, the advantages of each source can be fully utilized to make up for possible randomness defects. In cryptography, increasing the complexity of randomness is an important means to improve the security of the key. Therefore, this step is crucial for enhancing the security of the entire encryption system. Then, the mixed encoding is processed based on a hash function to obtain a hash mixed encoding value, and the hash mixed encoding value is used. The one-way and collision-resistant properties of the hash function make the hash mixed encoding value have the characteristics of a fixed length and uniqueness, capable of compressing the complex mixed encoding into a representative hash value, facilitating subsequent key generation and management operations, and further ensuring the integrity and security of the data. At the same time, the hash function plays an important role in cryptography. It can convert data of any length into a hash value of a fixed length and has the characteristics of irreversibility and collision resistance. In this process, hashing the mixed encoding can simplify the data structure, facilitate subsequent key generation and exchange operations, and enhance the security and reliability of the entire encryption process by utilizing the security characteristics of the hash function. Finally, based on a preset time series, the current timestamp is obtained, and the current timestamp and the hash mixed encoding value are mixed based on a quantum random number generator to obtain a dynamic random entropy value seed. By combining the current timestamp and the hash mixed encoding value, a dynamic random entropy value seed is generated through a quantum random number generator. The introduction of the timestamp increases the randomness in the time dimension, making the entropy value seed have different values at different time points, further enhancing its dynamicity and unpredictability. This entropy value seed will serve as the core input for subsequent key generation, determining the basic characteristics and security of the key. At the same time, in an encryption system, the dynamic random entropy value seed is the key to generating high-strength keys.By combining the timestamp with the hash-encoded value and processing it using a quantum random number generator, various randomness factors are fully integrated, ensuring that the entropy value seed has extremely high randomness and unpredictability in the cryptographic sense, providing a solid foundation for generating secure and reliable encryption keys and effectively resisting various cryptographic analysis attacks.

[0028] In one embodiment, the step S5 of performing key exchange on multiple hash cipher values and dynamic random entropy value seeds based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data secret key includes: S501. Obtain a public-private key pair generated from multiple hash cipher values and dynamic random entropy value seeds based on the elliptic curve cryptography algorithm, where the public-private key pair includes a first private key and a second private key; S502. Obtain a preset valid point on the elliptic curve based on the elliptic curve cryptography algorithm, and calculate a first public key according to the preset valid point and the first private key, where the calculation formula is: ; Where, represents the first public key, represents the first private key, represents the preset valid point; S503. Calculate a second public key according to the preset valid point and the second private key, where the calculation formula is: ; Where, represents the second public key, represents the second private key, represents the preset valid point; S504. Perform key conversion on the first public key and the second public key based on a hash function to obtain an ECC key; S505. Generate a Kyber key from multiple hash cipher values and dynamic random entropy value seeds based on the post-quantum Kyber algorithm, and perform key exchange on the ECC key and the Kyber key based on hash processing to obtain a double-encrypted transmission data secret key.

[0029] As described in the above steps S501 - S505, the present invention first obtains a public - private key pair generated based on the elliptic curve cryptography algorithm for a plurality of the hash cipher values and the dynamic random entropy value seeds. Among them, the public - private key pair includes a first private key and a second private key. In this way, the public - private key pair is generated based on the hash cipher values and the dynamic random entropy value seeds by using the elliptic curve cryptography algorithm. The public - private key pair is a core element in cryptography. The public key can be publicly used for encrypting data, while the private key is kept secret by the holder for decrypting. Through this method, a secure communication foundation between the data sender and the receiver is achieved, ensuring that only the receiver with the corresponding private key can decrypt the transmitted data, thus guaranteeing the confidentiality of the data. At the same time, the elliptic curve cryptography algorithm is widely used in the modern encryption field and is favored because of its advantages such as a shorter key length and higher computational efficiency under the same security strength. Generating the public - private key pair based on the previously processed hash cipher values and the dynamic random entropy value seeds makes full use of the randomness and security characteristics of these data, providing a basic key material that conforms to cryptographic standards for subsequent key exchange and data encryption, which is a key step in constructing a secure encryption transmission system. Then, based on the elliptic curve cryptography algorithm, a preset valid point on the elliptic curve is obtained, and a first public key is calculated according to the preset valid point and the first private key. In this way, the preset valid point on the elliptic curve is determined based on the elliptic curve cryptography algorithm, where the preset valid point is a special point pre - determined on the elliptic curve. It plays a crucial fundamental role in the key generation and encryption operation process. In terms of mathematical principles, the equation based on the elliptic curve defines a series of points that form the elliptic curve, and the preset valid point is a point selected in this curve space, and the first public key is calculated in combination with the first private key. This process is an important link in generating the public key in the elliptic curve cryptography algorithm. By specific mathematical operations, the private key is associated with the preset valid point, making the public key have the encryption characteristics corresponding to the private key, while ensuring the effectiveness and security of the public key in the elliptic curve cryptography system, providing the correct public key parameters for subsequent key exchange and encryption operations. At the same time, in the elliptic curve cryptography algorithm, the selection of the preset valid point and the calculation of the public key based on the private key follow strict mathematical rules, which is the basis for ensuring that the public key can correctly participate in the encryption and decryption processes. By accurately executing this step, it is ensured that the generated first public key can cooperate with the first private key in the entire encryption system to achieve secure encrypted communication, which is a necessary step for encryption operations following the principles of the elliptic curve cryptography algorithm. Immediately afterwards, a second public key is calculated according to the preset valid point and the second private key. Similarly, according to the elliptic curve cryptography algorithm, the second public key is calculated by using the preset valid point and the second private key.Similar to step S502, this step generates a corresponding public key for another party, enabling both parties to have their respective public and private key pairs under the elliptic curve cryptosystem, laying the foundation for subsequent key exchange and two-way secure communication, ensuring the feasibility and security of the encryption process in multi-user or multi-device communication scenarios. In actual instant messaging encrypted transmission, communication may involve multiple users or devices, and each participating party needs to have its own public and private key pair. By generating the second public key in this step, the encryption requirements in multi-user scenarios are met, following the multi-user application principle of the elliptic curve cryptography algorithm, ensuring that the system can support complex communication environments, enhancing the generality and practicality of the encryption method. Then, based on the hash function, the first public key and the second public key are transformed into a secret key to obtain the ECC key. In this way, the hash function is used to transform the first public key and the second public key into the ECC key. The one-way property and collision resistance of the hash function make the ECC key obtained after the transformation of the public key have higher security and uniqueness. At the same time, it is also convenient to fuse and manage with other keys in subsequent encryption operations, further enhancing the security of the entire encryption system and the diversity of keys. Finally, based on the post-quantum Kyber algorithm, multiple hash cipher values and dynamic random entropy value seeds are used to generate the Kyber key. Based on hash processing, the ECC key and the Kyber key are exchanged to obtain the double-encrypted transmission data secret key. In this way, based on the post-quantum Kyber algorithm, the hash cipher value and the dynamic random entropy value seed are used to generate the Kyber key, and the ECC key and the Kyber key are exchanged through hash processing to finally obtain the double-encrypted transmission data secret key. The post-quantum Kyber algorithm has the ability to resist quantum computing attacks. Combining with the key generated by the elliptic curve cryptography algorithm, a double-encryption mechanism is realized. This double-encryption greatly improves the security of the key, can effectively cope with various current and future possible cryptographic attack means, and ensures the high confidentiality and integrity of instant messaging data during transmission.

[0030] In one embodiment, step S6 of encrypting and transmitting instant messaging data based on the double-encrypted transmission data secret key includes: S601. Obtain the number of members in the protocol group chat, and form a multi-way tree path for the protocol group chat based on the number of members; S602. Obtain the corresponding path nodes according to the multi-way tree path, and encrypt the multiple path nodes with the double-encrypted transmission data secret key according to a preset time sequence to obtain multiple encrypted nodes; S603. Encrypt and transmit the instant messaging data of the protocol group chat according to the multiple encrypted nodes.

[0031] As described in the above steps S601 - S603, the present invention first obtains the number of members in the protocol group chat, and forms a multi - fork tree path based on the number of members. In this way, by obtaining the number of members in the protocol group chat to construct a multi - fork tree path, the effective organization and management of the group chat member structure are realized. In the group chat scenario, the change in the number of members will affect the complexity of data transmission, and the multi - fork tree path can sort out this complexity in an orderly manner, providing a clear logical architecture for subsequent data encryption and distribution, ensuring that each member can accurately receive and process data in this architecture, improving the efficiency and accuracy of data transmission. At the same time, in the encrypted transmission of instant messaging group chats, how to reasonably arrange the data flow is a key issue. Constructing a multi - fork tree path according to the number of members is an effective data organization method. It can adapt to group chats of different scales, structure the relationships between group members, avoid chaos in data transmission, and provide an orderly basic framework for subsequent encryption operations. It is a necessary prerequisite for realizing efficient group chat encrypted transmission. Then, according to the multi - fork tree path, the corresponding path nodes are obtained, and the transmission data secret key of double encryption encrypts multiple said path nodes according to a preset time sequence to obtain multiple encrypted nodes. In this way, based on the multi - fork tree path, the corresponding path nodes are determined, and the transmission data secret key of double encryption is used to encrypt these nodes according to a preset time sequence to generate multiple encrypted nodes. These encrypted nodes become the key medium for the secure transmission of data among group chat members. Each encrypted node carries part of the information that has been encrypted. Only members with the correct key can decrypt the information of the corresponding node, thus ensuring the confidentiality of data during transmission and preventing information from being obtained by unauthorized members. At the same time, in the group chat encryption system, encrypting the key nodes on the transmission path is one of the core operations to ensure data security. By using the double - encrypted secret key to encrypt the path nodes, the high - strength key generated in the previous steps is fully utilized, and the dynamicity and randomness of encryption are increased by combining with the preset time sequence. This step ensures the security of data during transmission. Even in a complex group chat environment, it can effectively resist external attacks and information leakage. It is a key link for realizing secure group chat encrypted transmission. Finally, according to multiple said encrypted nodes, the instant messaging data of the protocol group chat is encrypted and transmitted. In this way, by using multiple encrypted nodes to encrypt and transmit the instant messaging data of the protocol group chat, comprehensive encryption protection of group chat data is realized. During the whole process from the sender to the receiver of the data, through the layer - by - layer protection of the encrypted nodes, the data is in a secure state at each transmission link, ensuring the confidentiality, integrity and availability of the instant messaging data, meeting the strict requirements for data security in the group chat scenario. At the same time, multiple encrypted nodes can also efficiently adapt to the multi - user data transmission in the group chat scenario, ensuring that each member can encrypt and decrypt data through a secure key path, and reducing the latency problem caused by key updates.

[0032] As shown Figure 2 in the figure, the present application further provides an instant messaging data encryption and transmission system, including: A first acquisition module, configured to acquire instant messaging data transmission information, where the data transmission information includes communication data information and instant messaging hardware device information; A second acquisition module, configured to acquire a transmission data stream according to the communication data information, split the transmission data stream into multiple encryption units of a fixed size, acquire corresponding encryption unit prefixes according to the multiple encryption units, and generate multiple hash cipher values based on the multiple encryption unit prefixes through hash encryption; A third acquisition module, configured to acquire user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and acquire the gyroscope angular velocity change rate and the instantaneous gradient of environmental light intensity according to the environmental sensor information; A generation module, configured to generate a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate, and the instantaneous gradient of environmental light intensity; An exchange module, configured to perform key exchange on the multiple hash cipher values and the dynamic random entropy value seed based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key; A transmission module, configured to encrypt and transmit instant messaging data based on the double-encrypted transmission data key.

[0033] In one embodiment, the second acquisition module includes: A first acquisition unit, configured to perform standardized binary stream conversion on the communication data information based on TLV encoding conversion to obtain a binary data stream, and define the binary data stream as a transmission data stream; A splitting unit, configured to split the transmission data stream into multiple encryption units of a fixed size according to a preset fixed length; A second acquisition unit, configured to disassemble the multiple encryption units according to standard fields to obtain multiple encryption unit prefixes; A generation unit, configured to generate a genesis block based on the multiple encryption unit prefixes through hash encryption, and perform chain binding on the genesis block to obtain multiple hash cipher values, where the chain binding is to concatenate the genesis blocks into an irreversible chain structure based on the forward hash dependency relationship.

[0034] As shown Figure 3 in the figure, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned method for instant messaging data encryption and transmission are implemented.

[0035] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-described method for encrypting and transmitting instant messaging data are implemented.

[0036] Those of ordinary skill in the art can understand that all or part of the processes in the above-described embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-described method embodiments. Among them, any reference to a memory, storage, database, or other medium provided in this application and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0037] It should be noted that in this text, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or further includes elements inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, apparatus, article, or method comprising that element.

[0038] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structural or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for encrypting and transmitting instant messaging data, characterized in that: include: Acquire data transmission information of instant messaging, wherein the data transmission information includes communication data information and instant messaging hardware device information; Acquire a transmission data stream according to the communication data information, divide the transmission data stream into a plurality of encryption units of fixed size, acquire corresponding encryption unit preambles according to the plurality of encryption units, and generate a plurality of hash secret values ​​from the plurality of encryption unit preambles based on hash encryption; Acquire user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and acquire the gyroscope angular velocity change rate and the instantaneous gradient of ambient light intensity according to the environmental sensor information; Generate a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate and the instantaneous gradient of ambient light intensity; Based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm, multiple hash secret values ​​and dynamic random entropy value seeds are exchanged to obtain a double-encrypted transmission data key; Instant messaging data is encrypted and transmitted based on the double-encrypted transmission data key.

2. The instant messaging data encryption transmission method according to claim 1, characterized in that: The step of obtaining a transmission data stream according to the communication data information, dividing the transmission data stream into a plurality of encryption units of a fixed size, obtaining corresponding encryption unit preambles according to the plurality of encryption units, and generating a plurality of hash secret values ​​from the plurality of encryption unit preambles based on hash encryption includes: The communication data information is converted into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and the binary data stream is defined as a transmission data stream; Dividing the transmission data stream into a plurality of encryption units of fixed size according to a preset fixed length; Disassembling the plurality of encryption units according to standard fields to obtain a plurality of encryption unit preambles; Based on hash encryption, multiple encryption unit preambles are used to generate genesis blocks, and the genesis blocks are chain-bound to obtain multiple hash secret values, wherein the chain binding is to connect the genesis blocks in series into an irreversible chain structure based on a forward hash dependency.

3. The method for encrypting and transmitting instant messaging data according to claim 1, characterized in that: The step of obtaining the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient according to the environmental sensor information includes: Acquire gyroscope data according to the environmental sensor information, and perform original signal correction on the gyroscope data to obtain corrected gyroscope data; Acquiring a gyroscope instantaneous speed and a gyroscope data sampling interval according to the corrected gyroscope data; Acquire the first adjacent sampling points of the gyroscope at the current moment based on a preset time sequence, wherein the first adjacent sampling points include the first sampling point moment and the second sampling point moment; Calculate the gyroscope angular velocity change rate according to the gyroscope instantaneous speed, the gyroscope data sampling interval, the first sampling point time and the second sampling point time; Acquire an initial measured light intensity value of a photoelectric sensor according to the environmental sensor information; Performing nonlinear compensation on the initial measured light intensity value based on the standard light source to obtain a compensated measured light intensity value; Obtaining an initial measurement light sampling interval; Acquire the second adjacent sampling points of the photoelectric sensor at the current moment based on a preset time sequence, wherein the second adjacent sampling points include the third sampling point moment and the fourth sampling point moment; The instantaneous gradient of the ambient light intensity is calculated according to the compensated measured light intensity value, the initial measured light sampling interval, the third sampling point time and the fourth sampling point time.

4. The method for encrypting and transmitting instant messaging data according to claim 1, characterized in that: The step of generating a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient includes: Extracting the pressure gradient of the fingerprint pressing by the pressure sensing array according to the information of the instant messaging hardware device, and generating a first 256-bit binary code from the pressure gradient based on the quantum random number generator; Based on a quantum random number generator, the gyroscope angular velocity change rate generates a second 256-bit binary code; Generate a third 256-bit binary code based on the instantaneous gradient of the ambient light intensity by a quantum random number generator; The first 256-bit binary code, the second 256-bit binary code and the third 256-bit binary code are mixed in different positions to obtain a mixed code; Processing the mixed code based on a hash function to obtain a hash mixed code value, and performing the hash mixed code value; A current timestamp is obtained based on a preset time sequence, and the current timestamp and the hash mixed coding value are mixed based on a quantum random number generator to obtain a dynamic random entropy value seed.

5. The instant messaging data encryption transmission method according to claim 1, characterized in that: The step of performing key exchange on the multiple hash secret values ​​and the dynamic random entropy value seeds based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key includes: Obtaining a public-private key pair generated by using an elliptic curve cryptographic algorithm for the plurality of hash values ​​and a dynamic random entropy value seed, wherein the public-private key pair includes a first private key and a second private key; Obtaining a preset effective point on the elliptic curve based on an elliptic curve cryptographic algorithm, and calculating a first public key according to the preset effective point and the first private key; Calculate a second public key according to the preset validity point and the second private key; Performing secret key conversion on the first public key and the second public key based on a hash function to obtain an ECC key; Based on the post-quantum Kyber algorithm, multiple hash secret values ​​and dynamic random entropy value seeds are used to generate Kyber keys, and the ECC key and the Kyber key are exchanged based on hash processing to obtain a double-encrypted transmission data key.

6. The method for encrypting and transmitting instant messaging data according to claim 1, characterized in that: The step of encrypting and transmitting the instant messaging data based on the double-encrypted transmission data key includes: Obtaining the number of members of the protocol group chat, and organizing the protocol group chat into a multi-branch tree path based on the number of members; Acquire corresponding path nodes according to the multi-branch tree path, encrypt the plurality of path nodes according to a preset time sequence using the double-encrypted transmission data key to obtain a plurality of encrypted nodes; The instant messaging data of the protocol group chat is encrypted and transmitted according to the multiple encryption nodes.

7. An instant messaging data encryption transmission system, characterized in that: include: A first acquisition module, used to acquire data transmission information of instant messaging, wherein the data transmission information includes communication data information and instant messaging hardware device information; A second acquisition module is used to acquire a transmission data stream according to the communication data information, and divide the transmission data stream into a plurality of encryption units of fixed size, acquire corresponding encryption unit preambles according to the plurality of encryption units, and generate a plurality of hash secret values ​​from the plurality of encryption unit preambles based on hash encryption; A third acquisition module is used to acquire user fingerprint information and environmental sensor information according to the instant messaging hardware device information, and acquire the gyroscope angular velocity change rate and the instantaneous gradient of ambient light intensity according to the environmental sensor information; A generation module, used to generate a dynamic random entropy value seed according to the user fingerprint information, the gyroscope angular velocity change rate and the ambient light intensity instantaneous gradient; An exchange module is used to perform key exchange on the multiple hash secret values ​​and dynamic random entropy value seeds based on the elliptic curve cryptography algorithm and the post-quantum Kyber algorithm to obtain a double-encrypted transmission data key; The transmission module is used to encrypt and transmit instant messaging data based on a double-encrypted transmission data key.

8. The instant messaging data encryption transmission system according to claim 7, characterized in that: The second acquisition module includes: A first acquisition unit is used to convert the communication data information into a standardized binary stream based on TLV encoding conversion to obtain a binary data stream, and define the binary data stream as a transmission data stream; A segmentation unit, used for segmenting the transmission data stream into a plurality of encryption units of fixed size according to a preset fixed length; A second obtaining unit is used to disassemble the plurality of encryption units according to standard fields to obtain a plurality of encryption unit preambles; A generation unit is used to generate a genesis block from a plurality of the encryption unit preambles based on hash encryption, and to chain-bind the genesis blocks to obtain a plurality of hash secret values, wherein the chain binding is to concatenate the genesis blocks into an irreversible chain structure based on a forward hash dependency.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Data transmission method based on post-quantum hybrid encryption and related product

    CN118199859A

  • Double-ratchet password communication method and system based on mixed quantum and asymmetric password

    CN118972049A

  • Secure communication protocol method and system based on microchip fingerprint technology

    CN119011137A

  • Digital information encryption method

    CN119094124A

  • Encryption communication system, encryption communication apparatus, and encryption communication method

    EP4254856A1