Patent Publication Number: US-2023164823-A1

Title: Channel Resource Allocation Method and Apparatus

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is a continuation application of U.S. patent application Ser. No. 16/773,453, filed on Jan. 27, 2020, which is a continuation of International Patent Application No. PCT/CN2017/094278, filed on Jul. 25, 2017. Both of the aforementioned applications are hereby incorporated by reference in their entireties. 
    
    
     TECHNICAL FIELD 
     This application relates to the field of millimeter-wave communications technologies, and in particular, to a channel resource allocation method and apparatus. 
     BACKGROUND 
     As emerging services such as VR (virtual reality) and high-definition video develop and a quantity of access devices increases, an existing wireless communications technology gradually cannot meet a high bandwidth requirement. Therefore, the industry focuses on millimeter-wave communication because there is a grant-free spectrum up to dozens of gigahertz (GHz) in a millimeter-wave communication field. In addition, as shown in  FIG.  1   , in the United States, the European Union, and Japan, 57 GHz to 66 GHz frequency bands are classified into contiguous grant-free spectrums. However, because of a physical property of a millimeter wave, a loss in a path transmission process is very large. For example, a path loss of a 60 GHz millimeter wave in free space is 21 decibels (dB) more than a path loss of a 5 GHz frequency band. In addition, limited by a very short wavelength, the millimeter wave is greatly affected by a block in practice. 
     To compensate for a large amount of loss of the millimeter wave in a transmission process, a transmit/receive antenna array is mainly designed in a solution in the millimeter-wave communication field in the industry. Energy is concentrated in a specific direction through beamforming of the antenna array, to compensate for the transmission loss using a relatively high antenna gain. However, in addition to an advantage of the high antenna gain, the antenna array and the beamforming also bring some constraints. For example, if a sending party and a receiving party need to concentrate the energy in a relatively narrow direction, beamforming directions of the sending party and the receiving party need to be first aligned before communication. In addition, because beamforming is highly directional, a transmission path between the sending party and the receiving party needs to be unblocked. 
     However, in practice, it is usually inevitable that the transmission path is blocked. If a current transmission path is blocked or faulty, a system needs to reselect a path, and complete switching to the path and data transmission. In the path switching process, a disastrous delay may be brought to an upper-layer service and quality of service of a user is affected. 
     SUMMARY 
     This application provides a channel resource allocation method, which is applied to a millimeter-wave communications field in which beamforming is implemented, and is used to reduce a high delay caused by transmission path switching. 
     According to a first aspect, this application provides a channel resource allocation method. The method includes establishing, by a first network device, at least two links between the first network device and a second network device, where each link supports beamforming data transmission; obtaining, by the first network device, a millimeter-wave radio channel resource between the first network device and the second network device; dividing the radio channel resource into a plurality of slots, where each slot is used for data transmission on one link, and two adjacent slots correspond to two different links; and transmitting, by the first network device, data on a corresponding link in the plurality of slots. 
     According to the method provided in this aspect, the first network device divides the millimeter-wave radio channel resource into a plurality of slots, and different slots are used for data transmission on different links. Therefore, when it is detected that a link at a current moment is faulty, data may be transmitted using a next slot such that the link is quickly switched to a link that is not faulty. In this way, a process of link reselection, switching, and connection establishment is avoided, a delay caused by link switching is reduced, and quality of service of a user is improved. 
     In addition, when a fault occurs, compared with a manner in which time-frequency resources of an entire radio channel are allocated to one link for data transmission, in the method in this aspect, a link can be quickly switched to change a direction of beamforming using a divided slot such that the time-frequency resources corresponding to the entire link are not wasted due to a fault. According to the method, a delay is reduced and a time-frequency resource of a system is saved at the same time. 
     With reference to the first aspect, in an implementation of the first aspect, a process in which the first network device divides the radio channel resource into a plurality of slots includes: dividing, by the first network device, the channel resource into a plurality of slots in a time-division duplex (TDD) manner. 
     With reference to the first aspect, in another implementation of the first aspect, the transmitting, by the first network device, data on a corresponding link in the plurality of slots includes: determining, by the first network device, an optimal link in the at least two links; and sending, by the first network device, first information in a slot corresponding to the optimal link, where the first information is used to perform channel estimation and data monitoring on the optimal link, and sending second information in a slot corresponding to a link other than the optimal link, where the second information is used to maintain a heartbeat. 
     In this implementation, the first network device transmits important data on the optimal link, for example, the first information, and sends the second information on another sub-optimal link, in order to maintain transmissibility of each link. In this way, when the optimal link is faulty subsequently, the first network device can link to another link in a timely manner. 
     With reference to the first aspect, in still another implementation of the first aspect, the method further includes: obtaining, by the first network device, reference information of the second network device, where the reference information includes at least one of a signal-to-noise ratio (SNR), a packet loss rate, channel state information (CSI), a channel quality indicator (CQI), a data packet transmission delay, or quality of service (QoS) at a system layer and an application layer; and adjusting, by the first network device based on the reference information, a length of a slot allocated to each link. 
     In this implementation, when a fault occurs, a beamforming link is quickly switched by changing a slot, to avoid reselecting a link to reestablish a connection such that an upper-layer service can be maintained continuously and without interruption. In addition, the first network device dynamically adjusts time-frequency resources of links in different beamforming directions using the reference information such that a system delay can be reduced, thereby improving quality of service. 
     With reference to the first aspect, in still another implementation of the first aspect, the obtaining reference information of the second network device includes: obtaining, by the first network device, the reference information by negotiating with the second network device; or obtaining the reference information using a monitoring result of quality of each link. In addition, the reference information may be obtained in another manner. This is not limited in this application. 
     With reference to the first aspect, in still another implementation of the first aspect, the at least two links include a first link and a second link; and the adjusting, by the first network device based on the reference information, a length of a slot allocated to each link includes: determining, by the first network device based on the reference information, that when the first link is faulty, a slot allocated to the first link is changed to a slot corresponding to the second link. 
     With reference to the first aspect, in still another implementation of the first aspect, the establishing, by a first network device, at least two links between the first network device and a second network device includes: broadcasting, by the first network device, a first message, where the first message includes capabilities of a plurality of beamforming links supported by the first network device; receiving, by the first network device, a response message fed back by the second network device based on the first message; and establishing, by the first network device, the at least two links to the second network device based on the response message. 
     With reference to the first aspect, in still another implementation of the first aspect, the second network device includes at least two virtual second network devices; and the establishing, by a first network device, at least two links between the first network device and a second network device includes: establishing, by the first network device, a link between the first network device and each virtual second network device. 
     In this implementation, the second network device forms a plurality of virtual network devices such as stations (STAs) by extending a plurality of medium access control (MAC) addresses. These virtual network devices appear as different devices for the first network device such as an access point (AP). At an AP link layer, the AP and a plurality of virtual STAs separately train links. Therefore, code at the AP link layer does not need to be changed such that the AP link layer can be quickly compatible with an existing standard, to maintain barrier-free communication between the AP and each virtual STA. 
     With reference to the first aspect, in still another implementation of the first aspect, the first network device includes at least one antenna array; and the transmitting, by the first network device, data on a corresponding link in the plurality of slots includes: transmitting, by the first network device, data using one antenna array, or transmitting data to the second network device using two or more antenna arrays, where a transmission mechanism between the two or more antenna arrays includes time division multiplexing, frequency division multiplexing, code division multiplexing, and spatial multiplexing. 
     In this implementation, single antenna array transmission and multi-group antenna array transmission may be combined to transmit data in a switching manner, in order to establish a multi-link redundancy backup between the first network device and the second network device, thereby improving link quality, such as an SNR and robustness. 
     With reference to the first aspect, in still another implementation of the first aspect, the foregoing method further includes: broadcasting, by the first network device, a second message, where the second message includes a capability for tracing a plurality of beams supported by the first network device; receiving, by the first network device, a response message fed back by the second network device based on the second message; and tracing, by the first network device, the link based on the response message. 
     In this implementation, the first network device implements dynamic tracing of a plurality of links using the capability for tracing a plurality of beams supported by the first network device, and maintains transmissibility of the links, in order to prepare for fast link switching. 
     According to a second aspect, this application further provides a channel resource allocation apparatus. The apparatus includes units or modules configured to perform the method steps in the implementations of the first aspect. Further, the apparatus includes an obtaining unit, a processing unit, a sending unit, and the like. In an example, the apparatus may be configured in a first network device such as an AP. 
     According to a third aspect, this application further provides a channel resource allocation method. The method may be applied to a second network device such as a STA. In an example, the method includes: establishing, by a second network device, at least two links between the second network device and a first network device, where each link supports beamforming data transmission; and communicating with the first network device based on the at least two established links. 
     With reference to the third aspect, in another implementation of the third aspect, the method further includes: receiving, by the second network device, information from the first network device; and sending a response message to the first network device based on the information, in order to maintain transmissibility of the plurality of links. 
     With reference to the third aspect, in still another implementation of the third aspect, maintaining transmissibility of the plurality of links includes: receiving, by the second network device, first information from the first network device, where the first information is used to perform channel estimation and data monitoring on an optimal link; and on another link, receiving second information from the first network device, where the second information includes a preamble or a heartbeat packet/heartbeat frame used to maintain a heartbeat. 
     With reference to the third aspect, in still another implementation of the third aspect, the method further includes: generating, by the second network, reference information, where the reference information includes at least one of an SNR, a packet loss rate, CSI, a CQI, a data packet transmission delay, or QoS at a system layer and an application layer; and sending the reference information to the first network device. 
     With reference to the third aspect, in still another implementation of the third aspect, the method further includes: virtualizing, by the second network device, a plurality of network devices, such as STAs, and simultaneously training/tracing a plurality of links using a virtualization technology. Further, the second network device extends a plurality of MAC addresses, each MAC address corresponds to one virtual STA, and each virtual STA can identify different data streams from each other, and externally appears as a plurality of different STAs. 
     With reference to the third aspect, in still another implementation of the third aspect, the method further includes: receiving, by the second network device, a second message from the first network device, generating a feedback response message based on the second message, and sending the response message to the first network device, in order to implement beam tracing and slot allocation of each link by the first network device. 
     According to a fourth aspect, this application further provides a channel resource allocation apparatus. The apparatus includes units or modules configured to perform the method steps in the implementations of the third aspect. Further, the apparatus includes a receiving unit, a processing unit, a sending unit, and the like. In an example, the apparatus may be configured in a second network device such as a STA. 
     According to a fifth aspect, this application further provides a network device. The network device includes components such as a processor, a memory, and a transceiver. The processor may execute a program or an instruction stored in the memory, to implement the channel resource allocation method according to the implementations of the first aspect. 
     According to a sixth aspect, this application further provides a computer storage medium. The computer storage medium may store a program, and when the program is executed, some or all of the steps in the embodiments of the channel resource allocation method provided in this application may be included. 
     According to a seventh aspect, this application further provides a computer program product that includes an instruction. When the computer program product runs on a computer, the computer is enabled to perform the method steps in the foregoing aspects. 
    
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
       To describe the technical solutions in this application more clearly, the following briefly describes the accompanying drawings required for describing the embodiments. Apparently, a person of ordinary skill in the art may derive other drawings from these accompanying drawings without creative efforts. 
         FIG.  1    is a schematic diagram of a spectrum that is used without authorization according to this application; 
         FIG.  2    is a schematic diagram of an unblocked transmission path according to an embodiment of this application; 
         FIG.  3    is a schematic diagram of a blocked transmission path according to an embodiment of this application; 
         FIG.  4    is a schematic flowchart of a channel resource allocation method according to an embodiment of this application; 
         FIG.  5    is a schematic diagram of training a plurality of links by an AP according to an embodiment of this application; 
         FIG.  6    is a schematic diagram of allocating slots to a plurality of links according to an embodiment of this application; 
         FIG.  7    is a schematic diagram of allocating slots to a link 1 and a link 2 according to an embodiment of this application; 
         FIG.  8 A  is a schematic diagram of allocating a slot to a link according to an embodiment of this application; 
         FIG.  8 B  is another schematic diagram of allocating a slot to a link according to an embodiment of this application; 
         FIG.  8 C  is still another schematic diagram of allocating a slot to a link according to an embodiment of this application; 
         FIG.  9 A  is a schematic diagram of resource adjustment negotiated by an AP and a STA according to an embodiment of this application; 
         FIG.  9 B  is a schematic diagram that an AP determines resource adjustment according to an embodiment of this application; 
         FIG.  10    is a schematic diagram of single-group antenna transmission and multi-group antenna reception according to an embodiment of this application; 
         FIG.  11    is a schematic diagram of multi-group antenna transmission and multi-group antenna reception according to an embodiment of this application; 
         FIG.  12    is a schematic structural diagram of a first network device according to an embodiment of this application; 
         FIG.  13    is a schematic diagram of a network device AP according to an embodiment of this application; and 
         FIG.  14    is a schematic structural diagram of a second network device according to an embodiment of this application. 
     
    
    
     DESCRIPTION OF EMBODIMENTS 
     To make a person skilled in the art understand the technical solutions in the embodiments of the present disclosure better, and make the objectives, features, and advantages of the embodiments of the present invention clearer, the following further describes the technical solutions in the embodiments of the present disclosure in detail with reference to the accompanying drawings. 
     Before the technical solutions in the embodiments of the present disclosure are described, an application scenario of the embodiments of the present disclosure is first described with reference to the accompanying drawings. The technical solutions provided in the embodiments of this application are applied to the millimeter-wave communications field, and the millimeter-wave communications field includes the following features: First, both a sending party and a receiving party need to concentrate energy in a relatively small direction, and before communication, beamforming directions of the sending party and the receiving party are aligned such that link transmission has a feature similar to optics. Second, a transmission path, namely, a line of sight (LOS), between the sending party and the receiving party needs to be unblocked. 
     A method provided in the embodiments of this application is applied to a wireless local area network (WLAN) network. In an example, the method may be applicable to Long-Term Evolution (LTE) system or a wireless communications system that uses radio access technologies such as code division multiple access and orthogonal frequency division multiple access. In addition, the method may be further applicable to a subsequently evolved system using the LTE system, such as  60 G WiFi, a 5th generation (5G) communications system, an NR (new radio) system, and an optical system. 
     The system includes at least one wireless device and at least one terminal device. As shown in  FIG.  2   , the wireless device is configured to communicate with at least one terminal device. The wireless device, such as an AP, establishes a plurality of transmissible links with one terminal device, such as an STA, and maintains transmissibility of different links, in order to implement fast switching with another link when a link is faulty subsequently, thereby reducing a delay. 
     Further, the wireless device may be an AP, or may be another network device, such as a base station, an enhanced base station, a relay having a scheduling function, or a device having a base station function. The base station may be an evolved NodeB (eNB) in an LTE system, or a base station in another system. This is not limited in the embodiments of this application. 
     The terminal device may be a mobile terminal, for example, a mobile phone (or also referred to as a “cellular” phone), and a computer that has a mobile terminal. For example, the terminal device may be a portable, pocket-sized, handheld, computer built-in, or in-vehicle mobile apparatus, and the terminal devices exchange voice and/or data with a radio access network. For example, the terminal device may be a device such as a personal communications service (personal communications service, PCS) phone, a cordless telephone set, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, or a personal digital assistant (PDA). The terminal device may alternatively be a subscriber unit (SU), a subscriber station (SS), a mobile station (MS), a remote station (RS), a remote terminal (RT), an access terminal (AT), a user terminal (UT), a user agent (UA), a user device, or user equipment (UE). 
     As shown in  FIG.  2   , there is a stable line of sight direction between the wireless device AP and the terminal device STA, in other words, there is an LOS between the AP and the STA. As shown in  FIG.  3   , because there is a barrier between the AP and the STA, there is no line of sight between the AP and the STA. A radio signal arrives at the AP through reflection or scattering from a surrounding barrier. These reflection or scattering paths are non lines of sight (NLOS). 
     Before data transmission, according to the method provided in this application, a plurality of links that support beamforming data transmission are trained between a same pair of AP and STA, including the LOS and the NLOS. The method supports more than two links and is not limited to requiring the LOS. In addition, the method provided in the embodiments of this application may be applicable to device-to-device (D2D) data transmission, for example, an AP and an AP, a STA and a STA, and a STA and an AP. This is not limited in the embodiments of the present disclosure. 
     In a data transmission process, the method may maintain transmissibility of a plurality of links simultaneously, and dynamically adjust link resource allocation based on real-time monitoring of a channel and data transmission. In each embodiment of this application, an allocated link resource that is dynamically adjusted is a slot, and a time-frequency resource is allocated in a TDD manner. Optionally, the method may also be applicable to frequency and code. 
     When a fault occurs or transmission link sending is abnormal, for example, a link shown in  FIG.  3    is blocked, and this causes transmission signal quality to be degraded. When a time-frequency resource is allocated, a time-frequency resource corresponding to the link is allocated as far as possible to a link that is not faulty (for example, the NLOS), thereby ensuring normal execution of an upper-layer service, and processing and recovering a faulty link at the same time. 
     Embodiment 1 
     In an example, as shown in  FIG.  4   , this embodiment provides a method for allocating a time-frequency resource on a millimeter-wave radio channel. The method includes the following steps: 
     Step  101 : A first network device AP establishes at least two links between the first network device AP and a second network device STA, where each link supports beamforming data transmission. 
     The AP may establish a plurality of beamforming links between the AP and the STA through negotiation. In an example, in a possible implementation, the AP broadcasts a first message, where the first message includes capabilities of a plurality of beamforming links supported by the AP. After receiving the first message, the STA feeds back a response message to the AP, and the AP receives and interprets the response message fed back by the STA based on the first message. Then, the AP establishes the at least two links between the AP and the STA based on the response message. 
     In another possible implementation, the AP divides one physical STA into a plurality of virtual STAs, and each virtual STA corresponds to one beamforming path, for example, an LOS (set to a link 1) between the AP and the STA and an NLOS (set to a link 2) between the AP and a STA* shown in  FIG.  5   . Each virtual STA obtained through division is invisible to the AP, for example, the AP considers that each virtual STA is an entity STA, and separately performs beamforming training with these entity STAs. Similarly, one physical AP may be divided into a plurality of virtual APs, and a plurality of beamforming links between each virtual AP and an entity STA may be trained. 
     The STA in the embodiments of this application may simultaneously train/trace a plurality of links using a virtualization technology. A key point of the virtual STA lies in that a plurality of MAC addresses can be extended for a STA device, and all virtual STAs can identify different data streams for a same device, and are externally represented as a plurality of different devices. At an AP link layer, the AP and a plurality of virtual STAs separately train links. Therefore, code at the AP link layer does not need to be changed such that the AP link layer can be quickly compatible with an existing standard, to maintain barrier-free communication between the AP and the virtual STA. 
     It should be noted that in this embodiment, the foregoing two manners may be further combined. For example, the AP may broadcast a capability of supporting link transmission by the virtual STA, and separately perform beamforming link training using the virtual AP and the virtual STA. 
     Step  102 : The first network device obtains a millimeter-wave radio channel resource between the first network device and the second network device. 
     The millimeter-wave radio channel resource is a resource that can be allocated by the AP, and the resource that can be allocated by the AP includes a time domain resource and a frequency domain resource. Further, for the time domain resource, usually, the AP divides the time domain resource into a plurality of beacon intervals by sending a beacon, and the time domain resource may be considered as a channel resource between the AP and the STA at a time interval of each beacon interval. If the radio channel resource is a frequency domain resource, an available frequency band may be first divided into frequency subbands, and then a time domain resource is further divided on each frequency subband. 
     Step  103 : Divide the radio channel resource into a plurality of slots, where each slot is used for data transmission on one link, and two adjacent slots correspond to two different links. 
     In a possible division method, the AP divides the radio channel resource into the plurality of slots in a TDD manner. As shown in  FIG.  6   , a time-frequency resource is divided into several slots, and these slots are allocated to a link 1 and a link 2. Further, in a process of obtaining the plurality of slots through division, the AP may first obtain reference information of the STA, then determines a slot length of each link based on the reference information, and divides an entire time-frequency resource. 
     The reference information includes at least one of an SNR, a packet loss rate, CSI, a CQI, a data packet transmission delay, or QoS at a system layer and an application layer. 
     Step  104 : The first network device transmits data on a corresponding link in the plurality of slots, to maintain transmissibility of a plurality of beamforming links between the AP and the STA. 
     Maintaining the transmissibility of the plurality of links may be understood as transmitting different data in different slots obtained through division. For example, the slots are allocated to different links for alternate use. For example, a slot 1 is used to send data on the link 1, and a slot 2 is used to send data on the link 2. 
     Further, in an implementation of maintaining the transmissibility of the plurality of links, the AP determines an optimal link in the at least two links and a slot corresponding to the optimal link, and the AP sends first information in the slot corresponding to the optimal link. The first information is used to perform channel estimation and data monitoring on the optimal link. For example, the AP sends necessary information on the optimal link, and sends second information in a slot corresponding to a link other than the optimal link. The second information is used to maintain a heartbeat. For example, the second information includes a preamble of a data packet, a heartbeat packet/heartbeat frame, or the like. 
     It should be noted that in a process of maintaining transmissibility of each link, the first network device may transmit same data or different data on the plurality of established links. In addition, after dividing a time-frequency resource on a radio channel into a plurality of slots, the first network device transmits data on the optimal link, and may transmit data on another link or may not transmit data. This is not limited in this embodiment. However, it should be ensured that when a primary link (for example, the optimal link) is faulty or blocked, at least one standby link can keep smooth communication to prepare for switching. 
     In addition, in step  104 , the AP may alternatively maintain the transmissibility of the plurality of beamforming links in a manner in which the TDD manner is combined with a manner in which necessary data is transmitted on the optimal link. In addition, data transmitted by the AP on different links may be from a same upper-layer service, or may be from different services, or may be from a hybrid mode thereof. A specific manner may be determined based on an actual situation. This is not limited in this embodiment. 
     According to the channel resource allocation method provided in this embodiment, the first network device divides the radio channel resource into the plurality of slots, and different slots are used for data transmission on the different links. Therefore, when detecting that a link at a current moment is faulty, the first network device may transmit data in a next slot such that the link is quickly switched to a link that is not faulty. In this way, a link reselection process, a switching process, and a connection establishment process are avoided, a delay caused by link switching is reduced, and quality of service of a user is improved. 
     In addition, compared with a manner in which time-frequency resources on the entire radio channel are allocated to one link for data transmission, in the method provided in this embodiment, when a fault occurs, the link can be quickly switched in the slot obtained through division to change a beamforming direction, in order to avoid wasting the time-frequency resources corresponding to the entire link due to the fault. In the method, time-frequency resources of a system are further saved while a delay is reduced. 
     Optionally, in this embodiment, the foregoing method further includes a process of dynamically adjusting channel resource allocation. In an example, the method further includes: The first network device AP obtains the reference information of the second network device STA. The reference information may be obtained through negotiation between the AP and the STA, or obtained by the AP through quality monitoring on each link. Then, the AP adjusts, based on the reference information, a length of a slot allocated to each link. 
     The reference information includes an SNR, a packet loss rate, CSI, a CQI, a delay, QoS at a system layer and an application layer, and the like. For example, when the reference information is the SNR, a process in which the AP adjusts a slot on each link includes: If the AP detects that an SNR on a link increases, a transmission slot/time interval on the link correspondingly increases; or if an SNR decreases, a slot/time interval on the link is correspondingly shortened. 
     As shown in  FIG.  7   , two beamforming links are established between an AP and a STA, that is, a link 1 and a link 2. When a link is faulty, for example, the AP determines, based on reference information, that the established link 1 (LOS) is faulty, a slot allocated to the link 1 (LOS) is changed to a slot corresponding to the link 2 (NLOS) that is not faulty. For example, a slot 1, a slot 3, and a slot 5 are used to transmit data on the link 1, and a slot 2, a slot 4, and a slot 6 are used to transmit data on the link 2. In a data transmission process, when it is detected that the link 1 is faulty or blocked at a moment t1, subsequent slots corresponding to the link 1 are allocated to the link 2, to avoid wasting the subsequent slots because the link 1 is faulty. 
     In this embodiment, when a fault occurs, a beamforming link is quickly switched by changing a slot, to avoid reselecting a link to reestablish a connection such that an upper-layer service can be maintained continuously and without interruption. 
     In addition, in this embodiment, time-frequency resources on links in different beamforming directions are dynamically adjusted using the reference information such that a system delay can be reduced, and QoS quality of service can be improved. 
     Optionally, the method provided in the foregoing embodiment further includes: tracing each beam, to maintain transmissibility of each link. For example, the AP and the STA perform multi-beam direction tracing. A manner of implementing beam tracing includes: 
     The AP broadcasts a second message. The second message includes a capability for tracing a plurality of beams supported by the first network device. After receiving the second message, the STA feeds back a response message to the AP. The AP receives the response message fed back by the STA based on the second message, and traces at least one beamforming link between the AP and the STA based on the response message, to trace and locate a location of the STA. 
     Alternatively, in another possible implementation, one physical STA is divided into a plurality of virtual STAs, and each virtual STA corresponds to one beamforming path, for example, an LOS of a STA and an NLOS of a STA* shown in  FIG.  5   . Each virtual STA is invisible to the AP, for example, the AP considers that each virtual STA is an entity STA, and separately performs beamforming training with these entity STAs. 
     Alternatively, the foregoing two manners are combined, for example, the AP broadcasts support of the AP for the plurality of virtual STAs, and the virtual STAs separately establish a link with the AP, to implement beam tracing. 
     It should be noted that in this embodiment, only three beam tracing manners are listed, and another manner of implementing beam tracing may be further included. In an example, a proper manner may be selected based on an actual technical scenario to implement beam tracing. This is not limited in this application. 
     Embodiment 2 
     In a specific embodiment, a channel resource allocation method provided in this application is described using an example in which one AP allocates a radio channel resource to one STA. 
     A plurality of links that support beamforming transmission are trained. The AP broadcasts a capability of the AP for supporting a plurality of links, and separately trains the plurality of links with the STA. For example, the AP and the STA learn each other&#39;s capability of supporting transmission of a plurality of links, establish a plurality of links between the AP and the STA, and correspondingly train these links. As shown in  FIG.  5   , two links trained between the AP and the STA are a link 1 (link 1) and a link 2 (link 2) respectively. 
     The AP allocates the channel resource to the link 1 and the link 2. An implementation includes: dividing, by the AP, the channel resource into different slots in a TDD manner, where each slot represents a time interval, allocating each time interval or slot to different links, and transmitting data on the allocated links to maintain transmissibility of a plurality of links. For example, as shown in  FIG.  6   , different colors and stripes represent slots allocated to the link 1 and the link 2 such that an entire time-frequency resource is alternately used on the link 1 and the link 2. 
     Maintaining transmissibility of the link 1 and the link 2 includes the following three manners: 
     Manner 1: Data is transmitted on a plurality of links at the same time and is aggregated at a data level. As shown in  FIG.  8 A , data to be sent by an AP to a STA is (1, 2, 3, 4, 5, 6, 7), and is sent using two links (a link 1 and a link 2). After an available time-frequency resource of the AP is divided into several slots, the AP sends data (1, 2) to the STA in a first slot of the link 1, and sends data (4, 5) to the STA in a second slot. Similarly, the AP sends data (3) to a STA* in a first slot of the link 2, and sends data (6, 7) to the STA* in a second slot. For a receive end, the STA and the STA* are actually a same device. Therefore, data (1, 2, 3, 4, 5, 6, 7) can be obtained through aggregation. 
     Manner 2: Data is transmitted only using an optimal link, and another link is only used to send necessary information for channel estimation and environment monitoring, for example, a preamble is sent. As shown in  FIG.  8 B , the link 1 is used as the optimal link, and is used to send the necessary information. Therefore, a length of a slot allocated to the link 1 is relatively long, and a length of a slot allocated to another link, namely, the link 2, is relatively short. 
     Manner 3: Data is transmitted only using the optimal link, and another link is only used to maintain a heartbeat. As shown in  FIG.  8 C , the link 1 is used as the optimal link, and is used to send the necessary information. The link 2 is only used to keep a link unblocked, and data may be sent on the link 2 or data may not be sent on the link 2. Therefore, a length of a slot allocated to the link 1 is relatively long, and a length of a slot allocated to a link used to maintain the heartbeat, namely, the link 2, is relatively short. 
     A channel resource of each link is dynamically adjusted. The AP obtains reference information of the STA, and adjusts, based on the reference information, lengths of slots allocated to the link 1 and the link 2. The reference information includes but is not limited to the following information: a SNR, a packet loss rate, CSI, a CQI, a data packet transmission delay, and QoS at a system layer and an application layer. 
     When detecting that the reference information changes, the AP or the STA may adjust the resource in a plurality of manners, thereby reducing a system delay and maintaining service continuity and stability. In this embodiment, the SNR is used as the reference information for description. 
     The AP may determine a next time interval based on a result of negotiation with the STA, for example, slot lengths of the link 1 and the link 2 in a beacon period. In an example, the AP queries a size of a resource required by the STA, the STA performs corresponding feedback, and the AP determines, based on a received feedback message of the STA, a length of a slot allocated to each link. 
     For example, Query (query) 1: The AP queries the STA for a resource required by the STA, such as a volume of data that needs to be transmitted and a time length. 
     Response (response) 1: The STA feeds back, based on an SNR detected on a current link, the resource required by the STA to the AP. 
     Query (query) 2: The AP queries the STA* for a resource required by the STA*. 
     Response (response) 2: The STA* feeds back, based on the SNR of the current link, the resource required by the STA* to the AP. 
     Assignment (assignment): The AP notifies, through broadcasting, the STA and the ST* of a subsequent slot allocation situation, for example, start moments, end moments, and duration of slots corresponding to the STA and the STA*. 
     ACK (Acknowledgement) (s): The STA and the STA* feed back an ACK response to the AP. Optionally, the STA device may feed back a single ACK as an entity. Alternatively, the STA and the STA* each feed back an ACK response message to the AP. 
     The AP determines, based on the result of negotiation with the STA or the STA*, lengths of slots allocated to the link 1 and the link 2. 
     In addition, optionally, the AP may actively determine a length of a slot allocated to each link. 
     For example, as shown in  FIG.  9 B , Assignment: The AP monitors quality of the current link, such as an SNR, determines how many resources need to be allocated to the STA and the STA* in a next allocated slot, and notifies the STA and the STA* in a broadcast form. 
     ACK(s): To ensure that the STA or the STA* receives a message broadcast by the AP, the STA and the STA* need to feed back an ACK to the AP, in order to indicate that the STA and the STA* know a moment and duration of communication with the AP. Optionally, in a process of feeding back the ACK to the AP, each virtual STA or STA* may be used as an entity to feed back a single ACK, or may feed back the ACK separately. 
     The foregoing two slot allocation manners include determining, by the AP, slot allocation through negotiation with the STA or determining, by the AP, slot allocation actively, and are determined based on an actual technical scenario. Alternatively, the foregoing two manners may be combined to dynamically adjust a time-frequency resource of each link. This is not limited in this embodiment. 
     Embodiment 3 
     This embodiment extends Embodiment 1 and Embodiment 2, and extends single transmission and single reception in the foregoing embodiment to single transmission and multiple reception, multiple transmission and single reception, and multiple transmission and multiple reception between an AP and a STA. 
     In an example, in an actual case, capabilities of the AP and the STA may not be fully matched. In this case, a plurality of antenna arrays need to be configured for the sending party AP to improve transmission stability. As shown in  FIG.  10   , that the sending party AP has two groups of transmit antenna arrays, and the receiving party STA has only one antenna array is used as an example. 
     The AP completes training of a plurality of links, such as LOS and NLOS paths, and these links have transmissibility. In this case, transmitting, by the AP, data on a corresponding link in a plurality of divided slots includes: selecting, by the AP, one antenna array to communicate with the STA and transmit data, or transmitting, by the AP, data to a second network device using two or more antenna arrays. 
     Transmission mechanisms between the two or more antenna arrays include time division multiplexing, frequency division multiplexing, code division multiplexing, and spatial multiplexing. 
     It should be noted that, in this embodiment, single antenna array transmission and multi-group antenna array transmission may be combined to transmit data in a switching manner, in order to establish a multi-link redundancy backup between the AP and the STA, thereby improving link quality, such as an SNR and robustness. 
     Similarly, the method may further be extended to a transmission mechanism of multi-group antenna array transmission and multi-group antenna array reception. As shown in  FIG.  11   , an example in which an AP has two groups of transmit antenna arrays (set to A and B), and a STA has two antenna arrays (set to C and D) is used. 
     Two links, an LOS and an NLOS, that support beamforming are trained between the antenna array B of the AP and the antenna array D of the STA, and correspond to a time-frequency resource S1. Similarly, two links are also trained between the other antenna array A of the AP and the antenna array C of the STA, and a corresponding time-frequency resource is S2. 
     The AP separately allocates different slots to each link on the time-frequency resources S1 and S2. Optionally, slots are divided at intervals on the time-frequency resource S1 to a link 1 and a link 2, and slots are also divided at intervals on the time-frequency resource S2 to a link 3 and a link 4. When the link 3 in S2 is blocked, in a next slot, slots corresponding to the blocked link 3 are all allocated to the unblocked link 4, thereby ensuring that data is transmitted without interruption, implementing fast switching of beamforming links, and reducing a system delay. 
     Further, the antenna group arrays between the sending party and the receiving party in this embodiment may be randomly arranged and combined. For example, any antenna array of the AP may communicate with the two antenna arrays of the STA, or the two antenna arrays of the AP may communicate with one antenna array of the STA at the same time (as shown in  FIG.  10    in Embodiment 2). Several feasible antenna array pairing cases are listed below: 
     1. A-C and B-D or A-D and B-C. 
     2. AB-C and AB-D. 
     3. A-CD and B-CD. 
     4. A-C and AB-D or A-D and AB-C or B-C and AB-D or B-D and AB-C. 
     5. A-C and B-CD or A-D and B-CD or B-C and A-CD or B-D and A-CD. 
     6. A-CD and B-CD. 
     It should be noted that the antenna group pairing cases of the system formed by the AP and the STA may be dynamically adjusted based on an actual situation. In this embodiment, link training, maintaining of multi-link transmissibility, and a method for dynamically adjusting link slots are similar to that in Embodiment 1. Therefore, details are not described in this embodiment. 
     Corresponding to the foregoing method embodiment, an embodiment of this application further provides a corresponding apparatus, such as a network device and a terminal device, embodiment. 
       FIG.  12    is a schematic structural diagram of a first network device  120  according to an embodiment of the present disclosure. The first network device  120  is configured to perform the channel resource allocation method shown in  FIG.  4   . The first network device  120  may include an obtaining unit  1201 , a processing unit  1202 , and a sending unit  1203 . 
     The processing unit  1202  is configured to establish at least two links between the first network device  120  and a second network device, where each link supports beamforming data transmission. 
     The obtaining unit  1201  is configured to obtain a millimeter-wave radio channel resource between the first network device  120  and the second network device. 
     The processing unit  1202  is further configured to divide the radio channel resource into a plurality of slots, where each slot is used for data transmission on one link, and two adjacent slots correspond to two different links. 
     The sending unit  1203  is configured to transmit data on a corresponding link in the plurality of slots. 
     Optionally, in a specific implementation of this embodiment, the processing unit  1202  is configured to divide the radio channel resource into a plurality of slots in a TDD manner. 
     Optionally, in a specific implementation of this embodiment, the processing unit  1202  is further configured to determine an optimal link in the at least two links. The sending unit  1203  is further configured to: send first information in a slot corresponding to the optimal link, where the first information is used to perform channel estimation and data monitoring on the optimal link, and send second information in a slot corresponding to a link other than the optimal link, where the second information is used to maintain a heartbeat. 
     Optionally, in a specific implementation of this embodiment, the obtaining unit  1201  is further configured to obtain reference information of the second network device, where the reference information includes at least one of an SNR, a packet loss rate, CSI, a CQI, a data packet transmission delay, or QoS at a system layer and an application layer. The processing unit  1202  is further configured to adjust, based on the reference information, a length of a slot allocated to each link. 
     Optionally, in a specific implementation of this embodiment, the obtaining unit  1201  is configured to obtain the reference information by negotiating with the second network device, or obtain the reference information using a monitoring result of quality of each link. 
     Optionally, in a specific implementation of this embodiment, the at least two links include a first link and a second link. The processing unit  1202  is configured to determine, based on the reference information, that when the first link is faulty, a slot allocated to the first link is changed to a slot corresponding to the second link. 
     Optionally, in a specific implementation of this embodiment, the sending unit  1203  is configured to broadcast a first message, where the first message includes capabilities of a plurality of beamforming links supported by the apparatus. The obtaining unit  1201  is configured to receive a response message fed back by the second network device based on the first message. The processing unit  1202  is further configured to establish at least two links to the second network device based on the response message. 
     Optionally, in a specific implementation of this embodiment, the second network device includes at least two virtual second network devices, and the processing unit  1202  is configured to establish a link between the first network device  120  and each virtual second network device. 
     Optionally, in a specific implementation of this embodiment, the apparatus includes at least one antenna array. 
     The sending unit  1203  is configured to transmit data using one antenna array, or transmit data to the second network device using two or more antenna arrays, where a transmission mechanism between the two or more antenna arrays includes time division multiplexing, frequency division multiplexing, code division multiplexing, and spatial multiplexing. 
     Optionally, in a specific implementation of this embodiment, the sending unit  1203  is further configured to broadcast a second message, where the second message includes a capability for tracing a plurality of beams supported by the apparatus. The obtaining unit  1201  is further configured to receive a response message fed back by the second network device based on the second message. The processing unit  1202  is further configured to trace the link based on the response message. 
     The apparatus or the first network device  120  provided in this embodiment divides the millimeter-wave radio channel resource into a plurality of slots, and different slots are used for data transmission on different links. Therefore, when it is detected that a link at a current moment is faulty, data may be transmitted in a next slot such that the link is quickly switched to a link that is not faulty. In this way, a link reselection process, a switching process, and a connection establishment process are avoided, a delay caused by link switching is reduced, and quality of service of a user is improved. 
     In addition, when a fault occurs, compared with a manner in which time-frequency resources of an entire radio channel are allocated to one link for data transmission, in the manner in this embodiment, a link can be quickly switched to change a direction of beamforming using a divided slot such that the time-frequency resources corresponding to the entire link are not wasted due to a fault, thereby reducing a delay and saving a time-frequency resource of a system at the same time. 
       FIG.  13    is a schematic structural diagram of a network device according to an embodiment of this application. The network device may be the AP in any one of the foregoing embodiments, and is configured to implement steps of the method in the foregoing embodiment. 
     As shown in  FIG.  13   , the network device may include a transceiver  131 , a processor  132 , and a memory  133 . The transceiver  131  may include components such as a receiver  1311 , a transmitter  1312 , and an antenna  1313 . The network device may further include more or fewer components, or combine some components, or have different component arrangements. This is not limited in this application. 
     The processor  132  is a control center of the network device, connects all parts of the entire network device using various interfaces and lines, and performs various functions of the network device and/or processes data by operating or executing a software program and/or a module stored in the memory  133  and invoking data stored in the memory  133 . The processor  132  may include an integrated circuit (IC), for example, may include a single packaged IC, or may include a plurality of packaged ICs having a same function or different functions. For example, the processor  132  may include only a central processing unit (CPU), or may be a combination of a CPU, a digital signal processor (DSP), and a control chip (such as a baseband chip) in a transceiver. In various implementations of the present disclosure, the CPU may be a single computing core, or may include a plurality of computing cores. 
     The transceiver  131  is configured to establish a communication channel such that the network device is connected to a receiving device, such as a STA, through a network channel, thereby implementing data transmission between the network device and a terminal device. The transceiver  131  may include a communications module such as a WLAN module, a BLUETOOTH module, or a baseband module, and a radio frequency (RF) circuit corresponding to the communications module, and is configured to perform WLAN communication, BLUETOOTH communication, infrared communication, and/or cellular communications system communication, such as wideband code division multiple access (WCDMA) and/or high speed downlink packet access (HSDPA). The transceiver is configured to control communication between all the components in the terminal device, and may support direct memory access. 
     In different implementations of this application, transceivers in the transceiver  131  are usually presented in a form of an integrated circuit chip, and may be selectively combined without a need to include all the transceivers and corresponding antenna groups. For example, the transceiver  131  may include only a baseband chip, a radio frequency chip, and a corresponding antenna to provide a communication function in a cellular communications system. For example, the terminal device may be connected to a cellular network or the Internet using a wireless communication connection established by the transceiver, for example, using wireless local area network access or WCDMA access. In some optional implementations of this application, the communication modules, for example, the baseband module, in the transceiver may be integrated into the processor. A typical example is an APQ+MDM series platform provided by Qualcomm. The radio frequency circuit is configured to send and receive information, or receive and send a signal in a call process. For example, the radio frequency circuit receives downlink information of a network device and sends the downlink information to the processor for processing, and sends uplink-related data to the network device. Usually, the radio frequency circuit includes a well-known circuit used to perform these functions, and includes but is not limited to an antenna system, a radio frequency transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a coder/decoder (codec) chipset, a subscriber identity module (SIM) card, a memory, and the like. In addition, the radio frequency circuit may further communicate with a network and another device through wireless communication. Any communications standard or protocol may be used for the wireless communication, including but not limited to a global system for mobile communications (GSM), a general packet radio service (GPRS), code division multiple access (CDMA), WCDMA, a high speed uplink packet access (HSUPA) technology, LTE, an email, a short message service (SMS), and the like. 
     In the apparatus embodiment of this application, functions to be implemented by the obtaining unit  1201  and the sending unit  1203  may be implemented by the transceiver  131  of the network device, or implemented by the transceiver  131  controlled by the processor  132 . A function to be implemented by the processing unit  1202  may be implemented by the processor  132 . 
       FIG.  14    is a schematic structural diagram of a second network device  140  according to an embodiment of this application. The second network device  140  may be the terminal in any one of the foregoing embodiments, such as a STA, and is configured to implement steps of the method in the foregoing embodiment. 
     As shown in  FIG.  14   , the second network device  140  includes a receiving unit  1401 , a processing unit  1402 , and a sending unit  1403 . In addition, the second network device  140  may further include another unit module such as a storage unit. 
     The processing unit  1402  is configured to establish at least two links to a first network device, where each link supports beamforming data transmission. 
     The receiving unit  1401  is configured to receive information from the first network device. 
     The sending unit  1403  is configured to send a response message to the first network device based on the information, in order to maintain transmissibility of the plurality of links. 
     Further, maintaining transmissibility of the plurality of links includes: receiving, by the receiving unit  1401 , first information from the first network device, where the first information is used to perform channel estimation and data monitoring on an optimal link; and on another link, receiving, by the receiving unit  1401 , second information from the first network device, where the second information includes a preamble or a heartbeat packet/heartbeat frame used to maintain a heartbeat. 
     Optionally, in a specific implementation of this embodiment, the processing unit  1402  is configured to generate reference information, where the reference information includes at least one of an SNR, a packet loss rate, CSI, a CQI, a data packet transmission delay, or QoS at a system layer and an application layer. 
     The sending unit  1403  is configured to send the reference information to the first network device. 
     Optionally, in a specific implementation of this embodiment, the processing unit  1402  is further configured to: virtualize a plurality of STAs, and train/trace a plurality of links simultaneously using a virtualization technology. The processing unit  1402  is configured to extend a plurality of MAC addresses, where each MAC address corresponds to one virtual STA, and each virtual STA can identify different data streams from each other, and externally appears as a plurality of different STA devices. 
     Optionally, in a specific implementation of this embodiment, the receiving unit  1401  is further configured to receive a second message from the first network device, and the processing unit  1402  is further configured to: generate a feedback response message based on the second message, and send the response message to the first network device using the sending unit  1403 , in order to implement beam tracing and slot allocation of each link by the first network device. 
     In a specific hardware implementation, the second network device includes components such as a transceiver, a processor, and a memory. Functions to be implemented by the receiving unit  1401  and the sending unit  1403  may be implemented by the transceiver of the terminal, or may be implemented by the transceiver controlled by the processor. A function to be implemented by the processing unit  1402  may be implemented by the processor of the terminal. 
     In specific implementation, this application further provides a non-transitory computer storage medium, where the computer storage medium may store a program, and when the program is executed, some or all of the steps of the embodiments of the channel resource allocation method provided in this application may be included. The storage medium may be a magnetic disk, an optical disc, a read-only memory (ROM), a random-access memory (RAM), or the like. 
     A person skilled in the art may clearly understand that, the technologies in the embodiments of this application may be implemented by software in addition to a necessary general hardware platform. Based on such an understanding, the technical solutions in the embodiments of the present disclosure essentially, or the part contributing to other approaches may be implemented in a form of a software product. The computer software product is stored in a storage medium, such as a ROM/RAM, a hard disk, or a compact disc, and includes several indications for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform the methods described in the embodiments or some parts of the embodiments of the present disclosure. 
     For same or similar parts in the embodiments in this specification, mutual reference may be made between these embodiments. Especially, the foregoing embodiments are basically similar to a method embodiment, and therefore are described briefly; for related parts, refer to descriptions in the method embodiment. 
     The foregoing descriptions are implementations of this application, but are not intended to limit the protection scope of the present disclosure.