A key generation method and device, computer equipment and storage medium
Patent Information
- Application Number
- CN202211126540.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2042-09-16
AI Technical Summary
[0002]目前,在物联网通信双方生成密钥信息的领域内,仅可实现近距离通信的通信双方分别生成一致的密钥信息
[0049] Using the embodiments described in this specification, the two communicating parties in an IoT communication system determine coded data based on their local channel measurement sets. Then, based on this coded data, they determine high-dimensional data and low-dimensional data. Either party sends the generated low-dimensional data to the other party and determines key information based on the generated high-dimensional data. The other party, upon receiving the low-dimensional data, determines a mismatch bit based on the received and generated low-dimensional data, and updates the generated high-dimensional data accordingly, obtaining key information consistent with that of one of the communicating parties. This achieves consistent key information generation between the two parties in long-distance communication, and the use of low-dimensional data for communication ensures communication security during the key information generation process.
Smart Images

Figure CN117768094B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of Internet of Things (IoT) technology, and in particular to a key generation method, apparatus, computer device, and storage medium. Background Technology
[0002] Currently, in the field of key information generation between IoT communication parties, only short-range communication can achieve the generation of consistent key information by both parties. Due to the rapid development of the IoT field, the low power and low data rate during long-range communication pose a challenge to the generation of consistent key information by both parties.
[0003] How to ensure that both parties in a long-distance IoT communication generate consistent key information is a problem that urgently needs to be solved in the current technology. Summary of the Invention
[0004] To address the problems in the prior art, embodiments of this specification provide a key generation method, apparatus, computer device, and storage medium. The method involves processing encoded data to obtain first low-dimensional data and first high-dimensional data, sending the first low-dimensional data to a second terminal, and determining key information based on the first high-dimensional data. This achieves consistent key information generation between the two ends in long-distance communication and ensures communication security during the key information generation process.
[0005] To solve the above-mentioned technical problems, the specific technical solution in this specification is as follows:
[0006] On one hand, this specification provides a key generation method applied to a first terminal in an Internet of Things (IoT) communication system. The IoT communication system also includes a second terminal, and the first terminal and the second terminal interact with each other, including...
[0007] The set of channel measurement values for the communication channel of the first terminal is processed to obtain encoded data;
[0008] The encoded data is processed to obtain first low-dimensional data and first high-dimensional data;
[0009] Send the first low-dimensional data; and
[0010] Based on the first high-dimensional data, key information is generated.
[0011] Furthermore, the set of channel measurement values for the communication channel of the first terminal is processed to obtain encoded data, which further includes:
[0012] Using a transformation model, the set of channel measurement values of the communication channel of the first terminal is processed to obtain the first coded data of the first terminal;
[0013] or;
[0014] The trained numerical prediction model is used to process the set of channel measurement values of the communication channel of the first terminal to obtain the second coded data for predicting the second terminal.
[0015] Furthermore, the training process of this trained numerical prediction model further includes,
[0016] The first sample channel measurement set is processed using a preset numerical prediction model to obtain the first sample coded data;
[0017] The second encoded data of the sample and the first encoded data of the sample are processed according to the loss function to obtain the loss function value; and
[0018] The preset numerical prediction model is trained based on the loss function value.
[0019] The second coded data of the sample is the coded data obtained by the second terminal using a conversion model to process the second sample channel measurement value set of the communication channel of the second terminal.
[0020] Furthermore, the preset numerical prediction model includes a preset prediction model and a preset transformation model. The process of using the preset numerical prediction model to process the first sample channel measurement set to obtain the first sample coded data includes...
[0021] The first sample channel measurement value set is processed using a preset prediction model to obtain the sample predicted channel measurement value set;
[0022] The sample prediction channel measurement set is processed using a preset conversion model to obtain the first coded data of the sample;
[0023] and;
[0024] The process of processing the second encoded data of the sample and the first encoded data of the sample according to the loss function to obtain the loss function value includes:
[0025] Based on the first loss function, the channel measurement label and the sample predicted channel measurement set are processed to obtain the first loss function value;
[0026] Based on the second loss function, the second encoded data of the samples and the first encoded data of the samples are processed to obtain the value of the second loss function, and
[0027] Based on the first loss function value and the second loss function value, determine the loss function value.
[0028] The channel measurement value label is the second sample channel measurement value set.
[0029] Furthermore, the trained numerical prediction model includes a trained prediction model and a trained transformation model. The step of processing the channel measurement set of the communication channel of the first terminal using the trained numerical prediction model to obtain the second encoded data for predicting the second terminal further includes...
[0030] The trained prediction model is used to process the set of channel measurements to obtain a predicted set of channel measurements for the second terminal; and
[0031] The trained conversion model is used to process the set of channel measurements for the predicted second terminal to obtain the second coded data for the predicted second terminal.
[0032] On the other hand, embodiments of this specification provide a key generation method applied to a second terminal in an Internet of Things (IoT) communication system. The IoT communication system further includes a first terminal, and the second terminal and the first terminal interact with each other, including...
[0033] The set of channel measurement values for the communication channel of the second terminal is processed to obtain converted and encoded data;
[0034] The converted and encoded data undergoes a first processing step to obtain second low-dimensional data and second high-dimensional data.
[0035] Receive the first low-dimensional data; and
[0036] Based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data, key information is generated.
[0037] The first low-dimensional data is the low-dimensional data obtained by the first terminal based on the set of channel measurement values of the communication channel of the first terminal.
[0038] Furthermore, the generation of key information based on the first low-dimensional data and the second high-dimensional data further includes,
[0039] Perform an XOR operation on the second low-dimensional data and the first low-dimensional data to obtain mismatch information;
[0040] The mismatch information is processed a second time to obtain mismatch bit information; and
[0041] Based on the mismatch bit information, the second high-dimensional data is updated to obtain the key information.
[0042] On the other hand, embodiments of this specification also provide a key generation device applied to a first terminal in an Internet of Things (IoT) communication system. The IoT communication system further includes a second terminal, and the first terminal and the second terminal interact with each other, including...
[0043] The first processing unit is used to process the set of channel measurement values of the communication channel of the first terminal to obtain encoded data;
[0044] The second processing unit is used to process the encoded data to obtain first low-dimensional data and first high-dimensional data;
[0045] A sending unit, configured to send the first low-dimensional data; and
[0046] The generation unit generates key information based on the first high-dimensional data.
[0047] On the other hand, embodiments of this specification also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0048] On the other hand, embodiments of this specification also provide a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described method.
[0049] Using the embodiments described in this specification, the two communicating parties in an IoT communication system determine coded data based on their local channel measurement sets. Then, based on this coded data, they determine high-dimensional data and low-dimensional data. Either party sends the generated low-dimensional data to the other party and determines key information based on the generated high-dimensional data. The other party, upon receiving the low-dimensional data, determines a mismatch bit based on the received and generated low-dimensional data, and updates the generated high-dimensional data accordingly, obtaining key information consistent with that of one of the communicating parties. This achieves consistent key information generation between the two parties in long-distance communication, and the use of low-dimensional data for communication ensures communication security during the key information generation process. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1A The diagram shown is a schematic representation of an implementation system for a key generation method according to an embodiment of this specification.
[0052] Figure 1BThe diagram shown is a schematic representation of an implementation system for a method for determining encoded data according to an embodiment of this specification.
[0053] Figure 2 The diagram shown is a flowchart of a key generation method according to an embodiment of this specification;
[0054] Figure 3 The diagram shown is a flowchart of a key generation method according to another embodiment of this specification;
[0055] Figure 4 The diagram shown is a flowchart of a method for generating second encoded data for predicting the peer, according to an embodiment of this specification.
[0056] Figure 5 The diagram shown is a flowchart of a key generation method according to another embodiment of this specification;
[0057] Figure 6A The diagram shown is a flowchart of a key generation method according to another embodiment of this specification;
[0058] Figure 6B The diagram shown is a flowchart of a method for determining target channel measurement values according to an embodiment of this specification;
[0059] Figure 7 The diagram shown is a schematic representation of a key generation device according to an embodiment of this specification.
[0060] Figure 8 The diagram shown is a schematic representation of a key generation device according to another embodiment of this specification.
[0061] Figure 9 This is a schematic diagram of the structure of a computer device according to an embodiment of this specification.
[0062] [Explanation of Labels in the Attached Image]
[0063] 101. First Terminal;
[0064] 102. Second terminal;
[0065] 110. Electronic devices;
[0066] 120. Database;
[0067] 130. The trained numerical prediction model;
[0068] 140. User terminal;
[0069] 150. Predict the second encoded data of the other end;
[0070] 160. The set of channel measurements at this end;
[0071] 401. Set of channel measurement values;
[0072] 410. The prediction model after training;
[0073] 402. Predict the set of channel measurements at the other end;
[0074] 420. The trained conversion model;
[0075] 403. Predict the second encoded data of the peer;
[0076] 511. Predict the second encoded data of the second terminal;
[0077] 501. Encoder;
[0078] 512, First High-Dimensional Data;
[0079] 531. The first encoder after training;
[0080] 513. First low-dimensional data;
[0081] 514. Key information;
[0082] 521. Second encoded data of the second terminal;
[0083] 501. Encoder;
[0084] 522. Second-highest dimension data;
[0085] 532. The second encoder after training;
[0086] 523. Second low-dimensional data;
[0087] 524. Mismatch information;
[0088] 533. The trained decoder;
[0089] 525. Mismatched bit information;
[0090] 526. Key information;
[0091] 611. The set of channel measurement values of the first terminal;
[0092] 601. The trained numerical prediction model;
[0093] 612. Predict the second encoded data of the second terminal;
[0094] 613. First high-dimensional data;
[0095] 614. First low-dimensional data;
[0096] 615. Key information;
[0097] 621. The set of channel measurement values of the second terminal;
[0098] 602. Transformation Model;
[0099] 622. Second encoded data of the second terminal;
[0100] 623. Second low-dimensional data;
[0101] 624. Second-highest dimension data;
[0102] 625. Mismatched bit information;
[0103] 626. Key information;
[0104] 710. First processing unit;
[0105] 720. Second processing unit;
[0106] 730. Transmitting Unit;
[0107] 740. First generation unit;
[0108] 810. Third processing unit;
[0109] 820. Fourth processing unit;
[0110] 830. Receiving unit;
[0111] 840. Second generation unit;
[0112] 902. Computer equipment;
[0113] 904. Processing equipment;
[0114] 906. Storage resources;
[0115] 908. Drive mechanism;
[0116] 910. Input / Output Module;
[0117] 912. Input devices;
[0118] 914. Output devices;
[0119] 916. Presentation equipment;
[0120] 918. Graphical User Interface;
[0121] 920. Network interface;
[0122] 922. Communication link;
[0123] 924. Communication bus. Detailed Implementation
[0124] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0125] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0126] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0127] Figure 1AThe diagram illustrates an implementation system for a key generation method according to an embodiment of this specification. The system may include a first terminal 101 and a second terminal 102. The first terminal 101 and the second terminal 102 communicate via a network, which may include a Local Area Network (LAN), a Wide Area Network (WAN), the Internet, or a combination thereof, and is connected to a website, user equipment (e.g., a computing device), and a backend system. The first terminal 101 and the second terminal 102 may, for example, be two communicating entities in an Internet of Things (IoT) communication system. The first terminal 101 and the second terminal 102 each determine corresponding key information based on a set of channel measurement values for their respective communication channels, for use in encryption and decryption during communication with the other end. For example, the first terminal 101 determines corresponding key information based on a set of channel measurement values for its own communication channel, uses this key information to encrypt the information to be sent, obtains encrypted information, and sends the encrypted information to the second terminal 102. Similarly, the second terminal 102 determines the corresponding key information based on the set of channel measurement values of its communication channel, and uses this key information to decrypt the received encrypted information to obtain decrypted information, thus realizing encrypted communication with the first terminal 101. Optionally, the first terminal 101 and the second terminal 102 each include a server. This server can be a node in a cloud computing system (not shown in the figure), or each server can be a separate cloud computing system, including multiple computers interconnected by a network and operating as a distributed processing system. This server determines the corresponding key information based on the set of channel measurement values of the communication channel.
[0128] In an optional embodiment, the first terminal 101 and the second terminal 102 can be any two communicating objects in the vehicle-to-everything (V2X) communication system.
[0129] Figure 1A The first terminal 101 and the second terminal 102 determine the encoding information based on the set of channel measurement values of their respective communication channels, and then determine the corresponding key information based on the encoding information. The specific determination of the encoding information based on the set of channel measurement values of their respective communication channels is as follows: Figure 1B As shown. Figure 1B The diagram shown is a schematic representation of an implementation system for a method for determining encoded data according to an embodiment of this specification, which may include an electronic device 110 and a database 120.
[0130] Electronic device 110 can access database 120 via a network, for example. Database 120 may store multiple sets of first sample channel measurements and sample second encoded data corresponding to each set of first sample channel measurements. This sample second encoded data serves as a tag for the set of first sample channel measurements.
[0131] In one embodiment, the electronic device 110 can read a set of first sample channel measurements with tags from a database 120, and use the read set of first sample channel measurements as samples to train a preset numerical prediction model. The preset numerical prediction model is used to process multiple sets of first sample channel measurements to obtain sample first encoded data corresponding to each set of first sample channel measurements. The electronic device 110 can compare the obtained sample first encoded data with sample second encoded data indicated by multiple tags, and train the preset numerical prediction model based on the comparison results.
[0132] In one embodiment, the application scenario may further include a trained numerical prediction model 130, a user terminal 140, second encoded data 150 from the prediction peer, and a set of channel measurements 160 from the local end. The user terminal 140 is communicatively connected to the electronic device 110 via a network; the user terminal may be, for example, a... Figure 1A The user terminal 140 can be either a first terminal or a second terminal. For example, the user terminal 140 can obtain a trained numerical prediction model 130 from the electronic device 110, and process its own channel measurement set 160 based on the obtained trained numerical prediction model 130 to obtain the predicted second coding data 150 corresponding to the channel measurement set 160 of the user terminal. For example, if the user terminal 140 is a first terminal, the user terminal processes the channel measurement set of the first terminal based on the trained numerical prediction model 130 to obtain the predicted second coding data of the second terminal corresponding to the channel measurement set of the first terminal.
[0133] It should be noted that the training method for the numerical prediction model provided in this specification can generally be executed by the electronic device 110, or by a server or other device that is communicatively connected to the electronic device 110. The method for determining the encoded data provided in this specification can be executed by the user terminal 140 or the electronic device 110. Correspondingly, the training device for the numerical prediction model provided in this specification can generally be located in the electronic device 110, or in a server that is communicatively connected to the electronic device 110. The device for determining the encoded data provided in this specification can be located in the user terminal 140 or the electronic device 110.
[0134] It should be understood that Figure 1B The number and types of electronic devices, databases, local channel measurement sets, and user terminals shown are merely illustrative. Depending on implementation requirements, any number and type of electronic devices, databases, local channel measurement sets, and user terminals can be included.
[0135] like Figure 2The diagram shows a flowchart of a key generation method according to an embodiment of this specification. The key generation process is described in this figure, but based on conventional or non-creative labor, it may include more or fewer operational steps. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only possible execution order. In actual system or device products, the method can be executed sequentially or in parallel according to the embodiment or the accompanying drawings. Specifically, as shown... Figure 2 As shown, the method is executed by the first terminal, and the method may include:
[0136] S210, Process the set of channel measurement values of the first terminal and the communication channel to obtain encoded data;
[0137] S220, process the encoded data to obtain the first low-dimensional data and the first high-dimensional data;
[0138] S230, send the first low-dimensional data;
[0139] S240, Generate key information based on the first high-dimensional data.
[0140] By processing the encoded data to obtain first low-dimensional data and first high-dimensional data, sending the first low-dimensional data to the second terminal, and determining key information based on the first high-dimensional data, consistent key information is generated between the two ends in long-distance communication, and communication security is guaranteed during the key information generation process.
[0141] According to embodiments of this specification, the set of channel measurements for the communication channel of the first terminal consists of measurement values obtained by measuring the transmission signal over a preset time period using an acquisition instrument, which characterize the communication features of the transmission signal. These channel measurements may, for example, be RSSI (Signal Strength Index).
[0142] The acquired channel measurement set is encoded to obtain encoded data. This encoding process can be any method that converts multiple data points into binary codes. Alternatively, the acquired channel measurement set can be preprocessed to obtain target channel measurement values. These target channel measurement values are then transformed to obtain encoded data. This preprocessing can be, for example, mean filtering of the channel measurement set or calculating the average value of the channel measurement set. The transformation process can be any method that converts one or more data points into binary codes.
[0143] After determining the encoded data, a data transformation model is used to process the encoded data to obtain the first high-dimensional data. A dimensionality reduction model is then used to reduce the dimensionality of this first high-dimensional data to obtain the first low-dimensional data. The data transformation model can be, for example, a random number function. It can also be, for example, an autoencoder, such as a Bloom filter. The dimensionality reduction model can be any model that transforms high-dimensional data into low-dimensional data, such as principal component analysis and neural network models.
[0144] After determining the first high-dimensional data and the first low-dimensional data, the first low-dimensional data is sent to the second terminal, and key information is determined based on the first high-dimensional data. Specifically, determining the key information based on the first high-dimensional data can be achieved by using the first high-dimensional data as the key information. Alternatively, determining the key information based on the first high-dimensional data can involve normalizing the first high-dimensional data to obtain the key information. This normalization process can be any process that updates the first high-dimensional data, for example, updating the number at the target position in the first high-dimensional data.
[0145] According to another embodiment of this specification, processing the set of channel measurements of the communication channel of the first terminal to obtain encoded data includes: processing the set of channel measurements of the communication channel of the first terminal using a transformation model to obtain first encoded data of the first terminal; or: processing the set of channel measurements of the communication channel of the first terminal using a trained numerical prediction model to obtain second encoded data for predicting the second terminal.
[0146] There are two methods to determine the encoded data based on the acquired channel measurements. One method involves processing the set of channel measurements for the communication channel of the first terminal using a transformation model. For example, this could involve processing each data point in the set of channel measurements using the transformation model. Another method involves preprocessing the acquired channel measurement set to obtain the target channel measurement value. Then, the target channel measurement value is transformed using the transformation model. This transformation model can be any model that can convert one or more data points into binary codes, such as a multi-bit quantizer. The preprocessing could be, for example, mean filtering of the set of channel measurements or calculating the average value of the set of channel measurements. The transformation process can be any method that converts one or more data points into binary codes. It is important to note that both communicating parties (the first terminal and the second terminal) can use this method to determine the encoded data.
[0147] Another approach involves processing the channel measurement set of the first terminal's communication channel using a trained numerical prediction model to obtain the second encoded data for the second terminal. The trained data prediction model can be, for example, any trained neural network model capable of converting one or more data sets into binary codes. This trained numerical prediction model is obtained by training a preset numerical prediction model using a sample set, such as a Bidirectional Long Short-Term Memory (BiLSTM) model. It's important to note that only one end of the communication can execute this method to determine the encoded data. For instance, if the first terminal uses the trained numerical prediction model to process the channel measurement set of its communication channel to obtain the second encoded data for the second terminal, the second terminal may not need to use the trained numerical prediction model to generate the corresponding encoded data; instead, it can use a conversion model to determine the corresponding encoded data.
[0148] According to another embodiment of this specification, the training process of the trained numerical prediction model includes: processing the first sample channel measurement set using a preset numerical prediction model to obtain sample first coded data; processing the sample second coded data and sample first coded data according to a loss function to obtain a loss function value; and training the preset numerical prediction model according to the loss function value, wherein the sample second coded data is coded data obtained by the second terminal using a transformation model to process the second sample channel measurement set of the communication channel of the second terminal.
[0149] The first sample set of channel measurements could be, for example, a set of channel measurements collected at the first terminal during a predetermined target time period. The second sample coded data is coded data obtained by transforming the set of channel measurements collected at the second terminal during the predetermined target time period using a transformation model. This second sample coded data is used as the label for the first sample set of channel measurements.
[0150] The training process for a pre-defined numerical prediction model can be as follows: Taking a sample set consisting of a first set of sample channel measurements as an example, the first set of sample channel measurements is input into the pre-defined numerical prediction model to obtain sample first coded data. A loss function is then used to process the sample first coded data and its corresponding labels to train the pre-defined numerical prediction model. If the sample set consists of multiple sets of first sample channel measurements, these multiple sets of first sample channel measurements are input into the pre-defined numerical prediction model to obtain multiple sets of sample first coded data. A loss function is then used to process these multiple sets of sample first coded data and their corresponding multiple labels to train the pre-defined numerical prediction model.
[0151] The training process for a pre-defined numerical prediction model can also be as follows: Taking a sample set that includes a first set of sample channel measurements as an example, the first set of sample channel measurements is processed to obtain target first sample channel measurements. These target first sample channel measurements are then input into the pre-defined numerical prediction model to obtain sample first encoded data. A loss function is then used to process the sample first encoded data and its corresponding label to train the pre-defined numerical prediction model. Similarly, if the sample set includes multiple sets of first sample channel measurements, the pre-defined numerical prediction model can be trained using these sample sets.
[0152] Figure 3 The diagram shows a flowchart of a key generation method according to another embodiment of this specification. The key generation process is described in this figure, but may include more or fewer steps based on conventional or non-inventive labor. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only possible execution order. In actual system or device products, the method can be executed sequentially or in parallel according to the embodiment or the accompanying drawings. Specifically, as shown... Figure 3 As shown, this method is executed by a second terminal, and the method may include:
[0153] S310, Process the set of channel measurement values of the communication channel of the second terminal to obtain converted and encoded data;
[0154] S320 performs a first process on the converted and encoded data to obtain second low-dimensional data and second high-dimensional data;
[0155] S330 receives the first low-dimensional data;
[0156] S340, Generate key information based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data.
[0157] By processing the transformed encoded data to obtain second low-dimensional data and second high-dimensional data, the system receives first low-dimensional data generated by the first terminal and generates key information based on the first low-dimensional data, second low-dimensional data, and second high-dimensional data. This achieves consistent key information generation between the two ends in long-distance communication and ensures communication security during the key information generation process.
[0158] According to another embodiment of this specification, the set of channel measurements for the communication channel of the second terminal consists of measurement values that characterize the communication characteristics of the transmission signal obtained by measuring the transmission signal over a preset time period using an acquisition instrument. These channel measurements may, for example, be RSSI (Signal Strength Index).
[0159] The acquired channel measurement set is encoded to obtain converted coded data. This encoding process can be any method that converts multiple data points into binary codes. Alternatively, the acquired channel measurement set can be preprocessed to obtain target channel measurement values. These target channel measurement values are then converted to obtain converted coded data. This preprocessing can be, for example, mean filtering of the channel measurement set or calculating the average value of the channel measurement set. The conversion process can be any method that converts one or more data points into binary codes.
[0160] The first processing includes a first sub-process and a dimensionality reduction model. After determining the transformed and encoded data, the first sub-process is performed on the transformed and encoded data using a data transformation model to obtain second high-dimensional data. The dimensionality reduction model is then used to reduce the dimensionality of this second high-dimensional data to obtain second low-dimensional data. The data transformation model can be, for example, a random number function. It can also be, for example, an autoencoder, such as a Bloom filter. The dimensionality reduction model can be, for example, any model that transforms high-dimensional data into low-dimensional data, such as principal component analysis and neural network models.
[0161] The system receives first low-dimensional data sent by the first terminal, determines different numbers based on the first low-dimensional data and the second low-dimensional data, and updates the second high-dimensional data based on the different numbers to obtain key information, thereby ensuring that the key information obtained by the first terminal is consistent with the key information obtained by the second terminal.
[0162] According to another embodiment of this specification, processing the set of channel measurement values of the communication channel of the second terminal to obtain transformed coded data can be, for example, by using a transformation model to process the set of channel measurement values of the communication channel of the second terminal to obtain first coded data of the second terminal; or by using a trained numerical prediction model to process the set of channel measurement values of the communication channel of the second terminal to obtain second coded data for predicting the first terminal.
[0163] According to another embodiment of this specification, generating key information based on first low-dimensional data and second high-dimensional data includes: performing an XOR operation on the second low-dimensional data and the first low-dimensional data to obtain mismatch information; performing a second processing on the mismatch information to obtain mismatch bit information; and updating the second high-dimensional data based on the mismatch bit information to obtain key information.
[0164] The XOR operation is a logical operation. If the two numbers involved in the operation are different, the XOR result is 1; if the two numbers involved in the operation are the same, the XOR result is 0.
[0165] XOR each numeric value in the second low-dimensional data with the numeric value of the same position in the first low-dimensional data to obtain mismatch information with the same dimension as the second low-dimensional data.
[0166] The second processing may include, for example, a dimensionality-upgrading model and a deterministic model, such as a neural network model. The deterministic mismatch information is processed to obtain mismatch bit information with the same dimension as the second high-dimensional data. This mismatch bit information indicates the position of the different numerical values in the second high-dimensional data compared to the first high-dimensional data. For example, if the first high-dimensional data is 110101 and the second high-dimensional data is 111001, then the mismatch bit information is 001100.
[0167] The numeric values corresponding to the bits that are 1 in the mismatched bit information in the second high-dimensional data are updated to obtain key information, so as to obtain key information that is the same as the key information generated by the first terminal.
[0168] Figure 4 The diagram shown is a flowchart of a method for generating second encoded data for predicting the peer, according to an embodiment of this specification.
[0169] According to another embodiment of this specification, the trained numerical prediction model includes a trained prediction model and a trained transformation model. Processing the set of channel measurements of the communication channel of the first terminal using the trained numerical prediction model to obtain the second coded data for the predicted second terminal includes: processing the set of channel measurements using the trained prediction model to obtain the set of channel measurements for the predicted second terminal; and processing the set of channel measurements for the predicted second terminal using the trained transformation model to obtain the second coded data for the predicted second terminal.
[0170] The trained prediction model is a model that predicts a set of channel measurements at one end of a communication system based on a set of channel measurements at the other end. This prediction model can be, for example, a neural network model. The set of channel measurements can be, for example, the set of all channel measurements over a preset time period. Alternatively, the set of channel measurements can be, for example, the average value of the channel measurements over the preset time period. The trained conversion model is a model that predicts the coded data at the other end based on the predicted set of channel measurements at the other end. This model can also be, for example, a neural network model. For example, for the set of channel measurements at the first terminal, the trained prediction model processes this set to obtain the predicted set of channel measurements for the second terminal; then, this predicted set of channel measurements for the second terminal is input into the trained conversion model to obtain the predicted second coded data for the second terminal.
[0171] According to another embodiment of this specification, the preset numerical prediction model includes a preset prediction model and a preset transformation model. Processing the first sample channel measurement set using the preset numerical prediction model to obtain the first sample coded data includes: processing the first sample channel measurement set using the preset prediction model to obtain a sample predicted channel measurement set; and processing the sample predicted channel measurement set using the preset transformation model to obtain the first sample coded data.
[0172] The first sample set of channel measurements could be, for example, a set of channel measurements collected at the first terminal during a predetermined time period. Alternatively, the first sample set of channel measurements could also be the average value of the channel measurements included in that set.
[0173] A preset prediction model can be, for example, a model composed of random numbers as parameters, used to predict a set of channel measurements at one end of a communication system based on a set of channel measurements at the other end. This preset prediction model can be, for example, an initial neural network model. Similarly, a preset transformation model can be, for example, a model composed of random numbers as parameters, used to predict coded data at the other end based on a set of predicted channel measurements at the other end. This model can be, for example, an initial neural network model.
[0174] According to another embodiment of this specification, processing the sample second coded data and sample first coded data according to a loss function to obtain a loss function value includes: processing the channel measurement value label and the sample predicted channel measurement value set according to a first loss function to obtain a first loss function value; processing the sample second coded data and the first sample coded data according to a second loss function to obtain a second loss function value; and determining a loss function value based on the first loss function value and the second loss function value, wherein the channel measurement value label is the second sample channel measurement value set.
[0175] The first sample channel measurement set can be, for example, a set of channel measurement values collected at the first terminal during a target preset time period. Alternatively, the first sample channel measurement set can also be the average value of the channel measurement values included in this set. The channel measurement value label is the set of channel measurement values collected at the second terminal during the target preset time period. Again, the channel measurement value label can be, for example, the average value of the channel measurement values included in this set. The second sample encoded data is encoded data obtained by transforming the set of channel measurement values collected at the second terminal using a transformation model.
[0176] The first loss function can be, for example, the mean squared error function, and the second loss function can be, for example, the binary cross-entropy function.
[0177] The loss function value is determined based on the first loss function value and the second loss function value. Specifically, the first weight data and the second weight data are obtained, and the first loss function value and the second loss function value are weighted according to the first weight data and the second weight data to obtain the loss function value. The sum of the first weight data and the second weight data is 1. Specifically, the first weight value is 0.9 and the second weight value is 0.1.
[0178] like Figure 4 As shown, the channel measurement set 401 is processed using the trained prediction model 410 to obtain the predicted channel measurement set 402 for the peer. This predicted channel measurement set 402 is then input into the trained conversion model 420 to obtain the predicted second coded data 403 for the peer. Taking the first terminal as an example, the channel measurement set of the first terminal is predicted using the trained prediction model 410 to obtain the predicted channel measurement set for the second terminal. This predicted channel measurement set for the second terminal is then input into the trained conversion model 420 to obtain the predicted second coded data for the second terminal.
[0179] Figure 5 The diagram shown is a flowchart of a key generation method according to another embodiment of this specification.
[0180] According to another embodiment of this specification, the trained model for determining mismatched bit information includes a trained first encoder, a trained second encoder, and a trained decoder. The first processing of the transformed encoded data to obtain second low-dimensional data and second high-dimensional data specifically involves processing the transformed encoded data using an autoencoder to obtain second high-dimensional data; and processing the second high-dimensional data using the trained second encoder to obtain second low-dimensional data. The autoencoder is a Bloom filter.
[0181] The trained model for determining mismatched bit information could be, for example, a model that determines the position of inconsistent data values between a first high-dimensional data generated by the first terminal and a second high-dimensional data generated by the second terminal, based on a first low-dimensional data generated by the first terminal and a second low-dimensional data generated by the second terminal. The trained second encoder is a model that performs dimensionality reduction processing on the second high-dimensional data generated by the second terminal to obtain the second low-dimensional data.
[0182] According to another embodiment of this specification, processing the encoded data to obtain first low-dimensional data and first high-dimensional data specifically involves processing the encoded data using an autoencoder to obtain first high-dimensional data; and processing the first high-dimensional data using a trained first encoder to obtain first low-dimensional data. The autoencoder is a Bloom filter.
[0183] The first encoder after training performs dimensionality reduction processing on the first high-dimensional data generated by the first terminal to obtain a model of the first low-dimensional data.
[0184] The first and second encoders after training each consist of a fully connected layer with 32 units. The decoder after training consists of three fully connected layers, which are hidden layers.
[0185] According to another embodiment of this specification, the mismatch information is further processed to obtain mismatch bit information by inputting the mismatch bit information into the trained decoder.
[0186] The trained decoder performs dimensionality upscaling based on the determined low-dimensional mismatch information to obtain a model of the position of inconsistent data values between the first high-dimensional data generated by the first terminal and the second high-dimensional data generated by the second terminal.
[0187] The trained model for determining mismatch bit information includes a trained first encoder, a trained second encoder, and a trained decoder. The training method for this model is as follows: Taking a training sample set containing one sample with first high-dimensional data and one sample with second high-dimensional data as an example, the pre-defined model for determining mismatch bit information processes the first and second high-dimensional data of the sample separately to obtain sample mismatch bit information; based on the first and second high-dimensional data, label data is determined; the sample mismatch bit information and label data are processed using a target loss function to obtain a target loss function value; and the pre-defined model for determining mismatch bit information is trained using this target loss function value. Similarly, when the training sample set contains multiple samples with first high-dimensional data and multiple samples with second high-dimensional data, the same method is used to train the pre-defined model for determining mismatch bit information. The label data indicates the mismatch positions in the first and second high-dimensional data of the samples.
[0188] The sample's first high-dimensional data and second high-dimensional data are processed separately using a preset model to determine mismatch bit information. Specifically, the sample's first high-dimensional data is input into a preset first encoder to obtain the sample's first low-dimensional data; the sample's second high-dimensional data is input into a preset second encoder to obtain the sample's second low-dimensional data; the sample's first low-dimensional data and the sample's second low-dimensional data are XORed to obtain the sample mismatch information; and the sample mismatch information is input into a preset decoder to obtain the sample mismatch bit information.
[0189] The target loss function is shown in formula (1) below.
[0190]
[0191] Where Δx represents the sample mismatch bit information, K′ Bob The first high-dimensional data representing the sample, K′ Alice Characterizing the second high-dimensional data of the sample, The label data is represented by f1, f2, and g, which respectively represent the first high-dimensional data, the second high-dimensional data, and the mismatch information of the samples included in the training sample set.
[0192] Because the trained model for determining mismatch bit information includes a trained first encoder, a trained second encoder, and a trained decoder, inverse operations on either the generated first or second low-dimensional data cannot yield the first or second high-dimensional data. Therefore, even if intercepted by an attacker during the transmission of the first low-dimensional data, the attacker cannot obtain the corresponding key information from the intercepted data. This ensures communication security during key information generation. Furthermore, the use of the trained model for dimensionality reduction followed by dimensionality increase significantly reduces computational costs and improves efficiency in determining mismatch bit information. Moreover, since the decoder is based on a neural network model, noise during communication can be eliminated, thereby improving the accuracy of determining mismatch bit information.
[0193] like Figure 5 As shown, the first terminal determines the second encoded data 511 for predicting the second terminal based on its channel measurement set. This predicted second encoded data 511 is then input into the encoder 501 to obtain first high-dimensional data 512. The first high-dimensional data 512 is used as the key information 514 of the first terminal. Subsequently, the first high-dimensional data 512 is input into the trained first encoder 531 to obtain first low-dimensional data 513. The first low-dimensional data 513 is then sent to the second terminal. Alternatively, the first low-dimensional data 513 can be encrypted using preset key information to obtain encrypted information, which is then sent to the second terminal.
[0194] The second terminal determines its second encoded data 521 based on its channel measurement set. This second encoded data 521 is then input into encoder 501 to obtain second high-dimensional data 522. This second high-dimensional data 522 is then input into the trained second encoder 532 to obtain second low-dimensional data 523. Upon receiving first low-dimensional data 513 or encrypted information from the first terminal, when encrypted information is received, it is decrypted using the key information corresponding to the preset key information to obtain first low-dimensional data 513. XORing the first low-dimensional data 513 and second low-dimensional data 523 yields mismatch information 524. This mismatch information 524 is input into the trained decoder 533 to obtain mismatch bit information 525. The target bit position with a value of 1 in the mismatch bit information 525 is determined, and the value of the target bit position in the second high-dimensional data 522 is updated to obtain the second terminal's key information 526.
[0195] It should be noted that in this embodiment... Figure 5 The diagram illustrates how a first terminal processes its channel measurements using a trained prediction model to obtain predicted second-dimensional data for a second terminal, and then transmits first-dimensional data. The second terminal receives the first-dimensional data. Simultaneously, this method can also be used to process the second terminal's channel measurements to obtain its second-dimensional data, and then transmit second-dimensional data. The first terminal receives the second-dimensional data. In other words, transmitting low-dimensional data can be performed by either the first or the second terminal. The terminal receiving the low-dimensional data corrects its high-dimensional data to obtain key information consistent with the peer's.
[0196] Figure 6A The diagram shown is a flowchart of a key generation method according to another embodiment of this specification. Figure 6B The diagram shown is a flowchart of a method for determining target channel measurement values according to an embodiment of this specification.
[0197] According to another embodiment of this specification, the first terminal processes its channel measurement set 611 to obtain the target channel measurement value of the first terminal. This target channel measurement value is then input into the trained numerical prediction model 601 to obtain the second encoded data 612 for predicting the second terminal. The first terminal processes this second encoded data 612 to obtain first high-dimensional data 613 and first low-dimensional data 614. The first high-dimensional data 613 is used as the key information 615 of the first terminal, and the first low-dimensional data is sent to the second terminal.
[0198] The second terminal processes its channel measurement set 621 to obtain the target channel measurement value. This target channel measurement value is then input into the conversion model 602 to obtain the second encoded data 622. The second terminal performs a first processing on this second encoded data 622 to obtain second low-dimensional data 623 and second high-dimensional data 624. The second terminal performs a second processing on the received first low-dimensional data 614 and second low-dimensional data 623 to obtain mismatch bit information 625. Based on the mismatch bit positions indicated by the mismatch bit information 625, the second high-dimensional data 624 is updated to obtain the key information 626 of the second terminal.
[0199] Based on the set of channel measurements, the specific target channel measurement value is determined as follows: Figure 6B As shown. Gray represents the RSSI register of one of the communicating parties, and black represents the RSSI register of the other. For a preset time period, the average value of the RSSI register of one of the communicating parties (data within the dashed box) is determined, resulting in the first target data indicated by the gray-filled diamond. This first target data is used as the target channel measurement value for that party. Similarly, the target channel measurement value (black-filled diamond) for the other party is determined.
[0200] According to another embodiment of this specification, the trained numerical prediction model includes a BiLSTM layer, two fully connected layers with 32 and 64 units respectively, and an activation function (sigmoid). The BiLSTM layer includes a 32-unit fully connected layer with 128 hidden units.
[0201] Figure 7 The diagram shown is a structural schematic of a key generation device according to an embodiment of this specification. Figure 7 As shown, including,
[0202] The first processing unit 710 is used to process the set of channel measurement values of the communication channel of the first terminal to obtain encoded data.
[0203] The second processing unit 720 is used to process the encoded data to obtain first low-dimensional data and first high-dimensional data.
[0204] The transmitting unit 730 is used to transmit the first low-dimensional data.
[0205] The first generation unit 740 is used to generate key information based on the first high-dimensional data.
[0206] Since the principle of the above-mentioned device in solving the problem is similar to that of the above-mentioned method, the implementation of the above-mentioned device can refer to the implementation of the above-mentioned method, and the repeated parts will not be described again.
[0207] Figure 8The diagram shown is a structural schematic of a key generation device according to another embodiment of this specification. Figure 8 As shown, including,
[0208] The third processing unit 810 is used to process the set of channel measurement values of the communication channel of the second terminal to obtain converted and encoded data.
[0209] The fourth processing unit 820 is used to perform a first processing on the converted encoded data to obtain second low-dimensional data and second high-dimensional data.
[0210] The receiving unit 830 is used to receive the first low-dimensional data.
[0211] The second generation unit 840 is used to generate key information based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data.
[0212] The first low-dimensional data is the low-dimensional data obtained by the first terminal based on the set of channel measurement values of the first terminal's communication channel.
[0213] Since the principle of the above-mentioned device in solving the problem is similar to that of the above-mentioned method, the implementation of the above-mentioned device can refer to the implementation of the above-mentioned method, and the repeated parts will not be described again.
[0214] like Figure 9 The diagram illustrates the structure of a computer device according to an embodiment of this specification. The apparatus described in this specification can be the computer device in this embodiment, performing the methods described above. The computer device 902 may include one or more processing devices 904, such as one or more central processing units (CPUs), each of which can implement one or more hardware threads. The computer device 902 may also include any storage resource 906 for storing information of any kind, such as code, settings, data, etc. Without limitation, for example, storage resource 906 may include any type of RAM, any type of ROM, flash memory, hard disk, optical disk, etc. More generally, any storage resource can use any technology to store information. Furthermore, any storage resource can provide volatile or non-volatile retention of information. Further, any storage resource may represent a fixed or removable component of the computer device 902. In one case, when processing device 704 executes associated instructions stored in any storage resource or combination of storage resources, the computer device 702 can perform any operation of the associated instructions. The computer device 902 also includes one or more drive mechanisms 908 for interacting with any storage resource, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0215] Computer device 702 may also include an input / output module 910 (I / O) for receiving various inputs (via input device 912) and providing various outputs (via output device 914). A specific output mechanism may include a presentation device 916 and an associated graphical user interface (GUI) 918. In other embodiments, the input / output module 910 (I / O), input device 912, and output device 914 may be omitted, and the device may function solely as a computer device within a network. Computer device 902 may also include one or more network interfaces 920 for exchanging data with other devices via one or more communication links 922. One or more communication buses 924 couple the components described above together.
[0216] Communication link 922 can be implemented in any way, such as via a local area network (LAN), a wide area network (WAN) (e.g., the Internet), a point-to-point connection, or any combination thereof. Communication link 922 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0217] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0218] This specification also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method.
[0219] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0220] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0221] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0222] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0223] The above specific embodiments further illustrate the purpose, technical solutions, and beneficial effects of this specification. It should be understood that the above are merely specific embodiments of this specification and are not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. A key generation method, applied to a first terminal in an Internet of Things (IoT) communication system, the IoT communication system further comprising a second terminal, wherein the first terminal and the second terminal interact with each other, characterized in that, include: The set of channel measurement values for the communication channel of the first terminal is processed to obtain encoded data; The encoded data is processed to obtain first low-dimensional data and first high-dimensional data; The first low-dimensional data is sent so that the second terminal generates key information based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data. The second low-dimensional data and the second high-dimensional data are low-dimensional data and high-dimensional data obtained by the second terminal according to the channel measurement value set of the communication channel of the second terminal. The generation of key information based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data includes: performing an XOR operation on the second low-dimensional data and the first low-dimensional data to obtain mismatch information; performing a second processing on the mismatch information to obtain mismatch bit information; and updating the second high-dimensional data according to the mismatch bit information to obtain the key information. Based on the first high-dimensional data, key information is generated.
2. The method according to claim 1, characterized in that, The processing of the set of channel measurement values for the communication channel of the first terminal to obtain coded data includes: Using a transformation model, the set of channel measurement values of the communication channel of the first terminal is processed to obtain the first coded data of the first terminal; or; The trained numerical prediction model is used to process the set of channel measurement values of the communication channel of the first terminal to obtain the second coded data for predicting the second terminal.
3. The method according to claim 2, characterized in that, The training process of the trained numerical prediction model includes: The first sample channel measurement set is processed using a preset numerical prediction model to obtain the first sample coded data; The second encoded data of the sample and the first encoded data of the sample are processed according to the loss function to obtain the loss function value; and The preset numerical prediction model is trained based on the loss function value. The second coded data of the sample is the coded data obtained by the second terminal using a conversion model to process the second sample channel measurement value set of the communication channel of the second terminal.
4. The method according to claim 3, wherein the preset numerical prediction model comprises a preset prediction model and a preset transformation model, characterized in that, The process of processing the first sample channel measurement set using a preset numerical prediction model to obtain the first coded data of the sample includes: The first sample channel measurement value set is processed using a preset prediction model to obtain the sample predicted channel measurement value set; The sample prediction channel measurement set is processed using a preset conversion model to obtain the first coded data of the sample; and; The process of processing the second encoded data of the sample and the first encoded data of the sample according to the loss function to obtain the loss function value includes: Based on the first loss function, the channel measurement label and the sample predicted channel measurement set are processed to obtain the first loss function value; Based on the second loss function, the second encoded data of the sample and the first encoded data of the sample are processed to obtain the value of the second loss function; and Based on the first loss function value and the second loss function value, determine the loss function value. The channel measurement value label is the second sample channel measurement value set.
5. The method according to claim 2, wherein the trained numerical prediction model comprises a trained prediction model and a trained transformation model, characterized in that, The step of processing the set of channel measurement values of the communication channel of the first terminal using the trained numerical prediction model to obtain the second encoded data for predicting the second terminal includes: The trained prediction model is used to process the set of channel measurements to obtain a predicted set of channel measurements for the second terminal; and The trained conversion model is used to process the set of channel measurements for the predicted second terminal to obtain the second coded data for the predicted second terminal.
6. A key generation method, applied to a second terminal in an Internet of Things (IoT) communication system, wherein the IoT communication system further includes a first terminal, and the second terminal and the first terminal interact with each other, characterized in that, include: The set of channel measurement values for the communication channel of the second terminal is processed to obtain converted and encoded data; The converted and encoded data undergoes a first processing step to obtain second low-dimensional data and second high-dimensional data. Receive the first low-dimensional data; as well as Based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data, key information is generated. Wherein, the first low-dimensional data is the low-dimensional data obtained by the first terminal based on the set of channel measurement values of the communication channel of the first terminal; The generation of key information based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data includes: Perform an XOR operation on the second low-dimensional data and the first low-dimensional data to obtain mismatch information; The mismatch information is processed a second time to obtain mismatch bit information; and The second high-dimensional data is updated based on the mismatch bit information to obtain the key information.
7. A key generation device, applied to a first terminal in an Internet of Things (IoT) communication system, the IoT communication system further comprising a second terminal, wherein the first terminal and the second terminal interact with each other, characterized in that, include: The first processing unit is used to process the set of channel measurement values of the communication channel of the first terminal to obtain encoded data; The second processing unit is used to process the encoded data to obtain first low-dimensional data and first high-dimensional data; A sending unit is configured to send the first low-dimensional data, so that the second terminal generates key information based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data. The second low-dimensional data and the second high-dimensional data are low-dimensional data and high-dimensional data obtained by the second terminal according to the channel measurement value set of the communication channel of the second terminal. The step of generating key information based on the second low-dimensional data, the first low-dimensional data, and the second high-dimensional data includes: performing an XOR operation on the second low-dimensional data and the first low-dimensional data to obtain mismatch information; performing a second processing on the mismatch information to obtain mismatch bit information; and updating the second high-dimensional data according to the mismatch bit information to obtain the key information. The generation unit is used to generate key information based on the first high-dimensional data.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the method of any one of claims 1-6.