Key generation method and device

CN120826893APending Publication Date: 2025-10-21GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380095415.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

In the scenario of multiple zero-power devices, it is difficult for the existing technology to improve the efficiency of sharing private information between the target device and multiple zero-power devices or between multiple zero-power devices while ensuring security.

Method used

The first device sends multiple messages to multiple second devices, causing each second device to generate its own key, receive messages related to the respective keys, and then send messages used to determine the group key, using Self-combination cross-bit operation or matrix eigenvalue/singular value generation group key to achieve group key sharing.

Benefits of technology

On the basis of ensuring security, it improves the efficiency of sharing private information between multiple devices, solves the problem of low efficiency in the existing technology, and is suitable for zero-power communication systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120826893A_ABST
    Figure CN120826893A_ABST
Patent Text Reader

Abstract

The invention relates to a key generation method and device, a computer readable storage medium, a computer program product and a computer program. The method comprises: a first device sends a plurality of first messages to a plurality of second devices, different first messages in the plurality of first messages occupying different time domain ranges, and the plurality of first messages are used for the plurality of second devices to generate keys; the first device receives a plurality of second messages sent by the plurality of second devices, wherein different second messages in the plurality of second messages are related to keys of different second devices; and the first device sends a plurality of third messages to the plurality of second devices, wherein different third messages in the plurality of third messages are used for different second devices to determine the group key.
Need to check novelty before this filing date? Find Prior Art

Description

Key generation method and device Technical Field The present application relates to the field of communications, and more specifically, to a key generation method, device, computer-readable storage medium, computer program product, and computer program. Background Art With the development of communication technology, contactless automatic identification technology has emerged. This technology usually uses wireless radio frequency to perform contactless data transmission between zero-power devices and target devices. Since the communication channel between the zero-power device and the target device is an unsecured channel, in order to ensure the data transmission security between the zero-power device and the target device, a scheme is further proposed in which a key can be used between the zero-power device and the target device to encrypt the data or information transmitted between the two. In this scheme, usually a single zero-power device and the target device both use the same key (or unicast key or shared key). In the above scheme, only the data transmission security between a single zero-power device and the target device is considered. In a scenario where there are multiple zero-power devices, there may be a need to share private information between the target device and multiple zero-power devices, or between multiple zero-power devices. How to ensure the security of sharing private information between the target device and multiple zero-power devices, or between multiple zero-power devices, while improving the efficiency of sharing private information between the target device and multiple zero-power devices, or between multiple zero-power devices, becomes a problem that needs to be solved. Summary of the invention Embodiments of the present application provide a key generation method, device, computer-readable storage medium, computer program product, and computer program. The present invention provides a method for generating a key, including: A first device sends a plurality of first messages to a plurality of second devices, wherein different first messages in the plurality of first messages occupy different time domain ranges, and the plurality of first messages are used for the plurality of second devices to generate keys; The first device receives a plurality of second messages sent by the plurality of second devices, where different second messages in the plurality of second messages are related to keys of different second devices; The first device sends a plurality of third messages to the plurality of second devices, and different third messages in the plurality of third messages are used for different second devices to determine a group key. The present invention provides a method for generating a key, including: The target second device receives multiple first messages sent by the first device, where different first messages in the multiple first messages occupy different time domain ranges; The target second device sends a target second message to the first device, the target second message is related to the key of the target second device, the target second device is one of a plurality of second devices, and the key of the target second device is generated based on the plurality of first messages; The target second device receives a target third message sent by the first device, where the target third message is used by the target second device to determine a group key. The present application embodiment provides a first device, including: A first communication unit is used to send multiple first messages to multiple second devices, different first messages among the multiple first messages occupy different time domain ranges, and the multiple first messages are used to generate keys for the multiple second devices; receive multiple second messages sent by the multiple second devices, different second messages among the multiple second messages are related to the keys of different second devices; send multiple third messages to the multiple second devices, different third messages among the multiple third messages are used for different second devices to determine group keys. An embodiment of the present application provides a target second device, including: A second communication unit is used to receive multiple first messages sent by a first device, different first messages among the multiple first messages occupy different time domain ranges; send a target second message to the first device, the target second message is related to the key of the target second device, the target second device is one of the multiple second devices, and the key of the target second device is generated based on the multiple first messages; receive a target third message sent by the first device, and the target third message is used for the target second device to determine the group key. The embodiment of the present application provides a first device, comprising: a transceiver, a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory, so that the first device executes the above method. The embodiment of the present application provides a target second device, comprising: a transceiver, a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory, so that the target second device executes the above method. The embodiment of the present application provides a chip for implementing the above method. Specifically, the chip includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes the above method. The present invention provides a computer-readable storage medium for storing a computer program. The device is enabled to execute the above method. An embodiment of the present application provides a computer program product, including computer program instructions, which enable a computer to execute the above method. An embodiment of the present application provides a computer program, which, when executed on a computer, enables the computer to execute the above method. By adopting the solution provided in this embodiment, the first device enables multiple second devices to generate their own keys by sending multiple first messages, and then receives multiple second messages, each of which is related to the key of the corresponding second device. Then the first device can send multiple third messages, and different third messages are used for different second devices to determine the group key. In this way, the first device and multiple second devices can share private information based on the group key, which not only ensures security, but also improves the efficiency of sharing private information between the first device and multiple second devices and / or between multiple second devices, filling the gap in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. FIG2 is a schematic diagram of a zero-power communication system based on backscattering. FIG3 is a schematic flowchart of a key generation method according to an embodiment of the present application. FIG4 is a schematic flowchart of a key generation method according to another embodiment of the present application. FIG5 is an example diagram of performing a self-combining cross-bit operation on a key of a target second device according to an embodiment of the present application. FIG6 is a schematic diagram of the correspondence between candidate quantization reference values ​​and their corresponding index values ​​and quantization values ​​according to an embodiment of the present application. FIG. 7 is an exemplary flowchart of a processing flow of a key generation method according to an embodiment of the present application. FIG8 is a schematic diagram of a processing scenario of a key generation method according to an embodiment of the present application. FIG. 9 is a schematic diagram of a processing flow of updating a group key in a key generation method according to an embodiment of the present application. FIG. 10 is a schematic diagram of a processing flow of updating a group key when a new tag is added in a key generation method according to an embodiment of the present application. 11 to 12 are two example diagrams of simulation experiment results based on the key generation method provided in the embodiments of the present application. FIG13 is a comparison example diagram of the key bit error rate of the quantization scheme adopted by the key generation method provided in the embodiment of the present application and other quantization schemes. FIG. 14 is a schematic block diagram of a first device according to an embodiment of the present application. FIG. 15 is a schematic block diagram of a target second device according to an embodiment of the present application. FIG16 is a schematic block diagram of a communication device according to an embodiment of the present application. FIG. 17 is a schematic block diagram of a chip according to an embodiment of the present application. FIG. 18 is a schematic block diagram of a communication system according to an embodiment of the present application. DETAILED DESCRIPTION The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: GSM, CDMA, WCDMA, GPRS, LTE), LTE-A, NR), NR evolution, WLAN, WiFi, or other communication systems. The embodiments of the present application describe various embodiments in combination with network devices and terminals. The terminal may be mobile or fixed, and the terminal may also be referred to as a mobile station, a user unit, etc. The terminal may be a site in a WLAN, and may be a smart terminal, a wireless modem, a laptop computer, a tablet computer, or other terminals. In the embodiments of the present application, the terminal may be a VR terminal / AR terminal, an industrial control terminal, an unmanned driving terminal, a telemedicine terminal, a smart grid terminal, a transportation safety terminal, a smart city terminal, or a wireless terminal for a smart home, etc. As an example and not a limitation, in the embodiments of the present application, the terminal may also be a wearable device. In the embodiment of the present application, the network device may be a device for communicating with a mobile device, and the network device may be an access point in a WLAN, a base station in a GSM, CDMA or WCDMA, or an evolved base station in an LTE, or a relay station, or a vehicle-mounted device, a wearable device, and a network device (gNB) in an NR network, or a network device in a future evolved PLMN network, or a network device in an NTN network, etc. As an example and not a limitation, in the embodiment of the present application, the network device may have a mobile feature, for example, the network device may be a mobile device. FIG1 exemplarily shows a communication system 100. The communication system includes a network device 110 and two terminals 120. In a possible implementation, the communication system 100 may include multiple network devices 110, and each network device 110 may include other number of terminals 120 within its coverage area, which is not limited in the embodiment of the present application. In a possible implementation, the communication system 100 may also include a mobility management entity, an access and mobility management function, and other network entities, which are not limited in the embodiment of the present application. Among them, the network device may include an access network device and a core network device. That is, the wireless communication system also includes multiple core networks for communicating with the access network device. The access network device may be a base station of an LTE, LTE-A, or NR system. Taking the communication system shown in FIG1 as an example, the communication device may include a network device and a terminal having a communication function, and the communication device may also include other devices in the communication system, such as a network controller, a mobile management entity, and other network entities, which are not limited in the embodiment of the present application. To facilitate understanding of the embodiments of the present application, the basic processes and basic concepts involved in the embodiments of the present application are briefly described below. It should be understood that the basic processes and basic concepts introduced below do not limit the embodiments of the present application. Zero-power communication network is a wireless communication technology suitable for short distance and low rate. The basic architecture of zero-power system is shown in Figure 2, which includes Reader and Tag; Tag can have functions such as energy harvesting, backscatter communication, and low-power computing. Tag is a kind of zero-power device. It should be understood that in actual scenarios, zero-power devices can also be ordinary devices (device), which is not limited here. The outstanding technical advantage of zero-power communication is battery-free communication. In a zero-power communication system based on backscattering, the backscatter transmitter of the zero-power device modulates and reflects the received RF (Radio Frequency) signal to transmit data, rather than generating RF signals itself. Based on the energy source and usage of zero-power devices, zero-power devices can be divided into the following types: 1) Passive zero-power devices. This type of terminal does not need to be equipped with a battery. Instead, the antenna generates an induced current through electromagnetic induction, and the induced current drives the low-power chip circuit of the zero-power device; 2) Semi-passive zero-power devices. This type of terminal does not install a conventional battery itself, but can use an RF energy collection module to collect radio wave energy, and store the collected energy in an energy storage unit (such as a capacitor). After the energy storage unit obtains energy, it can drive the low-power chip circuit of the semi-passive zero-power device; 3) Active zero-power devices. This type of terminal can have a built-in battery to drive the low-power chip circuit of the active zero-power device to achieve demodulation of the forward link signal and modulation of the backward link signal. It should be understood that the terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated with each other are in an "or" relationship. It should be understood that the "indication" mentioned in the embodiments of the present application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B. In the description of the embodiments of the present application, the term "correspondence" can mean that there is a direct or indirect correspondence relationship between the two, or it can mean that there is an association relationship between the two, or it can mean that there is an indication and being indicated, configuration and being configured, etc. To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application. Fig. 3 is a schematic flow chart of a key generation method according to an embodiment of the present application. The method includes at least part of the following contents. S310: A first device sends multiple first messages to multiple second devices, where different first messages in the multiple first messages occupy different time domain ranges, and the multiple first messages are used for the multiple second devices to generate keys; S320: The first device receives multiple second messages sent by the multiple second devices, where different second messages in the multiple second messages are related to keys of different second devices; S330: The first device sends multiple third messages to the multiple second devices, where different third messages in the multiple third messages are used for different second devices to determine a group key. Fig. 4 is a schematic flow chart of a key generation method according to another embodiment of the present application. The method includes at least part of the following contents. S410. The target second device receives multiple first messages sent by the first device, where different first messages in the multiple first messages occupy different time domain ranges; S420: The target second device sends a target second message to the first device, where the target second message is related to a key of the target second device, the target second device is one of a plurality of second devices, and the key of the target second device is generated based on the plurality of first messages; S430: The target second device receives a target third message sent by the first device, where the target third message is used by the target second device to determine a group key. Here, the first device may be a first terminal or a first network device. The aforementioned multiple second devices may form a device group. The second device may be a zero-power device. The aforementioned target second device is any one of the multiple second devices, so the target second device is also a zero-power device. The aforementioned group key is the same group key used by each second device in the plurality of second devices. The number of the aforementioned multiple second devices is the same as the number of the aforementioned multiple second messages, and the multiple second messages correspond one-to-one to the multiple second devices; the number of the aforementioned multiple third messages is also the same as the number of the multiple second devices, and the multiple third messages correspond one-to-one to the multiple second devices. In some possible implementations, before the first device sends multiple third messages to the multiple second devices, the method also includes: the first device determines a verification key for each of the multiple second devices based on the multiple second messages; when it is determined that the verification key of each second device is consistent with the key, the first device generates the group key based on the verification key of each second device. The verification key of each second device and the key of each second device are both in binary format; and the group key is also in binary format. In a possible example, the first device generates the group key based on the verification key of each second device, including: the first device obtains multiple keys to be calculated based on the verification key of each second device; the first device performs XOR calculation on the multiple keys to be calculated to generate the group key. The number of the multiple keys to be calculated is the same as the number of the multiple second devices, and the multiple keys to be calculated correspond to the multiple second devices one by one. The lengths of the verification keys of different second devices in the multiple second devices are the same, and the length of the verification key of any second device is the same as the length of the group key. Taking any one of the multiple second devices as the target second device as an example, the first device obtains multiple keys to be calculated based on the verification key of each second device, including: the first device adjusts at least some bits in the verification key of the target second device based on a preset algorithm to obtain the target key to be calculated, the target second device is one of the multiple second devices, and the target key to be calculated is one of the multiple keys to be calculated. Optionally, the preset algorithm may be a self-combining cross-bit operation. Accordingly, the first device adjusts at least some of the bits in the verification key of the target second device based on the preset algorithm to obtain the target key to be calculated, which may include: the first device adjusts the position of at least some of the bits in the verification key of the target second device based on the self-combining cross-bit operation to obtain the target key to be calculated. The self-combining cross-bit operation is an operation method of cross-shifting high bits and low bits. Specifically, the first device adjusts the position of at least part of the bits in the verification key of the target second device based on the self-combining cross-bit operation to obtain the target key to be calculated, which can be: the first device determines one or more high-order bits to be adjusted and one or more low-order bits to be adjusted in the verification key of the target second device based on the self-combining cross-bit operation, and determines the first target position of each high-order bit to be adjusted in the one or more high-order bits to be adjusted, and the second target position of each low-order bit to be adjusted in the one or more low-order bits to be adjusted; the first device adjusts the one or more high-order bits to be adjusted from the original position to the first target position, and adjusts the one or more low-order bits to be adjusted from the original position to the second target position, to obtain the target key to be calculated. Among them, different high-order bits to be adjusted in the one or more high-order bits to be adjusted have different first target positions; and different low-order bits to be adjusted in the one or more low-order bits to be adjusted have different second target positions. It should be understood that the sum of the number of the one or more high-order bits to be adjusted and the number of the one or more low-order bits to be adjusted may be less than or equal to the verification key length of the target second device (i.e., the total number of bits of the verification key of the target second device); that is, the positions of all bits of the verification key of the target second device are adjusted; or, there may be some bits in the verification key of the target second device that do not need to be adjusted in position, for example, the first bit (i.e., the lowest bit) and the last bit (i.e., the highest bit) of the verification key of the target second device may not need to be adjusted in position. For example, the verification key of the target second device can be expressed as: in, A verification key for representing a target second device, the The subscript R indicates the first device and T nrepresents the target second device, n is an integer greater than or equal to 1 and less than or equal to N, N is the number of the plurality of second devices, and N is an integer greater than or equal to 2; L is the verification key length of the target second device (i.e., the total number of bits of the key of the target second device), and L may be an even number; k i ∈{0,1}, i is an integer greater than or equal to 1 and less than or equal to L, that is, any bit in the verification key of the target second device (k i ) is 0 or 1. Accordingly, the first device adjusts the positions of at least some bits in the verification key of the target second device based on the self-combination cross-bit operation to obtain the target key to be calculated, which can be expressed by the following formula: in, Indicates the target key to be calculated; Indicates that a self-combining cross-bit operation is performed on the verification key of the target second device; "k 1 k L / 2+1 k 2 k L / 2+2 …k L / 2 k L " indicates the specific composition form of the target key to be calculated after adjusting the position of at least part of the bits in the verification key of the target second device. An exemplary description is given in conjunction with FIG5: Assuming that the verification key length of the target second device is L=8, the verification key of the target second device After the self-combination cross-bit operation, we can get The target key to be calculated is "00111001". Since the method of processing the verification key of each second device in the multiple second devices to obtain multiple keys to be calculated is the same as the method of processing the verification key of the target second device to obtain the target key to be calculated, they are not described one by one. In this example, the first device performs XOR calculation on the multiple keys to be calculated to generate the group key, which can be expressed by the following formula: Sac() represents the self-combination crossover operation. Respectively represent the key of each second device in the multiple second devices, N represents the number of the multiple second devices, and N can be an integer greater than or equal to 2. Optionally, the first device adjusts at least some bits in the verification key of the target second device based on a preset algorithm to obtain the target key to be calculated, which may include: the first device adjusts the value of at least some bits in the verification key of the target second device based on a preset algorithm to obtain the target key to be calculated. Among them, the preset algorithm can be set according to actual conditions. For example, the preset algorithm can be an XOR calculation based on a preset sequence. The preset sequence can be configured according to actual conditions. The length of the preset sequence is the same as the verification key length of any second device among the multiple second devices. Specifically, the first device adjusts the value of at least some bits in the verification key of the target second device based on a preset algorithm to obtain the target key to be calculated, which can be: the first device performs an XOR calculation based on the preset sequence and the verification key of the target second device to obtain the target key to be calculated. For example, assuming that the key length of the target second device is L=8, the key of the target second device is The length of the preset sequence is also 8, and the preset sequence is specifically S=01010101; That is, the target key to be calculated Since the method of processing the verification key of each second device in the plurality of second devices to obtain the plurality of keys to be calculated is the same as the method of processing the verification key of the target second device to obtain the target key to be calculated, they are not described one by one. In this example, assuming that the number of the multiple keys to be calculated is N, the first device performs XOR calculation on the multiple keys to be calculated to generate the group key, which can be expressed by the following formula: in, Indicates N keys to be calculated. The above is only an exemplary description. In other possible examples, the key of the target second device among the multiple second devices may be directly used as the target key to be calculated among the multiple keys to be calculated. All possible examples are not exhaustively listed here. In a possible example, the first device generates the group key based on the verification key of each second device, including: the first device obtains multiple groups of key elements for each second device based on the verification key of each second device; the first device generates an initial matrix based on the multiple groups of key elements of each second device; the first device generates the group key based on the initial matrix. Taking the target second device among multiple second devices as an example, the first device obtains multiple groups of key elements for each second device based on the verification key of each second device, which may mean that the first device divides the verification key of the target second device according to the first length to obtain multiple groups of key elements for the target second device. Among them, any one of the multiple groups of key elements is a binary key element. The first length can be a length set according to actual conditions, such as 4 bits, or can be longer or shorter, which is not exhaustive here. The aforementioned target second device is any one of the multiple second devices, and the processing of the key of each second device in the multiple second devices is the same as that of the aforementioned target second device, so it is not repeated one by one. The first device generates an initial matrix based on the multiple groups of key elements of each second device, including: the first device converts the multiple groups of key elements of each second device into multiple numerical values, and generates the initial matrix based on the multiple numerical values ​​corresponding to each second device. Here, the number of the multiple numerical values ​​is the same as the number of the multiple groups of key elements, that is, each group of key elements is converted to a corresponding numerical value. Assuming that the multiple groups of key elements are specifically M groups of key elements, the multiple numerical values ​​are specifically M numerical values, M is an integer greater than or equal to 2, and taking the target second device among the multiple second devices as an example, the first device converts the multiple groups of key elements of each second device into multiple numerical values, which may include: the first device converts the mth group of key elements in the M groups of key elements of the target second device into the mth numerical value, m is a positive integer less than or equal to M, and the mth numerical value is a decimal value. Since the processing of each group of key elements in the M groups of key elements for the target second device is the same as the processing of the mth group of key elements, they are not described one by one; the processing of the key of each second device is the same as that of the aforementioned target second device, and they are not described one by one. In the following embodiments, unless otherwise specified, the multiple groups of key elements have the same meaning as the M groups of key elements, and the multiple numerical values ​​have the same meaning as the M numerical values, which will not be repeated below. The number of rows and columns of the initial matrix is ​​related to the number of the aforementioned multiple second devices and the number of multiple values. Specifically, assuming that the number of the multiple second devices is N, and the number of the multiple values ​​is M; accordingly, the initial matrix contains N rows, different rows in the N rows correspond to different second devices in the N second devices, and each row in the N rows contains M values ​​corresponding to one second device. In the following embodiments, unless otherwise specified, the meanings of multiple second devices and N second devices are the same and will not be repeated. For example, assuming that the M values ​​corresponding to the target second device are expressed as represents a set of M values ​​corresponding to the target second device, The subscript R indicates the first device and T n represents the target second device, n is an integer greater than or equal to 1 and less than or equal to N, k n,1 ~k n,M represents the M values ​​corresponding to the target second device. The matrix includes N rows, different rows in the N rows correspond to different second devices in the N second devices, and each row in the N rows includes M values ​​corresponding to one second device; the initial matrix can be expressed as: K represents the initial matrix, which is specifically an N×M dimensional matrix. The M values ​​k in the first row of the initial matrix K are 1,1 ~k 1,M represents the M values ​​corresponding to the first second device among the N second devices, and the M values ​​k of the Nth row in the initial matrix K N,1 ~k N,M Represents M values ​​corresponding to the Nth second device among N second devices. The first device generates the group key based on the initial matrix, including one of the following: Mode 1: The first device obtains one or more sub-matrices based on the initial matrix; determines the eigenvalue of each of the one or more sub-matrices; quantizes the eigenvalue of each sub-matrix to generate the group key; Method 2: The first device performs singular value decomposition on the initial matrix to obtain multiple singular values ​​of the initial matrix, quantizes the multiple singular values, and generates the group key. The above two methods are explained separately: Method 1: This method is particularly suitable for the case where N is less than or equal to M. The description of N and M is the same as that in the previous embodiment and will not be repeated. The first device obtains one or more sub-matrices based on the initial matrix, which may include: The first device extracts N rows of values ​​from the (t-1)×N+1th column to the t×Nth column from the initial matrix as the tth sub-matrix, when the (t-1)×N+1th column in the initial matrix is ​​used as the starting position and there are N-1 columns of values ​​after the (t-1)×N+1th column of the initial matrix; Alternatively, when the first device takes the (t-1)×N+1th column in the initial matrix as the starting position and the number of remaining columns after the (t-1)×N+1th column of the initial matrix is ​​less than N-1, it extracts N rows of values ​​of the (t-1)×N+1th column and the remaining columns thereafter from the initial matrix as the values ​​of the previous column or columns of the tth sub-matrix, fills the element positions that are less than N columns in the tth sub-matrix with zeros, and obtains the tth sub-matrix. The number of rows and columns of the t-th sub-matrix is ​​the same, both N, and t is a value greater than or equal to 1 and less than or equal to M divided by N and rounded up. M divided by N and rounded up can be calculated using the formula To indicate that In other words, the total number of sub-matrices can be equal to The t-th sub-matrix mentioned above is One of the sub-matrices, due to The method of obtaining each sub-matrix in the t-th sub-matrix is ​​the same as that of the t-th sub-matrix, so they will not be described one by one. For example, assuming that N is equal to 3 and M is equal to 8, that is, the initial matrix is ​​a 3*8 matrix, such as the initial matrix is ​​expressed as: The initial matrix can be split into A square array. Taking t equal to 1 as an example, the first sub-matrix is ​​obtained as follows: the first device takes the first column of the initial matrix as the starting position and there are two columns of values ​​after the first column of the initial matrix, and extracts three rows of values ​​from the first column to the third column from the initial matrix as the first sub-matrix. For example, the first sub-matrix can be expressed as k 1,1 k 1,2 k 1,3 are the values ​​of the 1st to 3rd columns of the 1st row in the initial matrix; the 2nd and 3rd rows in the 1st sub-matrix are the values ​​of the 1st to 3rd columns of the 2nd row in the initial matrix and the values ​​of the 1st to 3rd columns of the 3rd row in the initial matrix, respectively, which will not be repeated here. Taking t equal to 2 as an example, the second sub-matrix is ​​obtained in the same way as the first sub-matrix. The second sub-matrix can be k 1,4 k 1,5 k 1,6The values ​​of the 4th to 6th columns of the 1st row in the initial matrix, the 2nd and 3rd rows in the second sub-matrix are the values ​​of the 4th to 6th columns of the 2nd row in the initial matrix, The values ​​in the 4th to 6th columns of row 3 are not described in detail. Taking t equal to 3 as an example, the third sub-matrix is ​​obtained as follows: the first device takes the (t-1)×N+1=7th column in the initial matrix as the starting position, and the number of remaining columns after the 7th column of the initial matrix is ​​1, and 1 is less than (N-1)=2, then extracts the 3 rows of values ​​of the 7th column and the 8th column from the initial matrix as the 3 rows of values ​​of the first 2 columns of the third sub-matrix, and fills the remaining last 1 column and 3 rows of values ​​of the third sub-matrix with 0 to obtain the third sub-matrix. For example, the third sub-matrix can be expressed as k 1,7 k 1,8 The values ​​of the 7th to 8th columns of the 1st row in the initial matrix, the values ​​of the last column of the 1st row of the 3rd sub-matrix are padded with 0, the 2nd and 3rd rows of the 3rd sub-matrix are respectively the values ​​of the 7th to 8th columns of the 2nd row in the initial matrix and the last column padded with 0, and the values ​​of the 7th to 8th columns of the 3rd row in the initial matrix and the last column padded with 0, which are not repeated here. Determining the eigenvalue of each of the one or more sub-matrices may refer to: using the formula Calculate the eigenvalue of the t-th sub-matrix in the one or more sub-matrices, g(*) represents an eigenvalue calculation function, the number of eigenvalues ​​of the t-th sub-matrix may be one or more, λ represents the eigenvalue of the sub-matrix, it should be understood that λ may represent a sequence of eigenvalues, E represents an identity matrix, = represents the transpose of the t-th sub-matrix, and |*| represents the calculation of the absolute value. Since the t-th sub-matrix is ​​one of one or more sub-matrices, the calculation method of the eigenvalue of each sub-matrix in the one or more sub-matrices is the same as the calculation method of the t-th sub-matrix, so it is not repeated here. Since the channels of different second devices among the N second devices are independent of each other, the values ​​(or elements) in the initial matrix obtained based on the verification keys of the N second devices are independent of each other. In the case of , the values ​​in the t-th sub-matrix are also independent of each other, that is, any sub-matrix is ​​full rank, so the number of eigenvalues ​​of the t-th sub-matrix is ​​equal to N, and the eigenvalue of the t-th sub-matrix can be expressed as {λ t,1 ,λ t,2 ,…,λt,N}; More specifically, the eigenvalues ​​of the t-th sub-matrix may be the N values ​​on the diagonal of the t-th sub-matrix. At t equals In the case where the t-th sub-matrix is ​​the last sub-matrix, if M is an integer multiple of N, then the t-th sub-matrix (i.e. The number of eigenvalues ​​of the t-th sub-matrix is ​​also equal to N. The eigenvalues ​​of the t-th sub-matrix can be expressed as {λ t,1 ,λ t,2 ,…,λ t,N}; If M is not an integer multiple of N, then the tth sub-matrix (i.e. The rank of K t )=MmodN, that is, the number of eigenvalues ​​of the t-th sub-matrix is ​​equal to the remainder of M divided by N (i.e., MmodN). The eigenvalue of the sub-matrix is ​​expressed as The quantizing the eigenvalues ​​of each sub-matrix to generate the group key may include: sorting one or more eigenvalues ​​of each sub-matrix to obtain a plurality of sorted eigenvalues; and quantizing the sorted plurality of eigenvalues ​​to obtain the group key. Based on the above description, it can be seen that except for the last sub-matrix, the previous The number of eigenvalues ​​that can be obtained for each sub-matrix is ​​N. The number of eigenvalues ​​that can be obtained by a sub-matrix is ​​MmodN, so The total number of eigenvalues ​​that can be obtained by a sub-matrix is ​​equal to M, that is, The aforementioned sorting of one or more eigenvalues ​​of each sub-matrix to obtain a plurality of sorted eigenvalues ​​may refer to: sorting the one or more eigenvalues ​​of each sub-matrix according to the order of the one or more sub-matrixes to obtain a plurality of sorted eigenvalues. For example, the N eigenvalues ​​of the first sub-matrix are sorted at the front, and the MmodN eigenvalues ​​of the last sub-matrix are sorted at the end to obtain the sorted M eigenvalues. It should be understood that, in addition to the above-mentioned order of one or more sub-matrixes, the one or more eigenvalues ​​of each sub-matrix may be sorted in a preset order to obtain the sorted M eigenvalues. The preset order may be configured according to actual conditions, such as the order of one or more sub-matrixes from back to front, or the order of the odd-numbered sub-matrixes first and then the even-numbered sub-matrixes, etc., which are not exhaustively listed here. The specific quantization method in the above-mentioned processing is not limited in this embodiment, but this embodiment limits the number of binary bits obtained after quantization of each eigenvalue to the above-mentioned first length (such as 4 bits, or it can be longer or shorter). Method 2: This method is particularly suitable for the case where N is greater than M. The specific number of the multiple singular values ​​may be equal to M. Specifically, performing singular value decomposition on the initial matrix to obtain multiple singular values ​​of the initial matrix can include: performing singular value decomposition on the initial matrix to obtain two orthogonal matrices and a diagonal matrix; and using the values ​​(or elements) on the diagonal of the diagonal matrix as multiple singular values ​​of the initial matrix. For example, assuming that the initial matrix is ​​represented by K, the initial matrix K is specifically an N×M dimensional matrix; performing singular value decomposition on the initial matrix K can obtain K=U N×N Σ N×M V M×M , U N×N and V M×M are the two orthogonal matrices mentioned above; is a diagonal matrix. Specifically, r = rank (K). Since the channels of different second devices in the N second devices are independent of each other, the values ​​(or elements) in the initial matrix obtained based on the keys of the N second devices are independent of each other, that is, the initial matrix K is full rank, that is, r = rank (K) = M; the elements on the diagonal of the aforementioned diagonal matrix are expressed as {σ 1 ,σ 2 ,…,σ r}, since r is equal to M, the {σ1 ,σ 2 ,…,σ r}Specifically, {σ 1 ,σ 2 ,…,σ M}That is, the M singular values ​​of the initial matrix K. The specific quantization method for quantizing the multiple singular values ​​of the initial matrix to generate the group key is not limited in this embodiment, but this embodiment limits the number of binary bits obtained after quantization of each singular value to the aforementioned first length (for example, 4 bits, or it can be longer or shorter). In some possible implementations, each third message in the multiple third messages includes group key calculation information of the corresponding second device. Still taking the target second device as an example, the target third message among the multiple third messages includes group key calculation information of the target second device, the target second device is one of the multiple second devices, and the group key calculation information of the target second device is obtained by XOR calculation based on the verification key of the target second device and the group key. Specifically, the method for the first device to generate the group key calculation information of the target second device includes: the first device performs an XOR calculation on the group key and the verification key of the target second device to obtain the group key calculation information of the target second device. For example, the calculation method for the first device to obtain the group key calculation information of the target second device can be expressed as: K G is the group key, a verification key for the target second device, is the XOR operator, K n Group key calculation information is provided for the target second device. Correspondingly, after the target second device receives the target third message sent by the first device, the method may also include: the target second device performs an XOR calculation based on the group key calculation information of the target second device and the key of the target second device to obtain the group key. For example, the calculation method of the target second device to obtain the group key can be expressed as: is the key of the target second device. Since the target second device is any one of the multiple second devices, the processing of each of the multiple second devices is the same as that of the target second device, and thus will not be described one by one. Further, after obtaining the group key, the target second device may also include: the target second device sends a target response message to the first device, the target response message carries the target designation information encrypted by the group key, and the target designation information at least includes: the EPC (Electronic Product Code) of the target second device. It should be understood that the target designation information may include other contents besides the EPC of the target second device, which are not exhaustive here. Correspondingly, after the first device sends multiple third messages to the multiple second devices, the method may further include: when the first device receives the target response message sent by the target second device, the target response message is parsed based on the group key to obtain the target designation information, and determine that the target second device successfully receives the group key. Since each second device performs the same processing as the aforementioned target second device, the first device can determine that each second device successfully receives the group key based on the response message sent by each second device, but no further details are given here. In some possible implementations, the first device generates the group key only when it determines that the verification key of each second device is consistent with the key. Next, the method of generating the key for each second device and the method of generating the verification key for each second device by the first device are described respectively. The key of each of the second devices is generated based on the multiple first messages. Specifically, the first device sending a plurality of first messages to a plurality of second devices may be: the first device periodically sends a plurality of first messages to the plurality of second devices within a coherent time. The plurality of first messages are broadcast. Accordingly, each of the plurality of second devices receives the plurality of first messages. The number of the plurality of first messages used to generate the key of each second device may be M. The aforementioned periodic cycle duration can be set according to actual conditions, for example, it can be 1 millisecond, 0.5 milliseconds, or longer or shorter, which is not exhaustively listed here; the duration of the coherence time can be greater than M cycle durations or longer, which is not limited in this embodiment. The duration of each first message in the aforementioned multiple first messages can be the same or different, and the duration of any first message is not greater than the aforementioned cycle duration. In a preferred example, the durations of different first messages are the same. Any first message in the aforementioned multiple first messages can be a QueryRep (QueryRepeat) message. In addition, whether the first message carries data is not limited in this embodiment. Optionally, the transmission power of each of the multiple first messages is a random transmission power; that is, the first device sends the multiple first messages at a random transmission power. For example, taking any first message as the ath first message (a is an integer greater than or equal to 1 and less than or equal to M) as an example, the transmission power of the ath first message is the transmission power of the first device at randomly selected from; among them, represents the transmission power of the a-th first message, Indicates the maximum transmit power, and RSSI (Received Signal Strength Indicator) is an indication of the strength of the received signal. Optionally, different first messages among the multiple first messages have different transmission powers. In one case, the transmission power of each first message in the multiple first messages may be preset, and the transmission powers of different first messages are different. For example, the multiple first messages are specifically M first messages, and the first device is pre-configured with M preset transmission powers, and different preset transmission powers are different. The first device can select the ath preset transmission power from the M preset transmission powers when sending the ath first message among the M first messages as the transmission power of the ath first message. In this case, the preset mode of the M preset transmission powers can be preset by the management personnel on the first device according to actual needs, or can be configured for the first device through a fourth device. The fourth device can be any one of the second access network device, the second terminal, the core network device, and the AF, and this embodiment does not limit it. In another case, the transmission power of each first message in the multiple first messages is randomly selected by the first device from 0 to the maximum transmission power, and the transmission powers of different first messages in the multiple first messages are different. Take the processing of the ath first message as an example: the first device randomly selects a power value from 0 to the maximum transmission power, and determines whether the power value is the same as the transmission power of any one of the a-1 first messages sent before the ath first message. If the power value is different from the transmission power of the a-1 first messages that have been sent, the power value is used as the transmission power of the ath first message; otherwise, the first device randomly selects a power value from 0 to the maximum transmission power again until a power value that is different from the transmission power of the a-1 first messages that have been sent is selected. Since the process of generating a key for each second device is the same, the following takes any second device as the target second device as an example to illustrate the process of generating a key for the target second device: After the target second device receives the multiple first messages sent by the first device, the method further includes: the target second device generating a key of the target second device based on the reception strength of each of the multiple first messages. Wherein, the target second device generates a key of the target second device based on the receiving strength of each first message in a plurality of first messages, including: the target second device obtains an average receiving strength based on the receiving strength of each first message in the plurality of first messages; the target second device obtains a plurality of processed signal strengths based on the average receiving strength and the receiving strength of each first message; the target second device obtains a plurality of quantized reference values ​​based on the plurality of processed signal strengths; the target second device quantizes the plurality of quantized reference values ​​to generate the key of the target second device. Taking any one of the multiple first messages as the ath first message as an example, the method for the target second device to obtain the receiving strength of the ath first message is described, which may specifically include: the target second device performs multiple measurements within the duration of the ath first message to obtain multiple measurement values ​​of the ath first message, and averages the multiple measurement values ​​of the ath first message to obtain the receiving strength of the ath first message, where a is an integer greater than or equal to 1 and less than or equal to M. Since the method for the target second device to obtain the receiving strength of each first message is the same as the method for obtaining the receiving strength of the ath first message, it will not be described one by one. Here, the target second device performs multiple measurements within the duration of the ath first message according to a preset measurement period, and the period length of the measurement period is less than the duration of any one message; for example, if the duration of any one message is 1 millisecond, the measurement period may be 0.1 millisecond, 0.05 millisecond, or longer or shorter, which is not exhaustively listed here. The target second device obtains a plurality of processed signal strengths based on the average reception strength and the reception strength of each first message, which may include: the target second device subtracts the average reception strength from the reception strength of each first message to obtain a plurality of processed signal strengths. It should be understood that the number of the plurality of processed signal strengths is the same as the number of the plurality of first messages. For example, the number of the aforementioned processed signal strengths and the number of the plurality of first messages are both expressed as M, and the receiving strength of each of the M first messages obtained by the target second device is expressed as: R represents the first device, T n represents the target second device; represents a set of reception strengths of each of the M first messages; wherein a is an integer greater than or equal to 1 and less than or equal to M; represents the receiving strength of each of the M first messages obtained by the target second device. Further, it is assumed that the average receiving strength obtained by the target second device based on the receiving strength of each of the above-mentioned first messages is expressed as Then the target second device subtracts the average receiving strength from the receiving strength of each first message to obtain M processed signal strengths, which can be expressed as: Represents a set of M processed signal intensities. The target second device obtains multiple quantization reference values ​​based on the multiple processed signal strengths, including: the target second device sequentially calculates the absolute value of the difference between each candidate quantization reference value and the mth processed signal strength among the multiple candidate quantization reference values ​​included in the quantization reference set; selects a minimum and most absolute value from the absolute value of the difference between each candidate quantization reference value and the mth processed signal strength, and uses a candidate quantization reference value corresponding to the minimum absolute value as the mth quantization reference value, the mth quantization reference value is one of the multiple quantization reference values, the mth processed signal strength is one of the multiple processed signal strengths, and m is a positive integer. Since the method for determining each quantization reference value in the multiple quantization reference values ​​is the same as the method for determining the mth quantization reference value, they are not described one by one. For example, the specific process of obtaining the mth quantization reference value can be expressed by the following formula: argmin represents the variable value that makes the objective function take the minimum value. The variable is q and the objective function is The objective function represents the absolute value of the difference between the variable q and the mth processed signal intensity among the plurality of processed signal intensities, Q n represents the quantized reference set of the target second device, q∈Q n Denotes variable q as set Q n A candidate quantization reference value in represents the signal strength after the mth processing, The multiple quantization reference values ​​finally obtained, assuming that the number of the multiple quantization reference values ​​is M, then the M quantization reference values ​​can be expressed as Among them, the quantization reference set may include a specified number of candidate quantization reference values. The specified number of candidate quantization reference values ​​are arranged from small to large, and each candidate quantization reference value has a corresponding index value in the quantization reference set; among the aforementioned specified number of candidate quantization reference values, the intervals between any adjacent candidate quantization reference values ​​are the same, that is, the specified number of candidate quantization reference values ​​are equally spaced. The specified number can be configured according to actual conditions, for example, it can be 16, 24, or larger or smaller, and this embodiment does not limit it. Exemplarily, the quantization reference set can be expressed as: Q n = {q 1 ,q 2 ,…,q W}, Q n represents a quantization reference set of the target second device, 1 to W are index values ​​of each candidate quantization reference value in the quantization reference set, W represents a specified number, W is an integer greater than 1, q 1 ~q W represents W candidate quantization reference values, the W candidate quantization reference values ​​are arranged from small to large, and the intervals between any adjacent candidate quantization reference values ​​are the same. The quantization reference set may be determined by the target second device based on the receiving strength of each first message in the multiple first messages. Specifically, the process of the target second device generating the quantization reference set may include: the target second device determines the maximum receiving strength and the minimum receiving strength from the receiving strength of each first message in the multiple first messages; divides a specified number of intervals between the maximum receiving strength and the minimum receiving strength; selects an intermediate value in each interval in the specified number of intervals as a specified number of candidate quantization reference values ​​in the quantization reference set, and the difference between the maximum value and the minimum value of different intervals in the specified number of intervals is the same. In conjunction with Figure 6, for example, assuming that the aforementioned specified number is 16, the horizontal axis in Figure 6 represents the candidate quantization reference value, the leftmost point 601 on the horizontal axis represents the minimum receiving strength, and the last point 604 on the horizontal axis represents the maximum receiving strength. Assuming that 601-602 represent the first interval, and 602-603 represent the second interval, it can be seen that the first interval and the second interval are the same in size, that is, the difference between the maximum value and the minimum value of the two intervals is the same, and other intervals are not described in detail; q 1 is the middle value of the first interval, the q 1 is the first candidate quantization reference value, and so on. 2 ~q 16 The second The 16th candidate quantization reference values ​​are also the middle values ​​of their respective intervals. As shown in FIG6 , the intervals between any adjacent candidate quantization reference values ​​are the same. Finally, 16 candidate quantization reference values ​​in the quantization reference set can be obtained. The quantization reference set can be expressed as Q n = {q 1 ,q 2 ,…,q 16}. The target second device quantizes the multiple quantization reference values ​​to generate a key for the target second device, including: the target second device determines multiple quantization results based on the index value of each quantization reference value in the multiple quantization reference values; the target second device generates the key for the target second device based on the multiple quantization results. Among the multiple quantization results, the length of each quantization result is the aforementioned first length. Specifically, the target second device obtains the index value of each quantization reference value in the multiple quantization reference values ​​in a manner that: the target second device inputs the mth quantization reference value in the multiple quantization reference values ​​into a preset classification formula, and obtains the index value of the mth quantization reference value output by the preset classification formula, and the index value may refer to the index value corresponding to the mth quantization reference value in the quantization reference set. For example, the aforementioned preset classification formula may be expressed as f 2 (*) indicates the calculation function of the preset classification formula, represents the mth quantization reference value, w represents the index value, and w is an integer greater than or equal to 1 and less than or equal to W. Since the method for determining the index value of each quantization reference value is the same as the method for determining the index value of the mth quantization reference value, they are not described one by one. The target second device determines multiple quantization results based on the index value of each quantization reference value in the multiple quantization reference values. The method may be as follows: the target second device determines the quantization value corresponding to the index value of each quantization reference value in the multiple quantization reference values ​​based on the quantization mapping relationship, and uses the quantization value corresponding to the index value of each quantization reference value in the multiple quantization reference values ​​as the multiple quantization results; or, the target second device inputs the index value of each quantization reference value in the multiple quantization reference values ​​into the encoder, obtains the quantization value corresponding to each quantization reference value output by the encoder respectively, and uses the quantization value corresponding to the index value of each quantization reference value in the multiple quantization reference values ​​as the multiple quantization results. Among them, the quantization mapping relationship may include: W candidate index values, and the candidate quantization value corresponding to each candidate index value in the W candidate index values, and the quantization mapping relationship may be preset according to actual conditions. Taking Figure 6 as an example, assuming that W is equal to 16, the vertical axis in Figure 6 represents 16 candidate index values, that is, the quantization mapping relationship specifically includes: the candidate quantization value corresponding to candidate index value 1 is 0000, the candidate quantization value corresponding to candidate index value 2 is 0001, the candidate quantization value corresponding to candidate index value 3 is 0011, and so on, and the 16 candidate index values ​​illustrated in Figure 6 and their corresponding candidate quantization values ​​are not described one by one. In addition, in Figure 6, the candidate quantization value corresponding to the candidate index value "1" is expressed as

[0000] 2,

[0000] 2 is used to represent the set of bit values ​​of binary system is 0000, and other candidate quantization values ​​in FIG6 are similar thereto and will not be described repeatedly. The encoder may be a Gramme encoder, for example, it may be expressed as g{w}, where w represents the input, i.e., the index value of any quantization reference value, and g{*} represents the calculation function of the Gramme encoder; that is, in the method of processing using the encoder, any quantization value may be obtained using the formula Still referring to FIG. 6 for an exemplary explanation, it is assumed that the mth quantization reference value among the M quantization reference values ​​is equal to q in FIG. 6 1 Based on the aforementioned preset classification formula, the index value of the mth quantization reference value can be obtained as 1; the quantization value obtained by inputting the index value "1" into g{w} is "0000" as shown in Figure 6, and then "0000" can be used as the mth quantization result among the M quantization results. The target second device generates a key of the target second device based on the multiple quantization results, which may specifically include: the target second device combines the multiple quantization results to obtain the key of the target second device. Here, the key length of the target second device is the same as the length of the aforementioned group key. Assuming that the number of the aforementioned multiple quantization results is M as an example, the length of each quantization result is the first length, then the key length of the target second device is equal to M multiplied by the first length. For example, the first length is expressed as b (b=4), M=32, then the key length (Keylen) of the target second device is equal to 128. After obtaining the key, the target second device may generate a target second message. In some possible implementations, the target second message includes multiple quantized offsets of the target second device. The processing of the target second device also includes: the target second device obtains the multiple quantized offsets of the target second device based on the multiple quantized reference values ​​and the multiple processed signal strengths. Taking any one of the multiple quantization offsets of the target second device as the mth quantization offset as an example, the method for the target second device to determine the mth quantization offset may include: the target second device subtracts the mth processed signal strength from the mth quantization reference value to obtain the mth quantization offset. For example, the above process can be expressed by the following formula: represents the mth quantization offset, represents the mth processed signal strength among multiple processed signal strengths, represents the mth quantization reference value. By adopting the same processing method as the mth quantization reference value, the target second device can obtain multiple quantization reference values. In some possible implementations, the aforementioned target second message may include: a key of the target second device, and multiple quantized offsets of the target second device. In addition, the target second message may also include: an identifier of the target second device. In a possible example, the target second message carries a target message authentication code (MAC); specifically, the target MAC can be obtained by processing the target second device's key, multiple quantized offsets of the target second device, and the target second device's identifier using a MAC algorithm. For example, the aforementioned target MAC can be expressed as The target second message, Indicates the key of the target second device, TagID n is the identifier of the target second device, represents a set of M quantized offsets of the target second device, f 1 () represents a MAC algorithm. The MAC algorithm may be a lightweight MAC algorithm, such as SPECK, SIMON algorithm, or any other algorithm. In a possible example, the target MAC carried by the aforementioned target second message can be generated based on the following contents in addition to the above contents: the key index of the target second device and the key length of the target second device. For example, the aforementioned target MAC can be expressed as TagID n , f 1 Same as the previous example, no further explanation is given. KeyID n represents the key index of the target second device, KeyLen represents the key length of the target second device, and since the key lengths of different second devices among the N second devices are the same, KeyLen no longer distinguishes the subscripts of different second devices. The above-mentioned processing is explained by taking the target second device as an example. In the above-mentioned embodiment, it has been explained that the target second device is any one of the multiple second devices. Therefore, each of the multiple second devices performs the same processing as the target second device, but it is not repeated one by one; correspondingly, the first device will receive multiple second messages sent by multiple second devices, which is not repeated again. The method for the first device to determine the verification key of the target second device is specifically described as follows: The above-mentioned embodiment has explained that the target second message in the multiple second messages also includes multiple quantization offsets of the target second device, and the target second device is one of the multiple second devices. Correspondingly, taking the target second message as an example, the first device determines the verification key of each second device in the multiple second devices based on the multiple second messages, including: the first device obtains a target path loss value based on the reception strength of the target second message, and the target path loss value is the path loss value between the first device and the target second device; the first device obtains multiple reception strength estimation values ​​of the target second device based on the target path loss value and the transmission strength of the multiple first messages, and the multiple reception strength estimation values ​​include the reception strength estimation value of each first message in the multiple first messages received by the target second device; the first device obtains the verification key of the target second device based on the multiple reception strength estimation values ​​of the target second device and the multiple quantization offsets of the target second device. The first device obtains the target path loss value based on the receiving strength of the target second message, which may include: the first device calculates the target path loss value based on the transmission power of the last first message sent before receiving the target second message, the antenna gain of the first device, the antenna gain of the target second device, the backscatter loss of the target second device, and the receiving strength of the target second message. Among them, the last message sent before receiving the target second message can be the Mth first message, or any message later than the Mth first message. For example, the above calculation to obtain the target path loss value can be expressed by the following formula Among them, PL n is the target path loss value; RSSI CW,n-lastG is the transmission power of the last message sent before receiving the second target message; R is the antenna gain of the first device; The antenna gain of the target second device; Backscatter loss for the target second device; is the receiving strength of the target second message. The first device obtains multiple reception strength estimation values ​​of the target second device based on the target path loss value and the transmission strength of the multiple first messages, including: the first device adds the transmission strength of the jth first message among the multiple first messages to the antenna gain of the first device, and then subtracts the target path loss value to obtain the reception strength estimation value of the jth first message received by the target second device; the reception strength estimation value of the jth first message received by the target second device is used as the jth reception strength estimation value of the target second device, where j is a positive integer and the jth reception strength estimation value is one of the multiple reception strength estimation values. For example, the above processing can be expressed as: is the transmission intensity of the jth message, is the estimated value of the receiving strength of the target second device receiving the j-th message, G R and PL n The description is the same as the above example and will not be repeated. The first device obtains a verification key for the target second device based on multiple reception strength estimation values ​​of the target second device and multiple quantization offsets of the target second device, including: the first device obtains a target average strength estimation value based on the multiple reception strength estimation values ​​of the target second device; the first device generates a plurality of processed strength values ​​based on the target average strength estimation value and the multiple reception strength estimation values ​​of the target second device; the first device obtains a plurality of quantization reference estimation values ​​based on the processed plurality of strength values ​​and the multiple quantization offsets of the target second device; the first device performs quantization processing on the plurality of quantization reference estimation values ​​to obtain the verification key for the target second device. The first device generates a plurality of processed strength values ​​based on the target average strength estimation value and the plurality of reception strength estimation values ​​of the target second device, including: the first device subtracts the target average strength estimation value from each of the plurality of reception strength estimation values ​​of the target second device to obtain M processed strength values. For example, taking the number of the plurality of processed strength values ​​and the number of the plurality of reception strength estimation values ​​of the target second device as M, the plurality of reception strength estimation values ​​of the target second device are expressed as: R represents the first device, T n Indicates the target second device, represents a set of M reception strength estimation values ​​of the target second device, represents the M receiving strength estimation values ​​of the target second device. Further, assuming that the target average strength estimation value is expressed as Then the first device subtracts the target average strength estimation value from each of the M reception strength estimation values ​​of the target second device to obtain M strength values ​​after processing, which can be expressed as: Represents a set of M intensity values ​​obtained after processing by the first device. The first device obtains multiple quantization reference estimation values ​​based on the processed multiple intensity values ​​and the multiple quantization offsets of the target second device, which may include: the first device adds the processed mth intensity value and the mth quantization offset of the target second device to obtain the mth estimation value; from multiple candidate quantization estimation reference values ​​included in the quantization reference estimation set corresponding to the target second device, determine the one with the smallest absolute value of the difference with the mth estimation value as the mth quantization reference estimation value, and the mth quantization reference estimation value is one of the M quantization reference estimation values; m is a positive integer less than or equal to M. Among them, the quantization reference estimation set corresponding to the target second device may include a specified number of candidate quantization estimation reference values. The specified number of candidate quantization estimation reference values ​​are arranged from small to large, and each candidate quantization estimation reference value has a corresponding index value in the quantization reference estimation set; among the aforementioned specified number of candidate quantization estimation reference values, the intervals between any adjacent candidate quantization estimation reference values ​​are the same, that is, the specified number of candidate quantization estimation reference values ​​are equally spaced. The specified number can be configured according to actual conditions, for example, it can be 16, 24, or larger or smaller, and this embodiment does not limit it. The quantization reference estimation set corresponding to the target second device may be determined by the first device based on the multiple reception strength estimation values. Specifically, the processing of the first device may include: the first device determines the maximum reception strength estimation value and the minimum reception strength estimation value from the multiple reception strength estimation values; divides a specified number of estimation value intervals between the maximum reception strength estimation value and the minimum reception strength estimation value; selects an intermediate estimation value in each estimation value interval in the specified number of estimation value intervals as a specified number of candidate quantization estimation reference values ​​in the quantization reference estimation set corresponding to the target second device; wherein the difference between the maximum value and the minimum value of different estimation value intervals in the specified number of estimation value intervals is the same. The first device adds the processed mth intensity value to the mth quantization offset of the target second device to obtain the mth estimation value; and determines, from a plurality of candidate quantization estimation reference values ​​included in the quantization reference estimation set corresponding to the target second device, one having the smallest absolute value of the difference with the mth estimation value as the mth quantization reference estimation value, which can be calculated using the following formula: Argmin represents the variable value when the objective function takes the minimum value. The variable is q′ and the objective function is The objective function represents the absolute value of the difference between the variable q′ and the mth estimated value, represents the mth intensity value after processing, represents the mth quantization offset value, represents the addition of the processed mth intensity value and the mth quantization offset of the target second device to obtain the mth estimated value, Q R,n represents the quantized reference estimation set corresponding to the target second device, q'∈Q R,n Denote variable q′ as set Q R,n A candidate quantization estimation reference value in The multiple quantization reference estimation values ​​finally obtained can be expressed as a set form, and since the determination method of each quantization reference estimation value in the multiple quantization reference estimation values ​​is the same as the determination method of the mth quantization reference estimation value, they are not described one by one. The first device performs quantization processing on the multiple quantization reference estimation values ​​to obtain the verification key of the target second device, including: the first device determines multiple quantization estimation results based on the index value of each quantization reference estimation value in the multiple quantization reference estimation values; the first device obtains the verification key of the target second device based on the multiple quantization estimation results. Specifically, the first device obtains the index value of each of the multiple quantization reference estimation values ​​in a manner that: the first device inputs the mth quantization reference estimation value of the multiple quantization reference estimation values ​​into a preset classification formula, and obtains the index value of the mth quantization reference estimation value output by the preset classification formula, and the index value of the mth quantization reference estimation value may refer to the index value corresponding to the mth quantization reference estimation value in the quantization reference estimation set corresponding to the target second device. Since the method for determining the index value of each quantization reference estimation value is the same as the method for determining the index value of the mth quantization reference estimation value, they are not described one by one. The first device determines multiple quantization estimation results based on the index value of each quantization reference estimation value in the multiple quantization reference estimation values, which can be: the first device determines the quantization value corresponding to the index value of each quantization reference estimation value in the multiple quantization reference estimation values ​​based on the quantization mapping relationship, and uses the quantization value corresponding to the index value of each quantization reference estimation value as multiple quantization estimation results; or, the first device inputs the index value of each quantization reference estimation value in the multiple quantization reference estimation values ​​into the encoder, obtains the quantization value corresponding to each quantization reference estimation value output by the encoder respectively, and uses the quantization value corresponding to the index value of each quantization reference estimation value in the multiple quantization reference estimation values ​​as multiple quantization estimation results. Among them, the specific description of the quantization mapping relationship is similar to that of the above embodiment and is not repeated. The relevant description of the encoder is also similar to that of the above embodiment and is not repeated. It should be understood that the first device and the multiple second devices adopt the same method. For example, taking the target second device as an example, if the target second device adopts the multiple quantization results determined by the quantization mapping relationship, the first device also adopts the quantization mapping relationship to determine the multiple quantization estimation results; if the target second device adopts the encoder to obtain the multiple quantization results, the first device also adopts the encoder to obtain the multiple quantization estimation results. Still taking the target second device as an example, the way in which the first device verifies the key of the target second device may include: the first device performs MAC calculation on the target second message based on the verification key of the target second device to obtain information to be verified, and compares the information to be verified with the target MAC carried in the target second message, and when the two are the same, determines that the verification key of the target second device is consistent with the key of the target second device. Since the process of verifying the key of each second device by the first device is the same as the process of verifying the key of the target second device, they are not described one by one. In some possible implementations, the first device needs to obtain the reception strength of each second message when determining the verification key of each second device. Next, the processing method for the first device to obtain the reception strength of each second message is described. Optionally, when different second messages among the multiple second messages have different starting sending times and / or different second messages occupy different frequency domain ranges, the receiving strength of the target second message is measured by the first device. In the case where the starting transmission time of different second messages is different, the first device may receive different second messages at different times, and then the first device may directly measure each second message when receiving each second message at each time. Taking the target second message as an example, the processing of the first device may include: the first device measures the receiving strength of the target second message at any time within the duration of the target second message; or, the first device measures multiple times within the duration of the target second message to obtain multiple measurement strengths of the target second message, and the average value of the multiple measurement strengths of the target second message is used as the receiving strength of the target second message. Among them, any time can be configured according to actual conditions, and this embodiment does not limit it. The first device measures multiple times within the duration of the target second message, which can be performed according to the measurement period of the first device. For example, the period length of the measurement period of the first device can be configured according to actual conditions, as long as it is less than the duration of the target second message, it is within the protection scope of this embodiment, and it is not limited here. It should be pointed out that when the starting transmission time of different second messages is different, the frequency domain range occupied by different second messages can be the same or different. When the starting transmission time of different second messages is the same and the frequency domain ranges occupied by different second messages are different, the first device can adopt FDM (Frequency Division Multiplexing) to directly measure each second message when each second message is received in each frequency domain range. The specific measurement method is the same as the above and will not be repeated. Optionally, when the starting sending times of different second messages among the multiple second messages are the same and the frequency domain ranges occupied by different second messages are the same, the receiving strength of the target second message is determined by the first device based on a self-interference cancellation (SIC) method. In this case, since the starting transmission time of different second messages is the same and the frequency domain range is the same, the first device will receive multiple second messages in the same frequency domain range at the same time. The processing of the first device may specifically include: when the first device receives multiple second messages in a NOMA (non-orthogonal multiple access) manner, the first device parses the multiple second messages in the power domain based on the SIC method to obtain the receiving strength of each second message. For example, assuming that the number of the plurality of second messages and the number of the plurality of second devices are both N, it is assumed that the N second messages received by the first device in NOMA are represented as S n Indicates the nth second device among N second devices (for example, The second message (which may be the target second message) is sent by the target second device, and Noise represents the original noise. Assume that the receiving strength of N second messages is ranked as follows: S 1 ≥S 2 ≥…≥S N The first device parses the N second messages in the power domain based on the SIC method to obtain the receiving strength of each second message in the N second messages, which can be as follows: the first device captures the first second message with the strongest signal power from the N second messages through the capture effect, takes the N-1 second messages and the original noise as noise, uses SIC to decode the first second message with the strongest power, reconstructs the waveform of the first second message, and obtains the receiving strength of the first second message; the first device subtracts the reconstructed waveform of the first second message from the N second messages, continues to use SIC to decode the remaining N-1 second messages, and repeats this step multiple times until the receiving strength of each second message is finally obtained. The first device captures the first second message with the strongest signal power from the N second messages through the capture effect, and uses the remaining N-1 second messages and the original noise as noise. The first second message with the strongest decoding power can be obtained by the following formula using SIC: S 1represents the first second message, and the remaining second to Nth second messages and the original noise are all regarded as noise; further, the first device captures the second second message with the strongest signal power from the remaining N-1 second messages through the capture effect, and regards the remaining N-2 second messages and the original noise as noise. The second second message with the strongest decoding power using SIC can be obtained by the following formula: S 2 represents the second second message, and the remaining third to Nth second messages and the original noise are all regarded as noise; by analogy, the first device captures the N-1th second message with the strongest signal power from the remaining two second messages through the capture effect, and regards the remaining Nth second message and the original noise as noise. The N-1th second message with the strongest decoding power using SIC can be obtained by the following formula: S N-1 represents the N-1th second message, and the remaining Nth second messages and the original noise are all regarded as noise. The start sending time of each second message may be determined by each second device based on the fourth message sent by the first device. Next, the manner in which each second device determines the start sending time of the second message is further described: Before the first device sends multiple first messages to multiple second devices, the method further includes: the first device sends a fourth message to the multiple second devices, the fourth message includes: the number of first messages used to generate keys, and timing parameters, the timing parameters are used for each of the multiple second devices to determine the start time of sending the second message. Correspondingly, taking the target second device as an example, before the target second device receives multiple first messages sent by the first device, the method further includes: the target second device receives a fourth message sent by the first device, the fourth message includes: the number of first messages used to generate keys, and timing parameters, the timing parameters are used to determine the start time of sending the target second message. The number of first messages used to generate a key may be expressed as M. The aforementioned fourth message may be carried by a Query command, and the Query command may be broadcast by the first device to multiple second devices; in a possible example, the Query command may be called a key generation request Query command. The timing parameter may be a positive number. Take the target second device as an example: the starting sending time of the target second message is the time when the count value of the target counter of the target second device is zero. The count value of the target counter decreases when the target second device receives one of multiple first messages. The maximum value of the count value of the target counter is determined based on the timing parameters. Here, the number of the multiple first messages may be greater than or equal to the number of the first messages used to generate the key. Assume that the number of the multiple first messages is K, and the number of the first messages used to generate the key is M; the aforementioned first messages used to generate the key are the 1st message to the Mth first message among the multiple first messages. As long as the value of K is not less than M, it is within the protection scope of this embodiment. For example, M can be 32, or 24, or 4, or larger or smaller, and K can be 48, or 50, or 61, or larger or smaller. The values ​​of K and M are not exhaustively enumerated here. After the target second device receives the fourth message, it may include: the target second device determines the maximum value of the count value of the target counter based on the fourth message, and uses the maximum value as the initial value of the count value of the target counter. The target second device sends the target second message, including: the target second device subtracts the count value of the target counter by one when receiving any one of the multiple first messages; the target second device determines whether the number of messages currently received has reached M, if not, the target second device continues to execute the processing of subtracting the count value of the target counter by one and determining whether the number of messages currently received has reached M when receiving any one of the multiple first messages; if it has reached M, the target second device generates the key of the target second device based on the receiving strength of each first message in the M first messages; determines whether the count value of the target counter is zero, if not, the target second device continues to execute the processing of increasing the count value of the target counter when receiving any one of the multiple first messages. If the value is zero, the current time is used as the starting time of sending the target second message, and the target second message containing the key of the target second device is sent to the first device. The process of the target second device generating the key of the target second device has been described in detail in the above embodiment, and will not be repeated here. Optionally, the maximum value of the count value of the target counter is determined by the target second device based on the timing parameter and the number of first messages used to generate the key. Here, the method in which the target second device determines the maximum value of the count value of the target counter may include: the target second device takes the number M of the first messages used to generate the key as the lower limit of the value; the target second device determines the upper limit of the value based on the timing parameter; the target second device randomly selects the maximum value of the count value of the target counter between the lower limit and the upper limit of the value. The target second device determines the upper limit of the value based on the timing parameter, which can be: the target second device calculates the upper limit of the value based on the timing parameter. The target second device calculates the upper limit of the value based on the timing parameter, which can be expressed by the following formula: C -1, C represents the timing parameter, which can be a positive number. The target second device randomly selects the maximum value of the count value of the target counter between the lower limit and the upper limit, which can be: the target second device is in [M,2 C -1], randomly select any value as the maximum value of the count value of the target counter. It should be understood that the above is only an explanation of how the target second device determines the maximum count value of its target counter, and how the target second device determines the starting time for sending the target second message. Since the specific processing method of each second device among the multiple second devices is the same as that of the target second device, they will not be elaborated one by one. Optionally, the timing parameter includes a specified count value; and the maximum count value of the target counter is the specified count value. The difference from the above situation is that the maximum count value of the target counter determined by the target second device is a specified count value. Since the processing of each second device in the multiple second devices is the same as that of the target second device, the maximum value of each counter determined by each second device is the specified count value, and thus the starting time for each second device to send the second message is the same. The above embodiment describes the method for determining the starting sending time of each second message, and the following describes the method for determining the frequency domain range occupied by each second message. Take the target second device as an example: the target second device sends the target second message to the first device, including: the target second device sends the target second message to the first device in the first frequency domain range. Among them, the first frequency domain range is pre-configured, for example, it can be pre-configured by the first device for the target second device; or, it can be pre-configured by the administrator in the target second device; or there can be other configuration methods, which are not exhaustive here. The first frequency domain range is different from the frequency domain range occupied by each other second device in the multiple second devices to send the second message. Or, the first frequency domain range is the same as the frequency domain range occupied by each other second device in the multiple second devices to send the second message. It should be understood that the processing of each second device in the multiple second devices is the same as that of the target second device, so each second device can pre-determine the frequency domain range occupied by each second message sent, but it is not repeated one by one. In conjunction with FIG7 , the above-mentioned key generation method is exemplarily described by taking the first device as a reader / writer, the plurality of second devices as N second devices, each second device as a tag, and the target second device as a target tag as an example: S701. The reader / writer broadcasts a Query command, where the Query command carries a fourth message. The fourth message includes the number M of first messages used to generate a key and a timing parameter C, where the timing parameter C is used to determine a start time for sending a second message. Specifically, the reader / writer may broadcast a Query command (or a key generation request Query command) to N tags in the tag group. Here, the tag group may specifically refer to a device group consisting of N tags. It should be understood that before executing S701, assuming that N tags are in the Ready state, the reader first issues a Select command to select all N tags in the tag group, enters the Inventory phase (i.e., the reader starts the Inventory process), and then executes S701. The Select command may carry relevant information of each of the N tags, and the relevant information of each tag may include the tag memory value of the tag. S702: After receiving the Query command, the target tag determines the initial value of the count value of the target counter. Specifically, after the target tag receives the Query command, the target second device uses M as the lower limit of the value; the target second device determines the upper limit of the value to be 2 based on the timing parameter C. C-1; the target second device is in [M,2 C -1], randomly select the maximum value of the count value of the target counter, and use the maximum value of the count value of the target counter as the initial value of the count value of the target counter; then the target tag enters the Arbitrate state. Since each of the N tags performs the same processing as the target tag, no further description is given here. In FIG. 7 , for the sake of brevity, only the target tag is exemplified, and the N tags are not illustrated one by one. S703: The reader sends M first messages with random transmission power. Specifically, the reader sends no less than M QueryRep (QueryRepeat) messages at random transmission power within the coherence time. For example, the reader may send K QueryRep messages at random transmission power within the coherence time. The message has M QueryRep messages for N tags to generate keys, and K is greater than or equal to M. The specific description of the reader sending M first messages at random transmission power is the same as the previous embodiment and is not repeated here. In FIG. 7 , in order to illustrate that the reader sends M first messages at random transmission power, S703 is represented as the reader sending the first first message at random transmission power to the reader sending the Mth first message at random transmission power. S704: The target tag generates a key of the target tag based on the reception strength of each first message in the M first messages. Here, the specific processing of the target tag generating the key of the target tag has been described in detail in the above embodiment, and will not be repeated. In addition, since each of the N tags generates its own key in the same way as the target tag, it will not be repeated. In FIG. 7 , for the sake of simplicity, only the target tag is exemplified, and the N tags are not illustrated one by one. S705. The target tag sends the target second message to the reader at the start time of sending the target second message. The start time of sending the target second message is the time when the count value of the target counter is zero; the count value of the target counter is minus 1 when the target tag receives any first message. The specific process of the target tag determining the start time of sending the target second message has been detailed in the above embodiment and will not be repeated here. The target second message may specifically be a target MAC. The content that the target MAC may carry and the method of generating it are the same as those in the aforementioned embodiment and will not be described repeatedly. Since each of the N tags sends its own second message in the same manner as the target tag, no repeated description is given. In FIG. 7 , for simplicity, only the target tag is exemplified, and the sending of the respective second messages by the N tags is not illustrated one by one. S706: The reader receives the target second message, and determines M reception intensity estimation values ​​of the target tag based on the target second message. Specifically, the reader receives a target second message (which may be a target MAC message or a target MAC) backscattered by the target tag; based on the reception strength of the target second message, determines the target path loss between the reader and the target tag; based on the target path loss, obtains M reception strength estimation values ​​of the target tag. The specific processing of determining the target path loss between the reader and the target tag based on the reception strength of the target second message; and obtaining M reception strength estimation values ​​of the target tag based on the target path loss is the same as the above-mentioned embodiment, and therefore will not be described in detail. S707: The reader obtains a verification key of the target tag based on the M reception strength estimation values ​​of the target tag and the M quantized offsets of the target tag. The specific processing of S707 has been described in detail in the above embodiment and will not be repeated here. The above S706 to S707 only illustrate the reader's processing of the target second message of the target tag to obtain the key of the target tag. Since the reader's processing of each of the N tags is the same as that of the target tag, they will not be described one by one. S708. The reader / writer determines whether the key of each tag has passed the verification based on the verification key of each tag in the N tags. If passed, S709 is executed; if not, an error (Error) flag is broadcasted and the processing ends. Here, broadcasting the error (Error) flag may be broadcasting the error (Error) flag to each tag in the N tags. Further, after broadcasting the error (Error) flag, no further processing may be performed; or, the process may return to S701 for reprocessing. Before returning to the process of S701, the reader may also remove the tags whose verification keys are inconsistent with the keys from the N tags in the tag group, and form a new tag group with the remaining tags; or, the reader may not remove the N tags. S709: The reader sends a target third message to the target tag, where the target third message includes group key calculation information of the target tag. Specifically, the reader performs XOR processing based on the group key and the key of the target tag to obtain the group key calculation information of the target tag. After S708 and before S709, the reader also generates the group key based on the key of each second device in the N second devices. The specific processing method for the reader to generate the group key is the same as in the previous embodiment, and will not be repeated here. The aforementioned S709 only describes the processing of the target third message of the target tag by the reader / writer. Since the processing of each tag in the N tags by the reader / writer is the same as that of the target tag, it is not described one by one. In FIG. 7 , for the sake of simplicity, only the sending of the target third message by the reader / writer to the target tag is described exemplarily, and the sending of each third message by the N tags by the reader / writer is not illustrated one by one. S710: The target tag performs an XOR calculation on the target tag's key based on the target tag's group key calculation information to obtain the group key. S711. The target tag sends a target response message to the reader / writer. The target response message carries the target designation information encrypted by the group key. The length of the target response message may be 135 bits, or longer or shorter, which is not exhaustive here. The target designation information indication may include EPC. The above S710-S711 only illustrate the processing of the target tag. Since the processing of each tag in the N tags is the same as that of the target tag, they will not be described one by one. In FIG7 , for simplicity, only the target tag is illustrated, and the processing of the N tags is not illustrated one by one. After the target tag sends the target response message, the target tag enters the Access phase and then further enters the Acknowledge phase; correspondingly, after the reader receives the response messages sent by the N tags, the reader enters the Access phase and then further enters the Acknowledge phase. The specific processing of the (confirmation) stage is not limited in this embodiment. Further in conjunction with the scenario diagram shown in FIG8 , the reader sends any message (the transmission power of any message is represented by ); In FIG8 , the receiving strength of Tag1 among N tags (Tag) and receiving the message is represented as The reception strength of Tag2 receiving the message is expressed as By analogy, the reception strength of TagN receiving the message is expressed as After generating their own keys, the N tags send the second message to the reader respectively. The reception strength of the second message sent by Tag1 among the N tags is represented by The reception strength of the second message sent by Tag2 among the N Tags received by the Reader is represented by By analogy, the reception strength of the second message sent by TagN among the N Tags received by the Reader side is represented by Although the eavesdropper (Eve) can monitor the strength of any message (such as RSSI in Figure 8), R,Eve ), and the strength of the second message sent by N Tags (such as RSSI in FIG. 8 ) T1,Eve ~RSSI TN,Eve ), but because the eavesdropper does not have the channel difference between each tag and the reader, the eavesdropper cannot obtain the key of each tag, and further the eavesdropper cannot obtain the final group key, thereby ensuring the security of the key between the reader and N tags and the security of the group key. In some possible implementations, after completing the aforementioned process of sending N third messages, the first device may also update the group key. Optionally, the first device may update the group key when a group key update time is reached. After the first device sends multiple third messages to multiple second devices, the method also includes: the first device generates a random sequence at the group key update time; the first device obtains a first updated group key based on the random sequence and the group key; the first device sends multiple first update information to the multiple second devices, and different first update information among the multiple first update information is used for different second devices to determine the first updated group key. It should be understood that when the first device generates a group key for the first time, the first device saves the group key generated for the first time as the current group key; after the first device generates a first updated group key, the group key saved last time can be deleted, and the first updated group key can be saved as the current group key. That is to say, the first device obtains the first updated group key based on the random sequence and the group key, which can be specifically: the first device obtains the first updated group key based on the random sequence and the current group key; accordingly, after the first device sends multiple first update messages, the first device can also delete the original group key and save the first updated group key as the current group key. Specifically, the method for the first device to determine the group key update time may be: the first device calculates the current time T 0 The time T when the group key was last generated 1 The time difference between the two is determined to determine whether the time difference is greater than the preset update time T update (ie, the first device determines whether T 0 -T 1 >T update ); if it is not greater than the preset update duration, the first device continues to calculate the time difference between the current moment and the moment when the group key was last generated, and determines whether the time difference is greater than the preset update duration; if it is greater than the preset update duration, the first device determines the current moment as the group key update moment. The preset update duration can be set according to actual conditions, such as 30 minutes, 1 hour, 12 hours, or longer or shorter, which is not limited here. It should be understood that the aforementioned process of updating the group key of the first device may be performed periodically with a preset update time as a period, so when the first device determines the group key update time at different times, the time of the last generation of the group key used is different. The last generated group key may specifically refer to the generation time of the current group key saved by the first device, and the description of the current group key is the same as the aforementioned, and will not be repeated. The random sequence may be generated by using a random sequence generator or other methods, which are not limited in this embodiment. It should be noted that the length of the random sequence is the same as the length of the group key. The first device obtains the first updated group key based on the random sequence and the group key, which may include: the first device performs an XOR calculation on the random sequence and the group key to obtain the first updated group key. For example, the following formula may be used: K G represents the group key, R update represents a random sequence, K' G Indicates the first updated group key. The target first update information in the plurality of first update information includes: target first update calculation information of the target second device, the target first update calculation information of the target second device is obtained by performing an XOR calculation based on the key of the target second device and the first update group key. That is, the first device generates the target first update calculation information of the target second device in a manner that: the first device performs an XOR calculation on the key of the target second device and the first update group key to obtain the target first update calculation information. Correspondingly, taking the target second device as an example, after the target second device receives the target third message sent by the first device, the method further includes: when the target second device receives the target first update information sent by the first device, the target The second device performs an XOR calculation based on the target first update calculation information and the key of the target second device to obtain the first updated group key, the target first update information is generated by the first device at the group key update time, and the target first update information includes the target first update calculation information of the target second device. It should also be noted that in the processing scenario where the first device updates the group key when the group key update time is reached, the aforementioned first device, after determining that the group key update time has been reached, may also include: the first device sends a key update command to multiple second devices; when the first device receives a response signal from each of the multiple second devices, the first device generates a random sequence at the group key update time; the first device obtains a first updated group key based on the random sequence and the group key; the first device sends multiple first update information. Correspondingly, taking the target second device as an example, the processing of the target second device may also include: when the target second device receives the key update command, the target second device sends a response signal to the first device. Here, the key update command may also include multiple new first messages occupying different time domains; the target second device may reset the count value of the target counter to the initial value after the count value of the target counter is reset to zero last time and after the target response message is sent last time. Accordingly, the aforementioned target second device sends a response signal to the first device when receiving the key update command, which may include: when the target second device receives any new first message included in the key update command again, the count value of the target counter is reduced by 1, until the count value of the target counter is zero, and the target second device sends a response signal. Furthermore, when the target second device receives the target first update information, after the target second device obtains the first update group key based on the target first update information, it may also include: the target second device encrypts the target specified information based on the first update group key, obtains a new target response message and sends it to the first device. Correspondingly, the first device may also enter the subsequent processing stage when receiving a new response message from each second device; the subsequent processing stage may include an Access stage and an Acknowledge stage, which are not described in detail here. In addition, when the target second device sends a new target response message or after sending a new target response message, it may also include: the target second device deletes the original group key and saves the first update group key as the current group key. In conjunction with FIG9 , taking the first device as a reader / writer, the plurality of second devices as N second devices, each second device as a tag, and the target second device as a target tag as an example, a processing scenario in which the first device updates the group key when the group key update time is reached is described: S901: The reader sends a key update command at the group key update time. The key update command may be broadcasted to N tags. S902, the target tag sends a response signal to the reader. Specifically, the target tag may send a response signal when the count value of the target counter is zero. The specific processing of the target tag has been described in detail in the above embodiment and will not be repeated here. S903: The reader / writer obtains a first updated group key based on the random sequence and the group key. S904: The reader / writer sends N first update information, where different first update information among the N first update information are used by different second devices to determine the first update group key. S905. The target tag obtains a first update group key based on the target first update information, where the target first update information is one of the N first update information. S906. The target tag encrypts the target designation information based on the first update group key, obtains a new target response message, and sends it to the first device. It should be noted that the aforementioned S902, S905 and S906 are only described by taking the target tag as an example. In actual processing, each of the N tags will perform the same S902, S905 and S906 processing as the target tag, but will not be described one by one. In addition, for the sake of simplicity, FIG9 only illustrates the interaction between the reader and the target tag, and does not illustrate the processing between the reader and the N tags one by one. Optionally, the first device may update the group key when a third device is added to the device group formed by the second device. After the first device sends multiple third messages to multiple second devices, the method may further include: upon receiving first indication information, the first device determines to add the third device, wherein the first indication information is used to indicate that the third device is added to the device group composed of multiple second devices. The third device may also be a zero-power device. Specifically, the aforementioned first indication information may be sent from the second network device to the first device, and the second network device may be an AF. For example, when the first device is an access network device, the first device may receive the first indication information sent by the second network device through one or more core network devices; or, when the first device is a first terminal, the first device may receive the first indication information sent by the second network device through one or more core network devices, where the first indication information may be carried by a NAS message; or, when the first device is a first terminal, the first device may receive the first indication information sent by the second network device through a second access network device, where the first indication information may be carried by an AS message. In a possible example, after the first device sends multiple third messages to multiple second devices, it may also include: the first device determines the verification key of the third device based on the fifth message; when it is determined that the verification key of the third device is consistent with the key of the third device, the first device generates the second update group key based on the verification keys of the multiple second devices and the verification key of the third device; the first device sends multiple second update information, and different second update information among the multiple second update information is used for the third device and different devices among the multiple second devices to determine the second update group key. In this example, before the first device receives the fifth message sent by the third device, the first device may resend multiple new first messages; the multiple new first messages resent are the same as the definition of the multiple first messages in the previous embodiment, and are not described in detail. In addition, before the first device resends multiple new first messages, it may also send a sixth message to the third device, and the sixth message may carry the number M of first messages used to generate keys and timing parameters, and the timing parameters are used by the third device to determine the start sending time of the fifth message. The detailed description of the timing parameters is the same as that of the previous embodiment; the method for the third device to determine the start sending time of the fifth message is the same as the method for the target second device to determine the start sending time of the target second message, so it is not repeated. The specific processing of the third device to generate the key is the same as the processing of the target second device to generate the key based on the reception strength of multiple first messages, except that the third device generates the key based on the reception strength of multiple first messages resent by the first device, so it is not repeated. In addition, when the third device sends the fifth message, the content and generation method of the fifth message may be the same as the target second message, and are not repeated. The specific processing method for the first device to determine the verification key of the third device based on the fifth message is similar to the aforementioned method for obtaining the verification key of the target second device, and will not be repeated. The difference from the above embodiment is that, in the case of adding a third device, the first device only needs to verify whether the verification key of the third device is consistent with the key of the third device. The specific processing method of the first device generating the second updated group key is similar to the above method of generating the group key, and will not be repeated. Taking the third device as an example, the second update information corresponding to the third device includes the second update calculation information corresponding to the third device, and the second update calculation information of the third device is obtained by XOR calculation based on the key of the third device and the second update group key. Accordingly, the processing of the third device may include: when the third device receives the second update information, based on the second update information, obtains the second update group key, the second update information is sent when the third device is added to a device group composed of multiple second devices, and the second update information is used by the third device to determine the second update group key. Specifically, the third device performs XOR calculation on the target second update calculation information and the key of the third device to obtain the second update group key. Taking the target second device as an example, the target second update information of the target second device includes the target second update calculation information corresponding to the target second device, and the target second update calculation information is obtained by XOR calculation based on the key of the target second device and the second update group key. Accordingly, the processing of the target second device may include: when the target second device receives the target second update information sent by the first device, based on the target second update information, obtains the second update group key, the target second update information is sent when the third device is added to the device group composed of multiple second devices, and the target second update information is used by the target second device to determine the second update group key. Specifically, the target second device performs XOR calculation on the target second update calculation information and the key of the target second device to obtain the second update group key. It should be noted that after the first device generates the second updated group key, it will delete the original group key it has saved and save the second updated group key as the current key. Similarly, after obtaining the second updated group key, each second device will delete the original group key it has saved and save the second updated group key as the current key. Specifically, still taking the target second device as an example, after obtaining the second updated group key, the target second device may also include: the target second device encrypts the target specified information based on the second updated group key, obtains a new target response message and sends it to the first device. Correspondingly, the first device may also enter the subsequent processing stage when receiving a new response message from each of the second device and the third device; the subsequent processing stage may include an Access stage and an Acknowledge stage, which are not described in detail here. In addition, when sending a new target response message or after sending a new target response message, the target second device may also include: the target second device deletes the original group key saved by itself, and saves the second updated group key as the current key. Furthermore, the process of updating the group key by the first device when a third device is added to the device group consisting of multiple second devices can be combined with the process of updating the group key by the first device when the group key update time is reached. For example, after the first device updates the group key when a third device is added to the device group consisting of multiple second devices, the first device updates the time of the last group key generation to the time of generating the second updated group key, and then still performs the process of calculating the time difference between the current time and the time of the last group key generation, and judging whether the time difference is greater than the preset update time length, until the group key update time is reached. In conjunction with FIG10 , taking the first device as a reader / writer, the plurality of second devices as N second devices, each second device as a tag, the target second device as a target tag, and the third device as tag 3 as an example, the processing scenario of updating the group key when the first device reaches the group key update time is described: S1001. The reader sends M new first messages with random transmission power. It should be understood that before executing S1001, assuming that tag 3 is in the Ready state, the reader first issues a Select command to select tag 3, enters the Inventory stage (i.e., the reader starts the Inventory process), and then executes S1001. The Select command may carry relevant information of tag 3, and the relevant information of tag 3 may include the tag memory value (Value) of tag 3. In addition, before executing S1001, the reader may also send seventh information to tag 3, and the seventh information may include: the value of M and timing parameters; the timing parameters are used by tag 3 to determine the start time of sending the fifth message. S1002. Tag 3 generates a key based on the reception strength of M new first messages. S1003. Tag 3 sends the fifth message to the reader at the start time of sending the fifth message. S1004. The reader receives the fifth message, and determines the verification key of tag 3 based on the fifth message. S1005 . When the verification key of tag 3 is consistent with the key of tag 3 , the reader generates the second update group key based on the key of each tag in the N tags and the key of tag 3 . S1006. The reader sends N+1 second update information. Different second update information in the N+1 second update information is used by tag 3 and different devices in the N tags to determine the second update group key. S1007. Tag 3 performs an XOR calculation based on the second update calculation information included in the second update information corresponding to itself and its own key to obtain a second update group key. S1008. Tag 3 sends a new response message to the reader / writer, where the new response message carries at least the EPC encrypted by the group key. It should be noted that the aforementioned S1007 and S1008 can be steps executed by N tags and tag 3. Since the processing of each of the N tags is the same as that of tag 3, they are not described one by one. For the sake of simplicity, Figure 10 only illustrates the interaction between the reader and tag 3, and does not illustrate the processing between the reader and N tags one by one. Optionally, the first device will also update the group key when any second device is removed. The method also includes: the first device determines to delete the h-th second device among the multiple second devices when receiving the second indication information, and the second indication information is used to indicate that the h-th second device is deleted from the device group composed of the multiple second devices. Here, the way in which the first device receives the second indication information may include: the first device receives the second indication information sent by the second network device. The second network device may be AF. The way in which the first device receives the second indication information sent by the second network device is similar to the way in which the first device receives the first indication information sent by the second network device, and is not described in detail. After the first device sends multiple third messages to multiple second devices, the method further includes: when the first device determines to delete the hth second device among the multiple second devices, the first device generates a third update group key based on the verification key of each second device among the multiple second devices except the hth second device; h is a positive integer; the first device sends multiple third update information to multiple second devices among the multiple second devices except the hth second device, and the multiple third update information is used for different second devices among the multiple second devices except the hth second device to determine the third update group key. Among them, the specific processing method of the first device generating the third update group key is similar to the processing method of the first device generating the group key based on the key of each second device among the multiple second devices, so it will not be repeated. The target third update information in the plurality of third update information includes target third update calculation information of the target second device, where the target third update calculation information of the target second device is obtained by performing an XOR calculation based on the key of the target second device and the third update group key. Correspondingly, each second device except the hth second device of the aforementioned multiple second devices will also receive the third update information. Taking the case where the target second device is any one except the hth second device as an example, the processing of the target second device also includes: when the target second device receives the target third update information sent by the first device, based on the target third update information, obtains the third update group key, the target third update information is sent when the hth second device is deleted from the device group composed of the multiple second devices, the target third update information is used for the target second device to determine the third update group key, and h is a positive integer. Wherein, obtaining the third update group key based on the target third update information includes: the target second device performs an XOR calculation based on the target third update calculation information in the target third update information and the key of the target second device to obtain the third update group key. It should be noted that after the aforementioned first device generates the third updated group key, it will also delete the original group key saved by itself and save the third updated group key as the current key. Similarly, each second device except the hth second device will delete the original group key saved by itself after obtaining the third updated group key and save the third updated group key as the current key. Specifically, still taking any second device other than the hth second device as the target second device as an example, after obtaining the third update group key, the target second device may also include: the target second device encrypts the target specified information based on the third update group key, obtains a new target response message and sends it to the first device. Correspondingly, the first device may also enter the subsequent processing stage when receiving a new response message from each second device; the subsequent processing stage may include an Access stage and an Acknowledge stage, which are not described in detail here. In addition, when sending a new target response message or after sending a new target response message, the target second device may also include: the target second device deletes the original group key saved by itself, and saves the third update group key as the current key. Further, the process of updating the group key by the first device when the hth second device is deleted from the device group consisting of multiple second devices can be combined with the process of updating the group key by the first device when the group key update time is reached. For example, after the first device updates the group key when the hth second device is deleted from the device group consisting of multiple second devices, the first device updates the time of the last generation of the group key to the time of generating the third updated group key, and then still performs the process of calculating the time difference between the current time and the time of the last generation of the group key, and judging whether the time difference is greater than the preset update time length, until the group key update time is reached. The effect of the key generation method provided in this embodiment is simulated and analyzed: Assume that M is 32, the first length is 4, the key length is 4 times 32, which equals 128 bits, the first device is the reader, the second device is the tag, and N tags are called a tag group. The distance between the reader and the tag and the eavesdropper is 1 meter; the small-scale fading of the reader and the eavesdropper follows the Rayleigh distribution, and the small-scale fading of the reader and the tag follows the Rice distribution, with a Rice factor of 5dB; the reader antenna gain is 3dB, the tag antenna gain is 2dB, and the tag backscatter loss is 5dB. The reader random transmission power range is 23dBm to 30dBm. The default signal-to-noise ratio is SNR=30dB. FIG11 illustrates that when the SNR (Signal-to-noise ratio) is 30 dB, the reader sends M first messages, and the receiving strength of each message measured by the tag (i.e., the tag receiving signal strength indicated by the solid line passing through the circle pattern in FIG11) is basically the same as the estimated value of each receiving strength of the tag estimated by the reader (indicated by the dotted line passing through the cross pattern in FIG11). FIG12 illustrates that when the SNR is 30 dB, when the reader sends M first messages, the receiving strength of each message measured by the tag (i.e., the tag receiving signal strength indicated by the solid line passing through the circle pattern in FIG12) is very different from the receiving signal strength of each message obtained by the eavesdropper (indicated by the dotted line passing through the cross pattern in FIG12). In the simulation experiment, as the SNR is adjusted and tested, it can be found that with the increase of SNR, the consistency of the estimated values ​​of the tag's receiving strength estimated by the reader and the receiving strength of each message measured by the tag also increases. When the signal-to-noise ratio is 50dB, the estimated values ​​of the tag's receiving strength estimated by the reader and the receiving strength of each message measured by the tag are almost completely consistent, that is, the reader and the tag can extract consistent keys and verification keys; and with the increase of SNR, since the eavesdropper and the tag pass through different channels, the estimated values ​​of the receiving strength obtained by the eavesdropper and the receiving strength of each message measured by the tag are almost completely different, so the eavesdropper cannot obtain a pairwise key consistent with the tag. The key bit error rate is defined as the ratio of the number of different bits in the shared key of both parties to the total number of bits extracted in the quantization stage. FIG. 13 shows the relationship between the key bit error rate and the signal-to-noise ratio under different schemes. It can be seen that the quantization scheme of this embodiment is significantly better than other quantization schemes. Specifically, when the signal-to-noise ratio is greater than 30 dB, the quantization scheme of this embodiment makes the key bit error rate as low as 0.0078, that is, the key (and verification key) consistency rate of both the reader and the tag can reach more than 99.7%; while the absolute value quantization scheme needs to be at 40 dB to reach the order of 99.7%; under the non-negotiated quantization scheme, the key bit error rate is also required to be as low as 0.0078 when the signal-to-noise ratio is nearly 60, that is, the key (and verification key) consistency rate of both the reader and the tag can reach more than 99.7%. In addition, it can be seen from FIG. 13 that the quantization scheme of this embodiment can make the key bit error rate of the eavesdropper around 0.46, indicating that the eavesdropper can hardly obtain any key information. In the solution provided by this embodiment, the first device enables multiple second devices to generate their own keys by sending multiple first messages, and then receives multiple second messages, each of which is related to the key of the corresponding second device. Then the first device can send multiple third messages, and different third messages are used for different second devices to determine the group key. In this way, the first device and multiple second devices can share private information based on the group key, which not only ensures security, but also improves the efficiency of sharing private information between the first device and multiple second devices and / or between multiple second devices, filling the gap in related technologies. Finally, the effect of the key generation method provided in the embodiment above is described in combination with related technologies: There are two main research directions for the key of zero-power communication systems. One is based on the upper-layer key protocol research. However, due to the weak capabilities of zero-power devices, they can only afford key protocols with low complexity, such as random number generators, lightweight protocols of the National Institute of Standards and Technology (NIST), and encryption algorithms with low complexity such as XOR. Therefore, this upper-layer key protocol is easily cracked by attackers with high computing power. For example, attackers with strong computing power can intercept the transmitted key material and use the exhaustive method to calculate the shared key. Another key research direction is to sink the security mechanism to the physical layer, use the randomness and reciprocity of wireless channel characteristics to generate shared keys, and provide encryption protection that does not rely on computational complexity. The classic physical layer key generation method mainly includes four stages: channel feature extraction, channel feature quantification, consensus negotiation, and privacy enhancement. The parameters of channel feature extraction include received signal strength, channel impulse response, channel frequency response, etc. However, since the received signal strength is easy to measure and has low hardware requirements, the physical layer key generation of zero-power devices mostly uses the received signal strength for measurement. However, due to signal noise, attenuation during signal propagation and other reasons, there is a deviation in the received signal strength values ​​observed between the reader and the zero-power device, which leads to a high key inconsistency rate; in addition, the research on physical layer keys of zero-power systems only focuses on the generation of pairwise keys between two legitimate devices, but does not consider group key research. For example, in smart meters, in order to share confidential information among users in a specific group, it is necessary to generate group keys for a group of IoT devices. In the key generation method provided in this embodiment, during the key generation stage of any second device, the first device transmits a continuous carrier (i.e., multiple first messages) with random power, and the power is only known to the first device side; any second device modulates the signal on the message and transmits it to the first device. Since the channel has short-time reciprocity, the first device and any second device can obtain a consistent key and a verification key pair. Since the eavesdropper uses a different channel from the first device and any second device, the eavesdropper cannot obtain the key, thereby ensuring the security of the key pair between the first device and any second device. In addition, due to signal noise, attenuation during signal propagation, etc., there is a deviation in the received signal strength value observed between the first device and any second device. In the solution provided in this embodiment, the first device and any second device both use a multi-level quantization method, so these deviations can be corrected, thereby reducing the pairwise key inconsistency rate. In the key generation and distribution stage of the key generation method provided in this embodiment, the first device generates the group key by using a self-combining cross-bit operation or a matrix eigenvalue or a matrix singular value, and then obtains the group key calculation information based on the group key, and transmits the group key calculation information to the The broadcast is sent to multiple second devices; since the group key calculation information is generated based on the verification keys and group keys of different second devices, the eavesdropper cannot obtain the key of any second device, and thus the eavesdropper cannot correctly parse the group key. The processing flow of the key generation method provided in this embodiment is implemented using the zero-power system signaling interaction process in the relevant technology, and there is no need to make major changes to the existing standard signaling process, so it has high compatibility. In addition, since the key generation method provided in this embodiment only needs to complete received signal strength measurement, quantization, simple XOR and other operations at any second device (i.e., zero-power device), the processing with large computational complexity is placed on the first device (such as a reader / writer), so it has the advantage of low computational complexity on the zero-power device side. In addition, the key of any second device does not need to undergo multiple information negotiations, which also reduces the signaling interaction overhead of the second device and has the advantage of low power consumption. FIG14 is a schematic diagram of the composition structure of a first device according to an embodiment of the present application, including: The first communication unit 1401 is used to send multiple first messages to multiple second devices, different first messages in the multiple first messages occupy different time domain ranges, and the multiple first messages are used to generate keys for the multiple second devices; receive multiple second messages sent by the multiple second devices, different second messages in the multiple second messages are related to the keys of different second devices; send multiple third messages to the multiple second devices, different third messages in the multiple third messages are used for different second devices to determine group keys. The first device also includes: a first processing unit 1402, which is used to determine the verification key of each second device in the multiple second devices based on the multiple second messages; when it is determined that the verification key of each second device is consistent with the key, the first device generates the group key based on the verification key of each second device. The first processing unit is configured to obtain a plurality of keys to be calculated based on the verification key of each second device; and perform XOR calculation on the plurality of keys to be calculated to generate the group key. The first processing unit is used to adjust at least some bits in the verification key of the target second device based on a preset algorithm to obtain a target key to be calculated, the target second device is one of the multiple second devices, and the target key to be calculated is one of the multiple keys to be calculated. The preset algorithm is a self-combining cross-bit operation. The first processing unit is used to obtain multiple groups of key elements for each second device based on the verification key of each second device; generate an initial matrix based on the multiple groups of key elements for each second device; and generate the group key based on the initial matrix. The first processing unit is used to convert the multiple groups of key elements of each second device into multiple numerical values, and generate the initial matrix based on the multiple numerical values ​​corresponding to each second device. The first processing unit is configured to perform one of the following: Based on the initial matrix, one or more sub-matrices are obtained, an eigenvalue of each of the one or more sub-matrices is determined, the eigenvalue of each sub-matrix is ​​quantified, and the group key is generated; The initial matrix is ​​subjected to singular value decomposition to obtain a plurality of singular values ​​of the initial matrix, and the plurality of singular values ​​are quantized to generate the group key. The target third message among the multiple third messages includes group key calculation information of the target second device; the target second device is one of the multiple second devices, and the group key calculation information of the target second device is obtained by performing an XOR calculation based on the verification key of the target second device and the group key. The first device also includes: a first processing unit, used to generate a random sequence at the time of group key update; obtain a first updated group key based on the random sequence and the group key; the first communication unit, used to send multiple first update information to the multiple second devices, different first update information among the multiple first update information are used for different second devices to determine the first updated group key. The first device also includes: a first processing unit, which is used to, when it is determined that a third device is newly added, receive a fifth message sent by the third device by the first device, and the fifth message is related to the key of the third device; based on the fifth message, determine the verification key of the third device; when it is determined that the verification key of the third device is consistent with the key of the third device, generate a second update group key based on the verification keys of the multiple second devices and the verification key of the third device; the first communication unit is used to send multiple second update information to the multiple second devices and the third device, and different second update information among the multiple second update information is used for the third device and different devices among the multiple second devices to determine the second update group key. The first processing unit is configured to determine to add the third device upon receiving first indication information, wherein the first indication information is used to indicate to add the third device to a device group consisting of a plurality of second devices. The first device also includes: a first processing unit, which is used to generate a third update group key based on the verification key of each second device in the multiple second devices except the hth second device in the multiple second devices when it is determined to delete the hth second device among the multiple second devices, where h is a positive integer; and the first communication unit, which is used to send multiple third update information to the multiple second devices except the hth second device in the multiple second devices, and the multiple third update information is used for different second devices in the multiple second devices except the hth second device to determine the third update group key. The first processing unit is used to determine to delete the h-th second device from the plurality of second devices when receiving the second indication information, wherein the second indication information is used to indicate to delete the h-th second device from the device group composed of the plurality of second devices. delete. The target second message among the multiple second messages also includes multiple quantization offsets of a target second device, and the target second device is one of the multiple second devices; the first processing unit is used to obtain a target path loss value based on the reception strength of the target second message, and the target path loss value is the path loss value between the first device and the target second device; based on the target path loss value and the transmission strength of the multiple first messages, multiple reception strength estimation values ​​of the target second device are obtained, and the multiple reception strength estimation values ​​include a reception strength estimation value of each first message in the multiple first messages received by the target second device; based on the multiple reception strength estimation values ​​of the target second device and the multiple quantization offsets of the target second device, a verification key of the target second device is obtained. The first processing unit is used to obtain a target average strength estimate value based on multiple reception strength estimate values ​​of the target second device; generate multiple processed strength values ​​based on the target average strength estimate value and multiple reception strength estimate values ​​of the target second device; obtain multiple quantization reference estimate values ​​based on the processed multiple strength values ​​and multiple quantization offsets of the target second device; and perform quantization processing on the multiple quantization reference estimate values ​​to obtain a verification key for the target second device. When different second messages among the multiple second messages have different starting sending times and / or different second messages occupy different frequency domain ranges, the receiving strength of the target second message is measured by the first device; Alternatively, when the starting sending times of different second messages among the multiple second messages are the same and the frequency domain ranges occupied by different second messages are the same, the receiving strength of the target second message is determined by the first device based on a self-interference elimination SIC method. The transmission power of each first message in the multiple first messages is a random transmission power. The first communication unit is used to send a fourth message to the multiple second devices, and the fourth message includes: the number of first messages used to generate a key and a timing parameter, and the timing parameter is used for each second device in the multiple second devices to determine the starting time of sending the second message. The starting sending time of the target second message among the multiple second messages is the time when the count value of the target counter of the target second device is zero; the target second device is one of the multiple second devices, and the count value of the target counter is reduced when the target second device receives one of the multiple first messages, and the maximum value of the count value of the target counter is determined based on the timing parameters. The maximum value of the count value of the target counter is determined by the target second device based on the timing parameter and the number of first messages used to generate the key. The timing parameter includes a specified count value; the maximum count value of the target counter is the specified count value. The first device is a first terminal or a first network device; the second device is a zero-power consumption device. FIG. 15 is a schematic diagram of a structure of a target second device according to an embodiment of the present application, including: The second communication unit 1501 is used to receive multiple first messages sent by a first device, where different first messages in the multiple first messages occupy different time domain ranges; send a target second message to the first device, where the target second message is related to the key of the target second device, where the target second device is one of multiple second devices, and the key of the target second device is generated based on the multiple first messages; receive a target third message sent by the first device, where the target third message is used by the target second device to determine a group key. The target third message includes: group key calculation information of the target second device; the second device also includes: a second processing unit 1502, which is used to perform an XOR calculation based on the group key calculation information of the target second device and the key of the target second device to obtain the group key. The second device also includes: a second processing unit, which is used to obtain the first updated group key based on the target first update calculation information and the key of the target second device when the target first update information sent by the first device is received through the second communication unit. The target first update information is generated by the first device at the group key update time, and the target first update information includes the target first update calculation information of the target second device. The second device also includes: a second processing unit, which is used to obtain a second update group key based on the target second update information sent by the first device when the target second update information is received through the second communication unit, and the target second update information is sent when a third device is added to a device group consisting of multiple second devices, and the target second update information is used by the target second device to determine the second update group key. The second device also includes: a second processing unit, which is used to obtain a third update group key based on the target third update information sent by the first device when the target third update information is received through the second communication unit, wherein the target third update information is sent when the hth second device is deleted from the device group composed of the multiple second devices, and the target third update information is used by the target second device to determine the third update group key; h is a positive integer. The second device further includes: a second processing unit, configured to generate a key of the target second device based on the reception strength of each first message in the plurality of first messages. The second processing unit is used to obtain an average receiving strength based on the receiving strength of each first message in the multiple first messages; Based on the average receiving strength and the receiving strength of each first message, multiple processed signal strengths are obtained; based on the multiple processed signal strengths, multiple quantized reference values ​​are obtained; the multiple quantized reference values ​​are quantized to generate a key for the target second device. The target second message also includes: multiple quantization offsets of the target second device; and the second processing unit is used to obtain the multiple quantization offsets of the target second device based on the multiple quantization reference values ​​and the multiple processed signal strengths. The second communication unit is used to receive a fourth message sent by the first device, and the fourth message includes: the number of first messages used to generate a key and a timing parameter, and the timing parameter is used to determine the starting time of sending the target second message. The starting sending time of the target second message is the time when the count value of the target counter of the target second device is zero, and the count value of the target counter decreases when the target second device receives one of the multiple first messages; the maximum value of the count value of the target counter is determined based on the timing parameters. The maximum value of the count value of the target counter is determined by the target second device based on the timing parameter and the number of first messages used to generate the key. The timing parameter includes a specified count value; the maximum count value of the target counter is the specified count value. The target second device is a zero-power consumption device. The first device and the target second device of the embodiment of the present application can realize the corresponding functions of the first device and the target second device in the aforementioned key generation method embodiment. The processes, functions, implementation methods and beneficial effects corresponding to the various modules (submodules, units or components, etc.) in the first device and the target second device can be found in the corresponding description in the above method embodiment, which will not be repeated here. It should be noted that the functions described in the first device and the target second device of the embodiment of the application can be implemented by different modules (submodules, units or components, etc.), or by the same module (submodule, unit or component, etc.). FIG16 is a schematic structural diagram of a communication device 1600 according to an embodiment of the present application. The communication device 1600 includes a processor 1610, and the processor 1610 can call and run a computer program from a memory so that the communication device 1600 implements the method in the embodiment of the present application. In a possible implementation, the communication device 1600 may also include a memory 1620. Among them, the processor 1610 can call and run a computer program from the memory 1620 so that the communication device 1600 implements the method in the embodiment of the present application. Among them, the memory 1620 may be a separate device independent of the processor 1610, or it may be integrated in the processor 1610. In a possible implementation, the communication device 1600 may also include a transceiver 1630, and the processor 1610 may control the transceiver 1630 to communicate with other devices, specifically, it may send information or data to other devices, or receive information or data sent by other devices. Among them, the transceiver 1630 may include a transmitter and a receiver. The transceiver 1630 may further include an antenna, and the number of antennas may be one or more. In a possible implementation, the communication device 1600 may be the first device of the embodiment of the present application, and the communication device 1600 may implement the corresponding process implemented by the first device in each method of the embodiment of the present application, and for the sake of brevity, it is not repeated here. In a possible implementation, the communication device 1600 may be the target second device of the embodiment of the present application, and the communication device 1600 may implement the corresponding process implemented by the target second device in each method of the embodiment of the present application, and for the sake of brevity, it is not repeated here. FIG17 is a schematic structural diagram of a chip 1700 according to an embodiment of the present application. The chip 1700 includes a processor 1710, which can call and run a computer program from a memory to implement the method in the embodiment of the present application. In a possible implementation, the chip 1700 may also include a memory 1720. Among them, the processor 1710 can call and run a computer program from the memory 1720 to implement the method performed by the first device or the target second device in the embodiment of the present application. Among them, the memory 1720 can be a separate device independent of the processor 1710, or it can be integrated in the processor 1710. In a possible implementation, the chip 1700 may also include an input interface 1730. Among them, the processor 1710 can control the input interface 1730 to communicate with other devices or chips, specifically, it can obtain information or data sent by other devices or chips. In a possible implementation, the chip 1700 may also include an output interface 1740. The processor 1710 may control the output interface 1740 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips. In one possible implementation, the chip can be applied to the first device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the first device in each method of the embodiment of the present application, which will not be described in detail here for the sake of brevity. In one possible implementation, the chip can be applied to the target second device in the embodiment of the present application, and the chip can implement the corresponding process implemented by the target second device in each method of the embodiment of the present application, which will not be described in detail here for the sake of brevity. The chips applied to the first device and the target second device can be the same chip or different chips. It should be understood that the chip mentioned in the embodiment of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc. The processor mentioned above can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), a field programmable gate array (field programmable gate array, FPGA), an application specific integrated circuit (application specific integrated circuit, ASIC) or other programmable logic devices, transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor mentioned above can be a microprocessor or any conventional processor, etc. The memory mentioned above can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) Or flash memory. The volatile memory may be a random access memory (RAM). It should be understood that the above memory is exemplary but not restrictive. For example, the memory in the embodiment of the present application may also be a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DR RAM). In other words, the memory in the embodiment of the present application is intended to include but is not limited to these and any other suitable types of memory. FIG18 is a schematic block diagram of a communication system 1800 according to an embodiment of the present application. The communication system 1800 includes a first device 1810 and a target second device 1820. The first device 1810 can be used to implement the corresponding function implemented by the first device in the above method. The target second device 1820 can be used to implement the corresponding function implemented by the target second device in the above method. For the sake of brevity, it will not be repeated here. In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)). It should be understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claim.

Claims

1. A key generation method, include: A first device sends a plurality of first messages to a plurality of second devices, wherein different first messages in the plurality of first messages occupy different time domain ranges, and the plurality of first messages are used for the plurality of second devices to generate keys; The first device receives a plurality of second messages sent by the plurality of second devices, where different second messages in the plurality of second messages are related to keys of different second devices; The first device sends a plurality of third messages to the plurality of second devices, and different third messages in the plurality of third messages are used for different second devices to determine a group key.

2. The method according to claim 1, in, The method further comprises: The first device determines, based on the multiple second messages, a verification key for each second device in the multiple second devices; In a case where it is determined that the verification key of each second device is consistent with the key, the first device generates the group key based on the verification key of each second device.

3. The method according to claim 2, in, The first device generates the group key based on the verification key of each second device, including: The first device obtains a plurality of keys to be calculated based on the verification key of each second device; The first device performs an XOR calculation on the multiple keys to be calculated to generate the group key.

4. The method according to claim 3, in, The first device obtains a plurality of keys to be calculated based on the verification key of each second device, including: The first device adjusts at least some bits in the verification key of the target second device based on a preset algorithm to obtain a target key to be calculated, the target second device is one of the multiple second devices, and the target key to be calculated is one of the multiple keys to be calculated.

5. The method according to claim 4, in, The preset algorithm is a self-combining cross-bit operation.

6. The method according to claim 2, in, The first device generates the group key based on the verification key of each second device, including: The first device obtains multiple groups of key elements of each second device based on the verification key of each second device; The first device generates an initial matrix based on the multiple groups of key elements of each second device; The first device generates the group key based on the initial matrix.

7. The method according to claim 6, in, The first device generates an initial matrix based on the multiple groups of key elements of each second device, including: The first device converts the multiple groups of key elements of each second device into multiple numerical values, and generates the initial matrix based on the multiple numerical values ​​corresponding to each second device.

8. The method according to claim 7, in, The first device generates the group key based on the initial matrix, including one of the following: The first device obtains one or more sub-matrices based on the initial matrix, determines an eigenvalue of each of the one or more sub-matrices, quantizes the eigenvalue of each sub-matrix, and generates the group key; The first device performs singular value decomposition on the initial matrix to obtain multiple singular values ​​of the initial matrix, quantizes the multiple singular values, and generates the group key.

9. The method according to any one of claims 1 to 8, in, The target third message among the multiple third messages includes: group key calculation information of the target second device, the target second device is one of the multiple second devices, and the group key calculation information of the target second device is obtained by performing XOR calculation based on the verification key of the target second device and the group key.

10. The method according to any one of claims 1 to 9, in, The method further comprises: The first device generates a random sequence at the group key update time; The first device obtains a first updated group key based on the random sequence and the group key; The first device sends a plurality of first update messages to the plurality of second devices, and different first update messages among the plurality of first update messages are used by different second devices to determine the first update group key.

11. The method according to any one of claims 1 to 9, in, The method further comprises: When the first device determines that a third device is newly added, the first device receives a fifth message sent by the third device, where the fifth message is related to a key of the third device; The first device determines a verification key of the third device based on the fifth message; When it is determined that the verification key of the third device is consistent with the key of the third device, the first device generates a second update group key based on the verification keys of the plurality of second devices and the verification key of the third device; The first device sends a plurality of second update information to the plurality of second devices and the third device, wherein the plurality of second update information The different second update information in the information is used for the third device and different devices among the plurality of second devices to determine the second update group key.

12. The method according to claim 11, in, The method further comprises: The first device determines to add the third device when receiving the first indication information, where the first indication information is used to indicate that the third device is added to a device group consisting of multiple second devices.

13. The method according to any one of claims 1 to 9, in, The method further comprises: When the first device determines to delete the h-th second device among the multiple second devices, the first device generates a third update group key based on the verification key of each second device among the multiple second devices except the h-th second device among the multiple second devices, where h is a positive integer; The first device sends multiple third update information to multiple second devices among the multiple second devices except the hth second device, and the multiple third update information is used for different second devices among the multiple second devices except the hth second device to determine the third update group key.

14. The method according to claim 13, in, The method further comprises: The first device determines to delete the h-th second device among the multiple second devices when receiving the second indication information, where the second indication information is used to indicate that the h-th second device is to be deleted from the device group consisting of the multiple second devices.

15. The method according to any one of claims 2 to 8, in, The target second message in the plurality of second messages further includes a plurality of quantized offsets of a target second device, the target second device being one of the plurality of second devices; The first device determines, based on the multiple second messages, a verification key for each second device in the multiple second devices, including: The first device obtains a target path loss value based on the reception strength of the target second message, where the target path loss value is a path loss value between the first device and the target second device; The first device obtains a plurality of reception strength estimation values ​​of the target second device based on the target path loss value and the transmission strength of the plurality of first messages, wherein the plurality of reception strength estimation values ​​include a reception strength estimation value of each first message in the plurality of first messages received by the target second device; The first device obtains a verification key of the target second device based on a plurality of reception strength estimation values ​​of the target second device and a plurality of quantization offsets of the target second device.

16. The method according to claim 15, in, The first device obtains a verification key of the target second device based on multiple reception strength estimation values ​​of the target second device and multiple quantization offsets of the target second device, including: The first device obtains a target average strength estimation value based on a plurality of reception strength estimation values ​​of the target second device; The first device generates a plurality of processed strength values ​​based on the target average strength estimate value and a plurality of reception strength estimate values ​​of the target second device; The first device obtains a plurality of quantized reference estimation values ​​based on the processed plurality of intensity values ​​and the plurality of quantized offsets of the target second device; The first device performs quantization processing on the multiple quantization reference estimation values ​​to obtain a verification key of the target second device.

17. The method according to claim 15 or 16, in, When different second messages among the multiple second messages have different starting sending times and / or different second messages occupy different frequency domain ranges, the receiving strength of the target second message is measured by the first device; Alternatively, when the starting sending times of different second messages among the multiple second messages are the same and the frequency domain ranges occupied by different second messages are the same, the receiving strength of the target second message is determined by the first device based on a self-interference elimination SIC method.

18. The method according to any one of claims 1 to 17, in, The transmission power of each first message in the multiple first messages is a random transmission power.

19. The method according to any one of claims 1 to 18, in, The method further comprises: The first device sends a fourth message to the multiple second devices, where the fourth message includes: the number of first messages used to generate a key, and a timing parameter, where the timing parameter is used for each second device in the multiple second devices to determine a start time for sending a second message.

20. The method according to claim 19, in, The starting sending time of the target second message among the multiple second messages is the time when the count value of the target counter of the target second device is zero. The target second device is one of the multiple second devices. The count value of the target counter is reduced when the target second device receives one of the multiple first messages. The maximum value of the count value of the target counter is determined based on the timing parameters.

21. The method according to claim 20, in, The maximum value of the count value of the target counter is determined by the target second device based on the timing parameter and the number of first messages used to generate the key.

22. The method according to claim 20, in, The timing parameter includes a specified count value; the maximum count value of the target counter is the specified count value.

23. The method according to any one of claims 1 to 22, in, The first device is a first terminal or a first network device; the second device is a zero-power consumption device.

24. A method for generating a key, include: The target second device receives multiple first messages sent by the first device, where different first messages in the multiple first messages occupy different time domain ranges; The target second device sends a target second message to the first device, the target second message is related to the key of the target second device, the target second device is one of a plurality of second devices, and the key of the target second device is generated based on the plurality of first messages; The target second device receives a target third message sent by the first device, where the target third message is used by the target second device to determine a group key.

25. The method according to claim 24, in, The target third message includes group key calculation information of the target second device; the method further includes: the target second device performs an XOR calculation based on the group key calculation information of the target second device and the key of the target second device to obtain the group key.

26. The method according to claim 24 or 25, in, The method further comprises: When the target second device receives the target first update information sent by the first device, the target second device performs an XOR calculation based on the target first update calculation information and the key of the target second device to obtain the first updated group key, the target first update information is generated by the first device at the group key update time, and the target first update information includes the target first update calculation information of the target second device.

27. The method according to claim 24 or 25, in, The method further comprises: When the target second device receives the target second update information sent by the first device, the target second device obtains the second update group key based on the target second update information, where the target second update information is sent when a third device is added to a device group consisting of multiple second devices, and the target second update information is used by the target second device to determine the second update group key.

28. The method according to claim 24 or 25, in, The method further comprises: When the target second device receives the target third update information sent by the first device, the target second device obtains the third update group key based on the target third update information, wherein the target third update information is sent when the hth second device is deleted from the device group consisting of the multiple second devices, and the target third update information is used by the target second device to determine the third update group key, where h is a positive integer.

29. The method according to claim 24, in, The method further comprises: The target second device generates a key of the target second device based on a reception strength of each of the plurality of first messages.

30. The method according to claim 29, in, The target second device generates a key of the target second device based on the reception strength of each first message in the plurality of first messages, including: The target second device obtains an average receiving strength based on the receiving strength of each first message in the plurality of first messages; The target second device obtains multiple processed signal strengths based on the average reception strength and the reception strength of each first message; the target second device obtains multiple quantization reference values ​​based on the multiple processed signal strengths; the target second device quantizes the multiple quantization reference values ​​to generate a key for the target second device.

31. The method according to claim 30, in, The target second message also includes multiple quantization offsets of the target second device; the method also includes: the target second device obtains the multiple quantization offsets of the target second device based on the multiple quantization reference values ​​and the multiple processed signal strengths.

32. The method according to any one of claims 24 to 31, in, The method further comprises: The target second device receives a fourth message sent by the first device, where the fourth message includes: the number of first messages used to generate a key and a timing parameter, where the timing parameter is used to determine a start time of sending the target second message.

33. The method according to claim 32, in, The starting sending time of the target second message is the time when the count value of the target counter of the target second device is zero. The count value of the target counter decreases when the target second device receives one of the multiple first messages. The maximum value of the count value of the target counter is determined based on the timing parameters.

34. The method according to claim 33, in, The maximum value of the count value of the target counter is determined by the target second device based on the timing parameter and the number of first messages used to generate the key.

35. The method according to claim 33, in, The timing parameter includes a specified count value; the maximum count value of the target counter is the specified count value.

36. The method according to any one of claims 24 to 35, in, The target second device is a zero-power consumption device.

37. A first device, include: A first communication unit, configured to send a plurality of first messages to a plurality of second devices, wherein different first messages in the plurality of first messages occupy different time domain ranges, and the plurality of first messages are used for the plurality of second devices to generate keys; Receive multiple second devices sent The method further comprises: sending a plurality of second messages, wherein different second messages among the plurality of second messages are related to keys of different second devices; and sending a plurality of third messages to the plurality of second devices, wherein different third messages among the plurality of third messages are used for different second devices to determine the group key.

38. The first device according to claim 37, in, The first device also includes: The first processing unit is used to determine the verification key of each second device among the multiple second devices based on the multiple second messages; when it is determined that the verification key of each second device is consistent with the key, the first device generates the group key based on the verification key of each second device.

39. The first device according to claim 38, in, The first processing unit is configured to obtain a plurality of keys to be calculated based on the verification key of each second device; and perform XOR calculation on the plurality of keys to be calculated to generate the group key.

40. The first device according to claim 39, in, The first processing unit is used to adjust at least some bits in the verification key of the target second device based on a preset algorithm to obtain a target key to be calculated, the target second device is one of the multiple second devices, and the target key to be calculated is one of the multiple keys to be calculated.

41. The first device according to claim 40, in, The preset algorithm is a self-combining cross-bit operation.

42. The first device according to claim 38, in, The first processing unit is configured to obtain multiple groups of key elements of each second device based on the verification key of each second device; and generate an initial matrix based on the multiple groups of key elements of each second device; Based on the initial matrix, the group key is generated.

43. The first device according to claim 42, in, The first processing unit is used to convert the multiple groups of key elements of each second device into multiple numerical values, and generate the initial matrix based on the multiple numerical values ​​corresponding to each second device.

44. The first device according to claim 43, in, The first processing unit is configured to perform one of the following: Based on the initial matrix, one or more sub-matrices are obtained, an eigenvalue of each of the one or more sub-matrices is determined, the eigenvalue of each sub-matrix is ​​quantified, and the group key is generated; The initial matrix is ​​subjected to singular value decomposition to obtain a plurality of singular values ​​of the initial matrix, and the plurality of singular values ​​are quantized to generate the group key.

45. A first device according to any one of claims 37 to 44, in, The target third message among the multiple third messages includes group key calculation information of a target second device, where the target second device is one of the multiple second devices, and the group key calculation information of the target second device is obtained by performing an XOR calculation based on the verification key of the target second device and the group key.

46. ​​A first device according to any one of claims 37 to 45, in, The first device also includes: A first processing unit is configured to generate a random sequence at a group key update time; and obtain a first updated group key based on the random sequence and the group key; The first communication unit is used to send multiple first update information to the multiple second devices, and different first update information in the multiple first update information is used for different second devices to determine the first update group key.

47. A first device according to any one of claims 37 to 46, in, The first device also includes: A first processing unit is configured to, when it is determined that a third device is newly added, receive, by the first device, a fifth message sent by the third device, the fifth message being related to the key of the third device; determine, based on the fifth message, a verification key of the third device; and, when it is determined that the verification key of the third device is consistent with the key of the third device, generate a second update group key based on the verification keys of the plurality of second devices and the verification key of the third device; The first communication unit is used to send multiple second update information to the multiple second devices and the third device, and different second update information among the multiple second update information is used for the third device and different devices among the multiple second devices to determine the second update group key.

48. The first device according to claim 47, in, The first processing unit is configured to determine to add the third device upon receiving first indication information, wherein the first indication information is used to indicate to add the third device to a device group consisting of a plurality of second devices.

49. A first device according to any one of claims 37 to 46, in, The first device also includes: a first processing unit, configured to, when it is determined to delete an h-th second device among the multiple second devices, generate, by the first device, a third update group key based on a verification key of each second device among the multiple second devices except the h-th second device among the multiple second devices, where h is a positive integer; The first communication unit is used to send multiple third update information to multiple second devices among the multiple second devices except the hth second device, and the multiple third update information is used for different second devices among the multiple second devices except the hth second device to determine the third update group key.

50. The first device according to claim 49, in, The first processing unit is configured to determine to delete the hth second device among the multiple second devices upon receiving second indication information, wherein the second indication information is used to indicate that the hth second device is to be deleted from the device group consisting of the multiple second devices.

51. A first device according to any one of claims 38 to 44, in, The target second message in the plurality of second messages further includes a plurality of quantized offsets of a target second device, the target second device being one of the plurality of second devices; The first processing unit is configured to obtain a target path loss value based on a reception strength of the target second message, where the target path loss value is a path loss value between the first device and the target second device; Based on the target path loss value and the transmission strength of the multiple first messages, obtain multiple reception strength estimation values ​​of the target second device, wherein the multiple reception strength estimation values ​​include a reception strength estimation value of each first message in the multiple first messages received by the target second device; A verification key of the target second device is obtained based on a plurality of reception strength estimation values ​​of the target second device and a plurality of quantization offsets of the target second device.

52. The first device according to claim 51, in, The first processing unit is configured to obtain a target average strength estimation value based on a plurality of reception strength estimation values ​​of the target second device; generating a plurality of processed strength values ​​based on the target average strength estimate value and a plurality of reception strength estimate values ​​of the target second device; Based on the processed multiple intensity values ​​and the multiple quantized offsets of the target second device, a plurality of quantized reference estimation values ​​are obtained; The multiple quantized reference estimation values ​​are quantized to obtain a verification key of the target second device.

53. A first device according to claim 51 or 52, in, When different second messages among the multiple second messages have different starting sending times and / or different second messages occupy different frequency domain ranges, the receiving strength of the target second message is obtained by measurement; Alternatively, when the starting sending times of different second messages among the multiple second messages are the same and the frequency domain ranges occupied by the different second messages are the same, the receiving strength of the target second message is determined based on a self-interference cancellation SIC method.

54. A first device according to any one of claims 37 to 53, in, The transmission power of each first message in the multiple first messages is a random transmission power.

55. A first device according to any one of claims 37 to 54, in, The first communication unit is used to send a fourth message to the multiple second devices, and the fourth message includes: the number of first messages used to generate a key and a timing parameter, and the timing parameter is used for each second device in the multiple second devices to determine the starting time of sending the second message.

56. The first device according to claim 55, in, The starting sending time of the target second message among the multiple second messages is the time when the count value of the target counter of the target second device is zero. The target second device is one of the multiple second devices. The count value of the target counter is reduced when the target second device receives one of the multiple first messages. The maximum value of the count value of the target counter is determined based on the timing parameters.

57. The first device according to claim 56, in, The maximum value of the count value of the target counter is determined by the target second device based on the timing parameter and the number of first messages used to generate the key.

58. The first device according to claim 56, in, The timing parameter includes a specified count value; the maximum count value of the target counter is the specified count value.

59. A first device according to any one of claims 37 to 58, in, The first device is a first terminal or a first network device; the second device is a zero-power consumption device.

60. A target second device, include: A second communication unit is used to receive multiple first messages sent by the first device, where different first messages in the multiple first messages occupy different time domain ranges; A target second message is sent to the first device, where the target second message is related to the key of the target second device, the target second device is one of multiple second devices, and the key of the target second device is generated based on the multiple first messages; and a target third message is received from the first device, where the target third message is used for the target second device to determine the group key.

61. The target second device according to claim 60, in, The target third message includes group key calculation information of the target second device; The second device further includes: a second processing unit, configured to perform an XOR calculation based on the group key calculation information of the target second device and the key of the target second device to obtain the group key.

62. The target second device according to claim 60 or 61, in, The second device also includes: A second processing unit is used to obtain the first updated group key by performing an XOR calculation based on the target first updated calculation information and the key of the target second device when the target first update information sent by the first device is received through the second communication unit. The target first update information is generated by the first device at the group key update time, and the target first update information includes the target first updated calculation information of the target second device.

63. The target second device according to claim 60 or 61, in, The second device also includes: A second processing unit is used to obtain a second update group key based on the target second update information sent by the first device when the target second update information is received through the second communication unit, wherein the target second update information is sent when a third device is added to a device group consisting of multiple second devices, and the target second update information is used by the target second device to determine the second update group key.

64. The target second device according to claim 60 or 61, in, The second device also includes: a second processing unit, configured to obtain a third update group key based on the target third update information when receiving the target third update information sent by the first device through the second communication unit, wherein the target third update information is a third update group key obtained by replacing the h-th second device with the target third update information. The target third update information is sent when the target second device is deleted from the device group composed of multiple second devices, the target third update information is used by the target second device to determine the third update group key, and h is a positive integer.

65. The target second device according to claim 60, in, The second device also includes: The second processing unit is configured to generate a key of the target second device based on the reception strength of each first message in the plurality of first messages.

66. The target second device according to claim 65, in, The second processing unit is used to obtain an average receiving strength based on the receiving strength of each first message in the multiple first messages; Based on the average reception strength and the reception strength of each first message, a plurality of processed signal strengths are obtained; Based on the multiple processed signal intensities, obtaining multiple quantitative reference values; The multiple quantization reference values ​​are quantized to generate a key of the target second device.

67. The target second device according to claim 66, in, The target second message also includes multiple quantization offsets of the target second device; the second processing unit is used to obtain the multiple quantization offsets of the target second device based on the multiple quantization reference values ​​and the multiple processed signal strengths.

68. The target second device according to any one of claims 65 to 67, in, The second communication unit is used to receive a fourth message sent by the first device, and the fourth message includes: the number of first messages used to generate a key and a timing parameter, and the timing parameter is used to determine the starting time of sending the target second message.

69. The target second device according to claim 68, in, The starting sending time of the target second message is the time when the count value of the target counter of the target second device is zero; wherein the count value of the target counter is reduced when the target second device receives one of multiple first messages; the maximum value of the count value of the target counter is determined based on the timing parameters.

70. The target second device according to claim 69, in, The maximum value of the count value of the target counter is determined by the target second device based on the timing parameter and the number of first messages used to generate the key.

71. The target second device according to claim 69, in, The timing parameter includes a specified count value; the maximum count value of the target counter is the specified count value.

72. The target second device according to any one of claims 60 to 71, in, The target second device is a zero-power consumption device.

73. A first device, include: A transceiver, a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, so that the first device executes the method as claimed in any one of claims 1 to 23.

74. A target second device, include: A transceiver, a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory so that the second device executes the method as claimed in any one of claims 24 to 36.

75. A chip, include: A processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes a method as claimed in any one of claims 1 to 23 or claims 24 to 36.

76. A computer-readable storage medium for storing a computer program, which, when executed by a device, causes the device to perform the method according to any one of claims 1 to 23 or claims 24 to 36.

77. A computer program product comprising computer program instructions, the computer program instructions causing a computer to perform the method of any one of claims 1 to 23 or claims 24 to 36.

78. A computer program causing a computer to perform the method of any one of claims 1 to 23 or claims 24 to 36.