一种无线局域网环境中检测频繁切换的方法 Method for detecting frequent handover in wireless local area network environment
技术领域Technical field
 本发明涉及通信领域中的无线局域网系统,尤其涉及一种无线局域网环境 中检测频繁切换的方法。 背景技术 The present invention relates to a wireless local area network system in the field of communications, and more particularly to a method for detecting frequent handovers in a wireless local area network environment. Background technique
 无线局域网, 如符合 IEEE802.11a/b/g的无线网络, 是指应用无线通信技 术将计算机设备互联起来, 构成可以互相通信和实现资源共享的网络体系。 A wireless local area network, such as a wireless network conforming to IEEE802.11a/b/g, refers to a wireless communication technology that interconnects computer devices to form a network system that can communicate with each other and achieve resource sharing.
 在无线局域网网络环境中,一个典型的网络拓扑结构称为扩展服务组,扩 展服务组系统由一个或多个基本服务组,以及联接这些基本服务组的分布系统 构成,每个基本服务组包含一个无线接入点设备。如图 1所示的无线局域网的 扩展服务组结构中, 包括了通过分布系统联接的两个基本服务组 1、 2。 扩展 服务组通过扩展服务组标识来区分,无线接入点通过基本服务组标识, 即接入 点标识来区分。站点通过扫描信道, 获取所处无线局域网环境中扩展服务组和 基本服务组信息, 并选择加入一个合适的基本服务组。 In a WLAN network environment, a typical network topology is called an extended service group. The extended service group system consists of one or more basic service groups and a distribution system that connects these basic service groups. Each basic service group contains one. Wireless access point device. The extended service group structure of the WLAN shown in FIG. 1 includes two basic service groups 1, 2 connected through a distribution system. The extended service group is distinguished by extending the service group identity, and the wireless access point is distinguished by the basic service group identity, that is, the access point identity. The site scans the channel to obtain the extended service group and basic service group information in the wireless LAN environment, and chooses to join a suitable basic service group.
 当一个站点需要加入到一个无线局域网网络中,经过与该接入点的联接过 程, 才能开始正常的通信。某一时刻站点只能与一个接入点建立联接。 当站点 需要改变某些联接属性时, 可以发起再次联接过程。 When a site needs to join a wireless LAN network, the normal communication can be started after the connection process with the access point. At a time, the site can only establish a connection with one access point. When the site needs to change some of the join properties, a re-join process can be initiated.
 站点在与一个接入点建立联接后,通过扫描信道来检查是否有信号质量更 好的接入点存在,如果有这样的接入点存在,站点会通过重联接过程建立与新 接入点的联接, 并切断与旧接入点的联接, 这个过程称为切换。 After establishing a connection with an access point, the station checks whether there is an access point with better signal quality by scanning the channel. If such an access point exists, the station establishes a new access point through the reconnection process. Join, and cut off the connection with the old access point, this process is called switching.
 目前的无线局域网协议没有规定站点进行切换的条件,一般釆用切换窗口 的方法实现,即当站点发现新的接入点的信号质量比旧接入点信号质量高一个 预设的切换窗口值时才进行切换。但是剧烈变化的无线环境和设置不当的切换 窗口值会造成站点在两个信号质量相近的接入点间频繁切换。 发明公开 The current WLAN protocol does not specify the conditions for the site to switch. Generally, the method of switching windows is used, that is, when the station finds that the signal quality of the new access point is higher than the signal quality of the old access point by a preset switching window value. Only switch. However, a drastically changing wireless environment and improperly set switching window values can cause the station to frequently switch between two access points with similar signal quality. Invention disclosure
 本发明的目的在于提出一种无线局域网环境中检测频繁切换的方法,无线 终端记录联接到的接入点的历史信息,并据此判断是否在短时间内在两个接入 点间发生多次切换, 从而为无线局域网环境下避免站点频繁切换提供依据,进 而可以避免频繁切换造成的接入效率下降。The object of the present invention is to provide a method for detecting frequent handover in a wireless local area network environment, where the wireless terminal records the history information of the connected access point, and judges whether to access the two accesses in a short time.  Multiple switching occurs between points, which provides a basis for avoiding frequent site switching in a wireless LAN environment, thereby avoiding the drop in access efficiency caused by frequent switching.
 为实现上述发明目的,本发明提出了一种无线局域网环境中检测频繁切换 的方法, 其特点在于, 包括如下步骤: In order to achieve the above object, the present invention provides a method for detecting frequent handover in a wireless local area network environment, which is characterized in that it comprises the following steps:
 步骤一, 创建切换信息记录, 由一站点创建并维护; Step 1: Create a switch information record, which is created and maintained by a site;
 步骤二,.切换条件判断, 站点在已经接入一接入点后, 通过扫描信道, 寻 找满足切换条件的另一接入点,若存在则进行下一步骤,否则继续进行切换状 态扫描; Step 2: The handover condition is determined. After the site has accessed an access point, the station searches for another access point that satisfies the handover condition by scanning the channel, and if so, proceeds to the next step; otherwise, the handover state scan is continued;
 步骤三, 频繁切换状态判断, 站点根据当前切换信息记录中的有效记录, 判断站点是否处于频繁切换状态, 并在未处于频繁切换状态下进行切换; 步骤四, 记录切换信息, 站点在完成切换后更新切换信息记录, 新增一记 录项; Step 3: Frequently switch state determination. The station determines whether the site is in a frequent handover state according to the valid record in the current handover information record, and performs handover in the state of not being frequently switched. Step 4: Record handover information, after the site completes the handover Update the switching information record and add a new record item;
 步骤五, 对新增记录项开启时齢机制, 进行切换信息的维护和处理, 同时 继续进行站点的接入或扫描。 Step 5: Maintain and process the switching information when the new record item is turned on, and continue to access or scan the site.
 所述的无线局域网环境中检测频繁切换的方法,在步骤一中,所述切换信 息记录由站点在本地创建,并且每项记录至少需要保存一个当前接入点标识域 和一个可被切换入的新接入点标识域。 The method for detecting frequent handover in the wireless local area network environment, in step 1, the handover information record is locally created by the site, and each record needs to save at least one current access point identification field and one that can be switched in. The new access point identifies the domain.
 所述的无线局域网环境中检测频繁切换的方法,在步骤五中, 是启动一时 龄定时器来进行切换信息记录的维护和处理,该切换信息记录中每一项记录都 在一固定时间内有效, 并在该记录项对应的时龄定时器到期时,删除相应切换 信息记录项, 同时撤销对应的时龄定时器。 In the wireless local area network environment, a method for detecting frequent switching is performed. In step 5, a one-time timer is started to perform maintenance and processing of the switching information record, and each record in the switching information record is valid for a fixed time. And when the age timer corresponding to the record expires, the corresponding switch information record item is deleted, and the corresponding age timer is cancelled.
 所述的无线局域网环境中检测频繁切换的方法,在步骤二中,还包括如下 步骤: The method for detecting frequent handover in the wireless local area network environment, in step 2, further includes the following steps:
 站点与一接入点建立联接; The station establishes a connection with an access point;
 该站点处于无切换状态; The site is in a no-switch state;
 判断该站点的切换信息记录中的记录项是否失效,若为失效记录项则删除 对应切换记录, 并撤销对应的时龄定时器; Determining whether the record item in the switch information record of the site is invalid, and if it is a failed record item, deleting the corresponding switch record, and canceling the corresponding age timer;
 扫描信道, 寻找满足切换条件的另一接入点。 Scan the channel for another access point that meets the switching conditions.
 所述的无线局域网环境中检测频繁切换的方法,在步骤三中,还包括如下 步骤:  站点找到满足切换条件的另一接入点;The method for detecting frequent handover in the wireless local area network environment, in step 3, further includes the following steps:  The site finds another access point that satisfies the handover condition;
 该站点处于预切换状态; The site is in a pre-switched state;
 站点统计当前切换信息记录中有效的、且与当前接入点识别号、新接入点 识别号匹配的记录项; The station collects the record items in the current switch information record that match the current access point identification number and the new access point identification number;
 如果匹配记录项数大于一预设的频繁切换门限,则该站点处于频繁切换状 态, 中止切换, 继续进行切换状态扫描; If the number of matching entries is greater than a preset frequent switching threshold, the station is in a frequent switching state, the switching is aborted, and the switching state scanning is continued;
 如果匹配记录项数不大于一预设的频繁切换门限,则设置该站点处于可切 换状态, 并切换到另一接入点。 附图简要说明 If the number of matching entries is not greater than a preset frequent switching threshold, the station is set to be switchable and switched to another access point. BRIEF DESCRIPTION OF THE DRAWINGS
 图 1是本发明无线局域网的扩展服务组示意图; 1 is a schematic diagram of an extended service group of a wireless local area network according to the present invention;
 图 2是本发明方法一实施例的示意图; 2 is a schematic view of an embodiment of the method of the present invention;
 图 3是使用本发明的站点切换判决的具体实施过程; 3 is a specific implementation process of a site handover decision using the present invention;
 图 4是本发明的终端站点的状态转换图。 实现本发明的最佳方式 ' 4 is a state transition diagram of a terminal station of the present invention. The best way to implement the invention'
 本发明的方法适用于图 1所述的无线局域网网络结构。在本发明的方法应 用的无线局域网环境中, 至少存在属于同一个扩展服务组的两个接入点 API 和 AP2, 同时存在一个终端站点 STA。 The method of the present invention is applicable to the wireless local area network structure described in FIG. In the wireless local area network environment to which the method of the present invention is applied, there are at least two access point APIs and AP2 belonging to the same extended service group, and one terminal station STA exists at the same time.
 本发明的方法所涉及的内容包括以下步骤- The content involved in the method of the present invention includes the following steps -
( 1 )创建切换信息记录: 站点 STA在本地构造并维护切换信息记录, 每 项记录至少需要保存一个新接入点标识域和一个当前接入点标识域。(1) Creating a handover information record: The STA constructs and maintains a handover information record locally, and each record needs to store at least one new access point identification field and one current access point identification field.
 (2) 切换条件判断: 站点 STA在已经联接到接入点 API后, 通过扫描 空中无线信号, 寻找是否存在另外一个接入点 AP2, 并且 AP2满足现有的切 换条件。如果发现满足切换条件的接入点 AP2, 则进行下一个步骤, 否则继续 进行切换状态扫描。 (2) Handover condition judgment: After the STA has been connected to the access point API, it scans the airborne wireless signal to find out whether there is another access point AP2, and AP2 satisfies the existing switching condition. If the access point AP2 that meets the handover condition is found, the next step is performed, otherwise the handover state scan is continued.
 (3 ) 频繁切换状态判断: 站点 STA统计当前切换信息记录表中有效的、 并且与当前的接入点 API的识别号和 (或) 新的接入点 AP2的识别号匹配的 记录, 如果上述统计值超过某个固定的门限值, 则站点 STA处于频繁切换状 态; 如果上述统计值没有超过某个固定的门限值, 则站点 STA未处于频繁切 换状态(3) frequent handover state determination: the station STA collects records that are valid in the current handover information record table and that match the identification number of the current access point API and/or the identification number of the new access point AP2, if the above If the statistic exceeds a certain threshold, the STA of the station is in a frequently switched state. If the statistic does not exceed a certain threshold, the STA is not frequently switched.  Change state
 (4) 记录切换信息: 如果站点 STA在接入点 API和接入点 AP2间进行 了切换操作, 并与接入点 AP2建立了联接, 则站点 STA在新的切换信息记录 中将接入点 AP2的标识号填入新的接入点标识域, 并将接入点 API的标识号 填入当前接入点标识域。 (4) Recording switching information: If the station STA performs a handover operation between the access point API and the access point AP2 and establishes a connection with the access point AP2, the station STA will access the access point in the new handover information record. The identification number of the AP2 is filled in the new access point identification field, and the identification number of the access point API is filled in the current access point identification field.
 (5)对新增记录项开启时龄机制: 站点 STA对切换信息记录表中的每一 项记录都在某一固定时间内有效, 当记录生存时间超过上述固定时间后,该记 录将被删除。 站点 STA立即对该上述新增的表项启动一个时齢定时器。 如果 表项对应的时龄定时器到期, 则上述表项将被从切换信息记录表中删除,对应 的时龄定时器也将被撤销。 (5) Turning on the age mechanism for newly added records: The STA of the site records the record in the switch information record table for a fixed period of time. When the record lifetime exceeds the above fixed time, the record will be deleted. . The STA immediately starts a time timer for the above newly added entries. If the age timer corresponding to the entry expires, the above entry will be deleted from the switch information record table, and the corresponding age timer will also be revoked.
 下面结合附图和实施例对本发明做进一步详细说明。 The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
 本发明的一个实施应用环境如图 2所示。 An implementation application environment of the present invention is shown in FIG. 2.
 设备 100为符合无线局域网标准 IEEE 802.1 la/b/g的无线网卡设备。 The device 100 is a wireless network card device conforming to the wireless local area network standard IEEE 802.1 la/b/g.
 设备 101和 102为符合无线局域网标准 IEEE 802.1 la/b/g的无线接入点设 备。 Devices 101 and 102 are wireless access point devices that comply with the wireless local area network standard IEEE 802.1 la/b/g.
 设备 100通过扫描信道, 探测到设备 101和设备 102, 并选择设备 101建 立联接。 The device 100 detects the device 101 and the device 102 by scanning the channel, and selects the device 101 to establish a connection.
 符合本发明描述的设备 100的一个频繁切换检测过程如图 3所示,描述如 下 (设备 100的状态转换图见图 4) : A frequent handover detection process for the device 100 in accordance with the present invention is illustrated in Figure 3, as described below (the state transition diagram of device 100 is shown in Figure 4):
 步骤 1, 设备 100与设备 101建立联接。 Step 1. The device 100 establishes a connection with the device 101.
 步骤 2, 设备 100设置为无切换状态。 In step 2, device 100 is set to a no-switch state.
 步骤 3, 判断设备 100的切换信息记录表中的切换记录是否失效?如果有 失效的记录, 则转至步骤 4, 否则转至步骤 5。 Step 3: It is judged whether the switching record in the switching information record table of the device 100 is invalid. If there is a stale record, go to step 4, otherwise go to step 5.
 步骤 4, 删除切换信息记录表中失效的记录, 并撤销对应的定时器。 Step 4: Delete the invalid record in the switch information record table, and cancel the corresponding timer.
 步骤 5, 设备 100搜索是否存在信号质量更好的设备 102, 并且设备 102 满足当前的切换条件, 如果找到则转至步骤 6; 否则转步骤 2。 Step 5: The device 100 searches for the presence of the device 102 with better signal quality, and the device 102 satisfies the current switching condition, and if found, proceeds to step 6; otherwise, proceeds to step 2.
 步骤 6, 设备 100将自己的状态设置为预切换状态。 Step 6, device 100 sets its own state to the pre-switched state.
 步骤 7, 设备 100根据设备 101的识别号、 设备 102的识别号, 在切换信 息列表中统计匹配的记录项。 Step 7. The device 100 counts the matching entries in the switching information list according to the identification number of the device 101 and the identification number of the device 102.
 步骤 8, 判断匹配的记录项数是否大于频繁切换门限? 如果匹配记录项数 大于频繁切换门限, 则转至步骤 9; 否则转至步骤 11。Step 8. Determine whether the number of matching entries is greater than the frequent switching threshold. If the number of matching entries  If it is greater than the frequent switching threshold, go to step 9; otherwise, go to step 11.
 步骤 9, 设备 100将自己的状态设置为频繁切换状态。 Step 9. Device 100 sets its own state to the frequent switching state.
 步骤 10, 设备 100中止切换, 并转至步骤 2。 In step 10, device 100 aborts the switch and proceeds to step 2.
 步骤 11, 设备 100将自己的状态设置为可切换状态。 Step 11. Device 100 sets its own state to a switchable state.
 步骤 12, 设备 100按照当前的切换流程, 由设备 101切换至设备 102。 步骤 13, 设备 100处于可切换状态并完成现有的切换过程后, 更新切换 信息列表。 在切换信息列表中新增一项记录, 在该记录中至少记录设备 101 和设备 102的标识号。 In step 12, the device 100 is switched by the device 101 to the device 102 according to the current handover procedure. Step 13. After the device 100 is in the switchable state and completes the existing handover process, the switch information list is updated. A record is added to the switch information list in which at least the identification numbers of the device 101 and the device 102 are recorded.
 步骤 14, 为切换信息记录表中新增的记录表项启动时间滑动窗口定时器, 对该表项的生存周期开始计时。滑动窗口计数结束后,该表项和对应的滑动窗 口定时器被撤销, 转至步骤 2。 Step 14: Start a time sliding window timer for switching the newly added record entry in the information record table, and start the life cycle of the entry. After the sliding window count is over, the entry and the corresponding sliding window timer are cancelled, and the process goes to step 2.
 当然,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情 况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但 这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。 工业应用性 The invention may, of course, be embodied in a variety of other embodiments without departing from the spirit and scope of the invention. Changes and modifications are intended to be included within the scope of the appended claims. Industrial applicability
 本发明通过对在最近一段时间内记录的切换信息的分析,判断站点是否发 生频繁切换,为避免频繁切换提供了依据,提高了无线局域网环境下站点切换 时的接入效率。 The invention determines whether the site frequently switches by analyzing the switching information recorded in the latest period of time, and provides a basis for avoiding frequent handover, thereby improving the access efficiency when the site is switched in the wireless local area network environment.