WO2015096344A1 - App获取终端的mac地址的方法及系统 - Google Patents

App获取终端的mac地址的方法及系统 Download PDF

Info

Publication number
WO2015096344A1
WO2015096344A1 PCT/CN2014/076703 CN2014076703W WO2015096344A1 WO 2015096344 A1 WO2015096344 A1 WO 2015096344A1 CN 2014076703 W CN2014076703 W CN 2014076703W WO 2015096344 A1 WO2015096344 A1 WO 2015096344A1
Authority
WO
WIPO (PCT)
Prior art keywords
mac address
access network
local terminal
app
terminal
Prior art date
Application number
PCT/CN2014/076703
Other languages
English (en)
French (fr)
Inventor
吴方
雷永成
丁建刚
迟景立
Original Assignee
成都西加云杉科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都西加云杉科技有限公司 filed Critical 成都西加云杉科技有限公司
Priority to US14/421,025 priority Critical patent/US20150207774A1/en
Publication of WO2015096344A1 publication Critical patent/WO2015096344A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/324Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Definitions

  • the present invention relates to communication or, in particular, to a method and system for an APP to acquire a MAC address of a terminal.
  • APP application APPLICATION
  • the network server can indirectly obtain the user's interest requirement by detecting the user's operation on the APP in the terminal, so as to push different customized information to different terminals according to the user's interest demand.
  • the APP needs to obtain the MAC address of the terminal, and inform the network server of the MAC address.
  • the terminal first registers the MAC address information of the terminal in the registry of the terminal.
  • the terminal implements the operation instruction input interface provided by the terminal operating system, and the APP inputs the operation command through the operation instruction. After the interface input is used to obtain the MAC address-related instructions, the terminal's MAC address can be obtained from the terminal's registration list.
  • An object of the present invention is to provide a method and system for an APP to acquire a MAC address of a terminal to solve the above problem.
  • An embodiment of the present invention provides a method for an APP to acquire a MAC address of a terminal, where the method includes: sending a MAC address query request to an access network by using a local terminal; and receiving, by a local terminal, a MAC address returned by the access network.
  • Query response; the MAC address query response carries the MAC address information of the local terminal; the MAC address information is obtained by the access network from the local terminal to communicate with the access network.
  • the method further includes: sending, by the local terminal, a domain name resolution request to the access network, where the domain name resolution request includes the domain name to be resolved, and the domain name to be resolved is pre-stored in the In the APP, the local terminal receives the domain name resolution response returned by the access network, and the domain name resolution response carries the IP address of the device in the access network responsible for responding to the MAC address query request, and the IP address is pre-configured in the access network.
  • the MAC address information obtained by the access network from the local terminal to communicate with the access network includes: MAC address information, obtained from a MAC address query request sent by the local terminal to the access network.
  • the obtaining of the MAC address information by the access network from the local terminal to the access network includes: the MAC address information is obtained from a message exchanged between the local terminal and the access network.
  • the MAC address query response returned by the access network includes: the access network performs the source IP address or the source MAC address carried in the request according to the MAC address, and the pre-established source IP address or source MAC address and the local Corresponding relationship of the MAC address information of the terminal, determining MAC address information corresponding to the local terminal that sends the MAC address query request; carrying the MAC address information corresponding to the local terminal that sends the MAC address query request in the MAC address query response message, and returning the sending MAC address Query the local terminal of the request.
  • a system for acquiring an MAC address of a terminal by an APP includes an APP, a local terminal, and an access network, and the APP is configured to send a MAC address query request to the access network by using the local terminal.
  • the APP is configured to receive the MAC address query response returned by the access network through the local terminal; the MAC address query response carries the MAC address information of the local terminal; the MAC address information, the process of the communication between the local terminal and the access network by the access network Get in.
  • the APP obtains a MAC address of the terminal, and the APP is further configured to send a domain name resolution request to the access network by using the local terminal, where the domain name resolution request includes the domain name to be resolved, and the domain name to be resolved is pre-stored in the APP;
  • the local terminal receives the domain name resolution response returned by the access network, and the domain name resolution response carries the IP address of the device in the access network responsible for responding to the MAC address query request, and the IP address is pre-configured in the access network.
  • the access network is specifically configured to receive a MAC address query request sent by the local terminal, and obtain MAC address information from a MAC address query request sent by the local terminal to the access network.
  • the access network is specifically configured to establish an association with the local terminal, and obtain MAC address information from a message exchanged between the local terminal and the access network.
  • the access network is specifically configured to determine, according to the source IP address or source MAC address carried in the MAC address query request, and the pre-established correspondence between the source IP address or the source MAC address and the MAC address information of the local terminal.
  • the MAC address information corresponding to the local terminal that sends the MAC address query request is sent; the MAC address information corresponding to the local terminal that sends the MAC address query request is carried in the MAC address query response message, and the local terminal that sends the MAC address query request is returned.
  • the method and system for acquiring the MAC address of the terminal by the APP in the above embodiment of the present invention obtains the MAC address information of the local terminal by accessing the third-party server of the network, and then the APP queries the access network, and finally the access network notifies the MAC address information.
  • the APP adopts a method different from the prior art in which the APP directly acquires the local terminal, and solves the problem that the operating system shields the APP from directly acquiring the MAC address of the terminal in the prior art.
  • the foregoing embodiment of the present invention does not rely on the operation instruction input interface, and re-establishes the way for the APP to acquire the MAC address of the terminal, obtains the MAC address of the local terminal through the access network to communicate with the local terminal, and receives the MAC address of the local terminal.
  • the APP sends a MAC address query request
  • the MAC address of the local terminal acquired in the process of communicating with the local terminal is placed in the MAC address query response returned by the APP, so that the APP can Obtain the MAC address of the terminal.
  • FIG. 1 shows the flow
  • an embodiment of the present invention provides a method for an APP to acquire a MAC address of a terminal, where the method is an APP, and the method includes: Step S 1 10 : accessing through a local terminal The network sends a MAC address query request.
  • any message sent by the APP to the access network to send a message needs to pass through the local terminal
  • the local terminal is the terminal including the APP
  • the terminal may be a mobile phone, a notebook computer or a tablet computer.
  • the access network may be a Wi-F i access network.
  • the access network may be regarded as a router.
  • the MAC address query request is sent by the APP to the access network through the local terminal, and the terminal and the access network may Communication means that the local terminal has access to the access network.
  • the sending address of the MAC address query request may be pre-designated by the local terminal, or may be automatically discovered by the local terminal.
  • Step S120 Receive, by the local terminal, a MAC address query response returned by the access network; the MAC address query response carries the MAC address information of the local terminal; and the MAC address information, the process of the communication between the local terminal and the access network by the access network Get in.
  • the process of the communication may be any communication process between the local terminal and the access network, for example, the process in which the local terminal is associated with the access network or the local terminal sends a MAC address query to the access network.
  • the process of requesting here not limiting, may also be obtained from messages exchanged during the association process between the local terminal and the access network.
  • the MAC address information is obtained from the message exchanged in the process of association between the local terminal and the access network.
  • the MAC address information may be obtained during any handshake process of scanning, authenticating, and associating the local terminal with the access network.
  • the access network can obtain the MAC address information through the MAC address query request, and the process of obtaining the MAC address information in the process of the local terminal being associated with the access network is omitted, and may also be associated with the local terminal.
  • Obtaining MAC address information during access to the network increases the flexibility of accessing the network to obtain MAC address information.
  • the MAC address query response returned by the access network includes: the access network performs the source IP address or the source MAC address carried in the request according to the MAC address, and the pre-established source IP address.
  • Corresponding relationship between the address or the source MAC address and the MAC address information of the local terminal determining the MAC address information corresponding to the local terminal that sends the MAC address query request, and carrying the MAC address information corresponding to the local terminal that sends the MAC address query request in the MAC address query
  • the local terminal that sends the MAC address query request is returned in the response message.
  • the MAC address query response is returned in the foregoing manner, and the source IP address carried in the MAC address query request and the correspondence between the source IP address and the MAC address information of the local terminal are determined, and the local terminal corresponding to the MAC address query request is determined.
  • the MAC address information may be determined by the source MAC address and the pre-established correspondence between the source MAC address and the MAC address information of the local terminal to determine the MAC address information corresponding to the local terminal that sends the MAC address query request, so that the access network can Determine this according to any method
  • the MAC address information of the local terminal greatly increases the flexibility of the access network to obtain the MAC address information of the local terminal.
  • the method for obtaining the MAC address of the terminal by the APP in the foregoing embodiment of the present invention uses the third terminal server of the local terminal and the access network to obtain the MAC address information of the local terminal, and then the APP queries the access network, and finally accesses the network to the MAC.
  • the address information informs the APP that the method for directly acquiring the APP from the local terminal is different from the prior art, and solves the problem that the APP intercepts the MAC address of the terminal in the prior art, and does not depend on the operation instruction input interface.
  • Re-establishing the APP to obtain the MAC address of the terminal obtaining the MAC address of the local terminal through the access network to communicate with the local terminal, and when the access network receives the APP to send the MAC address query request,
  • the MAC address of the local terminal obtained during the local terminal communication is placed in the MAC address query response returned by the APP, so that the APP obtains the MAC address of the terminal, and the local terminal sends the MAC address to the network server, and the network server can learn the terminal.
  • a method for acquiring a MAC address of a terminal by using an APP is provided.
  • the method is an implementation method for automatically sending a MAC address query request by a local terminal.
  • the method includes the following steps: Step S 2 1 0:
  • the domain name resolution request is sent to the access network by using the local terminal, and the domain name resolution request includes the domain name to be resolved, and the domain name to be resolved is pre-stored in the APP.
  • the domain name to be resolved may be www. wha tis myma c. com, and the domain name to be resolved is pre-stored in the APP.
  • the access network receives a plurality of domain name resolution requests, but the domain name to be resolved in the domain name resolution may be pre-stored in the APP, or may not be stored in the APP, and is not stored in the APP.
  • the domain name resolution request of the resolved domain name the access network directly forwards the domain name resolution request to the corresponding domain name resolution system for parsing, and obtains the corresponding MAC address, which is not introduced here.
  • the access network detects the domain name resolution request and terminates the domain name resolution request.
  • the i or name to be resolved pre-stored in the APP needs to be known in advance.
  • Step S220 Receive, by the local terminal, a domain name resolution response returned by the access network, where the domain name resolution response carries the IP address of the device in the access network responsible for responding to the MAC address query request, and the IP address is pre-configured in the access network.
  • the access network has two functions, the first function is responsible for user access, and the second function is to provide query request response for MAC address information.
  • Step S230 Send a MAC address query request to the access network by using the local terminal.
  • Step S240 Receive, by the local terminal, a MAC address query response returned by the access network; the MAC address query response carries the MAC address information of the local terminal; and the MAC address information is used by the access network to communicate with the access network from the local terminal.
  • the method for obtaining the MAC address of the terminal by the APP in the embodiment the IP address of the access network in the access network is automatically found by the APP, and the step of pre-configuring the sending address of the MAC address query request by the local terminal is omitted, as long as the local terminal triggers An access request for the domain name to be resolved, and the domain name to be resolved is pre-stored in the APP, and the process of obtaining the IP address of the device in the access network responsible for responding to the MAC address query request is initiated. After the IP address of the device in the access network responsible for responding to the MAC address query request, the APP can send a MAC address query request to the IP address.
  • the embodiment is implemented by the local terminal and the access network, and is an application instance that the APP obtains the MAC address information of the local terminal through the IP layer data interaction by using the access network.
  • the method includes the following steps: Step S301: The local terminal is associated with the Wi-F i access network; Step S302: The Wi-F i access network acquires the MAC address information of the local terminal in the association process; Step S 303: The APP initiates an IP layer query information to the Wi_F i access network through the local terminal, and queries the MAC address information of the local terminal.
  • Step S304 The Wi-Fi access network confirms the MAC address information of the terminal that belongs to the sending query message according to the source IP address or the source MAC address in the IP layer query information.
  • Step S305 The access network carries the MAC address information in the access network.
  • the MAC address query response is returned to the APP.
  • FIG. 4 is a signaling flowchart of a method for an APP to automatically obtain an IP address for a MAC address inquiry service response in a Wi_Fi access network according to the present invention, which specifically includes the following steps: Step S401: Local terminal is associated with Wi-Fi access Network; Step S402: The APP triggers access to the domain name to be resolved. For example, the domain name to be resolved is: www.whatismymac.com; Step S403: The local terminal initiates a domain name resolution message about www.
  • Step S404 The access network terminates the domain name resolution message, and obtains a response MAC address query The IP address of the requested device; Step S405: Finding the IP address returns the APP.
  • a system for acquiring an MAC address of a terminal is provided. As shown in FIG. 5, the system includes an APP 10, a local terminal 20, and an access network 30. The APP 10 is used to pass through a local terminal.
  • the system provided in this embodiment can perform the method for obtaining the MAC address of the terminal by using the APP1 0 provided by the embodiment of the present invention, and has corresponding functions and beneficial effects, which are not described herein again.
  • the system for acquiring the MAC address of the terminal by the APP 10 includes: the APP 10 sends a domain name resolution request to the access network 30 through the local terminal 20, where the domain name resolution request includes the domain name to be resolved, and the domain name to be parsed is pre-stored.
  • the APP 10 receives the domain name resolution response returned by the access network 30 through the local terminal 20, and the domain name resolution response carries the IP address of the device in the access network 30 responsible for responding to the MAC address query request, and the IP address is pre-configured in the access.
  • network 30 the APP 10 sends a domain name resolution request to the access network 30 through the local terminal 20, where the domain name resolution request includes the domain name to be resolved, and the domain name to be parsed is pre-stored.
  • the APP 10 receives the domain name resolution response returned by the access network 30 through the local terminal 20, and the domain name resolution response carries the IP address of the device in the access network 30 responsible for responding to the MAC address query request, and the IP address is pre-configured in
  • the local terminal 20 sends a MAC address query request to the access network 30, and obtains MAC address information from the MAC address query request sent by the local terminal 20 to the access network 30.
  • the local terminal 20 establishes an association with the access network 30, and obtains MAC address information from messages exchanged during the association process between the local terminal 20 and the access network 30.
  • the MAC address query response returned by the access network 30 is specifically: the access network 30 is specifically configured to: the source IP address or the source MAC address carried in the MAC address query request, and the pre-established source IP address.
  • the system for obtaining the MAC address of the terminal by the APP of the present invention may perform the technical solution of the method embodiment in any of the embodiments of FIG. 1 to FIG. 4, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Abstract

本发明涉及通信领域,尤其涉及APP获取终端的MAC地址的方法及系统。其中,上述方法包括:通过本地终端向接入网络发送MAC地址查询请求;通过本地终端接收接入网络返回的MAC地址查询响应;MAC地址查询响应中携带本地终端的MAC地址信息;MAC地址信息,由接入网络从本地终端与接入网络进行通信的过程中获取。本发明提供的APP获取终端的MAC地址的方法及系统,通过接入网络这个第三方服务器获取本地终端的MAC地址信息,然后APP向接入网络查询,最后接入网络将MAC地址信息告知APP,解决了现有技术中操作系统屏蔽APP直接获取终端的MAC地址的途径的问题。

Description

APP获取终端的 MAC地址的方法及系统 技术领域 本发明涉及通信领或, 具体而言, 涉及 APP获取终端的 MAC地址 的方法及系统。 背景技术 目前,如手机、平板电脑等终端已经成为人们日常生活的必需品。 通常终端中会安装有应用程序 APPLICATION (以下简称 APP ), 来丰富 终端的功能。 而网络服务器通过检测用户对终端中 APP的操作情况, 可以间接获取用户的兴趣需求,从而针对用户的兴趣需求向不同的终 端推送不同的定制化信息。 为了实现由网络月良务器向终端推送可以满足用户需求的信息 , APP需获取终端的 MAC地址, 并将该 MAC地址告知网络月良务器。 相关 技术中, 终端首先将本终端的 MAC地址信息注册到终端的注册表中, 当 APP需要获取终端的 MAC地址时,是通过终端操作系统提供的运行 指令输入界面实现, APP通过该运行指令输入界面输入用于获取 MAC 地址相关的指令后, 即可从终端的注册列表中获取终端的 MAC地址。 但是, 在采用某些系统的终端, 如采用 I0S7 系统的终端中, 终 端不再提供运行指令输入界面,即屏蔽了 APP获取终端的 MAC地址的 途径, 因此 APP将无法获取终端的 MAC地址, 从而网络服务器无法获 知终端的 MAC地址, 不能区分不同的终端, 无法实现向不同的终端推 送不同的定制化信息。 发明内容 本发明的目的在于提供一种 APP获取终端的 MAC地址的方法及系 统, 以解决上述的问题。 在本发明的实施例中提供了一种 APP获取终端的 MAC地址的方法, 该方法包括: 通过本地终端向接入网络发送 MAC地址查询请求; 通过 本地终端接^:接入网络返回的 MAC地址查询响应; MAC地址查询响应 中携带本地终端的 MAC地址信息; MAC地址信息, 由接入网络从本地 终端与接入网络进行通信的过程中获取。 优选地,在通过本地终端向接入网络发送 MAC地址查询请求之前, 还包括: 通过本地终端向接入网络发送域名解析请求, 域名解析请求 中包括待解析的域名, 待解析的域名预先存储在 APP中; 通过本地终 端接收接入网络返回的域名解析响应,域名解析响应中携带接入网络 中负责应答 MAC地址查询请求的设备的 I P地址, I P地址预先配置在 接人网络中。 优选地 , MAC地址信息, 由接入网络从本地终端与接入网络进行 通信的过程中获取包括: MAC地址信息, 从本地终端向接入网络发送 的 MAC地址查询请求中获取。 优选地 , MAC地址信息, 由接入网络从本地终端与接入网络进行 通信的过程中获取包括: MAC地址信息从本地终端与接入网络的关联 过程中交换的消息中获取。 优选地, 接入网络返回的 MAC地址查询响应, 包括: 接入网络才艮 据 MAC地址查询请求中携带的源 I P地址或源 MAC地址 , 以及预先建 立的, 源 I P地址或源 MAC地址与本地终端的 MAC地址信息的对应关 系 , 确定发送 MAC地址查询请求的本地终端对应的 MAC地址信息; 将发送 MAC地址查询请求的本地终端对应的 MAC地址信息携带在 MAC地址查询响应消息中返回发送 MAC地址查询请求的本地终端。 在本发明的另一实施例中还提供了一种 APP获取终端的 MAC地址 的系统, 该系统包括 APP、 本地终端和接入网络; APP用于通过本地 终端向接入网络发送 MAC地址查询请求; APP用于通过本地终端接收 接入网络返回的 MAC地址查询响应; MAC地址查询响应中携带本地终 端的 MAC地址信息; MAC地址信息, 由接入网络从本地终端与接入网 络进行通信的过程中获取。 优选地, 该 APP获取终端的 MAC地址的系统, APP还用于通过本 地终端向接入网络发送域名解析请求,域名解析请求中包括待解析的 域名, 待解析的域名预先存储在 APP中; 通过本地终端接收接入网络 返回的域名解析响应 , 域名解析响应中携带接入网络中负责应答 MAC 地址查询请求的设备的 I P地址, I P地址预先配置在接入网络中。 优选地,接入网络具体用于接收本地终端发送的 MAC地址查询请 求,从本地终端向接入网络发送的 MAC地址查询请求中获取 MAC地址 信息。 优选地,接入网络具体用于与本地终端建立关联, 从本地终端与 接入网络的关联过程中交换的消息中获取 MAC地址信息。 优选地,接入网络具体用于,根据 MAC地址查询请求中携带的源 I P地址或源 MAC地址, 以及预先建立的 , 源 IP地址或源 MAC地址与 本地终端的 MAC地址信息的对应关系 ,确定发送 MAC地址查询请求的 本地终端对应的 MAC地址信息;将发送 MAC地址查询请求的本地终端 对应的 MAC地址信息携带在 MAC地址查询响应消息中返回发送 MAC 地址查询请求的本地终端。 本发明上述实施例的 APP获取终端的 MAC地址的方法及系统,通 过接入网络这个第三方服务器获取本地终端的 MAC 地址信息, 然后 APP向接入网络查询, 最后接入网络将 MAC地址信息告知 APP , 采用 的是不同于现有技术中 APP直接向本地终端获取的方法,解决了现有 技术中操作系统屏蔽 APP直接获取终端的 MAC地址的途径的问题。 本发明上述实施例不依赖于运行指令输入界面, 重新建立了 APP 获取终端的 MAC地址的途径,通过接入网络在本地终端与其进行通信 的过程获取本地终端的 MAC地址, 并且当接入网络接收到 APP发送 MAC地址查询请求后, 将其在与本地终端通信的过程中获取的本地终 端的 MAC地址置于其向 APP返回的 MAC地址查询响应,使得 APP可以 获取到终端的 MAC地址。 之后, 本地终端就可以将 MAC地址发给网络 月良务器, 进而网络月良务器可以获知终端的 MAC地址, 通过终端的 MAC 地址区分不同的终端 , 实现向不同的终端推送不同的定制化信息。 附图说明 图 1示 流程
图 2示 流程
图 3示 信令 流程图; 图 4示 法信令流 程图; 图 5示 系统的结构 示意图 具体实施方式 下面通过具体的实施例并结合附图对本发明做进一步的详细描 如图 1 所示, 在本发明的实施例中提供了一种 APP获取终端的 MAC地址的方法, 该方法是以 APP为执行主体, 该方法包括: 步骤 S 1 10 : 通过本地终端向接入网络发送 MAC地址查询请求。 具体地, 在步骤 S 11 G 中, APP向接入网络发送消息发送的任何 消息均需通过本地终端, 本地终端即为包括该 APP的终端, 该终端可 以是手机、 笔记本电脑或平板电脑等。接入网络可以是 Wi-F i接入网 络、 在本发明中, 接入网络可以看作是一个路由器, MAC地址查询请 求是 APP通过本地终端发送给接入网络的,终端与接入网络可以通信 , 即表示本地终端已接入到接入网络中。 MAC地址查询请求的发送地址 可以是本地终端预先指定的, 还可以是本地终端自动发现的。 步骤 S 120 : 通过本地终端接收接入网络返回的 MAC地址查询响 应; MAC地址查询响应中携带本地终端的 MAC地址信息; MAC地址信 息, 由接入网络从本地终端与接入网络进行通信的过程中获取。 可选地, 在步骤 S 120中, 该通信的过程可以是本地终端与接入 网络的任一通信过程,例如本地终端关联到接入网络的过程或是本地 终端向接入网络发送 MAC地址查询请求的过程, 在此不 #支限制, 还可 以是从所述本地终端与所述接入网络的关联过程中交换的消息中获 取。 关于 MAC 地址信息从本地终端与接入网络的关联过程中交换的 消息中获取, 可选地, MAC地址信息可以是在本地终端与接入网络的 扫描、 认证和关联的任一握手过程中获取的。 在本实施例中, 接入网络既可以通过 MAC 地址查询请求中获取 MAC地址信息, 省去了在本地终端关联到接入网络过程中获取 MAC地 址信息的过程, 当然也可以从本地终端关联到接入网络过程中获取 MAC地址信息, 增加了接入网络获取 MAC地址信息的灵活性。 优选地 , 在步聚 S 120中, 接入网络返回的 MAC地址查询响应 , 包括: 接入网络才艮据 MAC地址查询请求中携带的源 IP地址或源 MAC 地址, 以及预先建立的, 源 I P地址或源 MAC地址与本地终端的 MAC 地址信息的对应关系,确定发送 MAC地址查询请求的本地终端对应的 MAC地址信息; 将发送 MAC地址查询请求的本地终端对应的 MAC地址 信息携带在 MAC地址查询响应消息中返回发送 MAC地址查询请求的本 地终端。 采用上述方式返回 MAC地址查询响应,不但可以才艮据 MAC地址查 询请求中携带的源 I P地址以及源 I P地址与本地终端的 MAC地址信息 的对应关系,确定发送 MAC地址查询请求的本地终端对应的 MAC地址 信息, 还可以通过源 MAC地址, 以及预先建立的, 源 MAC地址与本地 终端的 MAC地址信息的对应关系 ,确定发送 MAC地址查询请求的本地 终端对应的 MAC地址信息,使得接入网络可以根据任一种方式确定本 地终端的 MAC地址信息,大大增加接入网络获取本地终端的 MAC地址 信息的灵活性。 本发明上述实施例的 APP获取终端的 MAC地址的方法,采用了通 过本地终端与接入网络这个第三方服务器获取本地终端的 MAC 地址 信息, 然后 APP向接入网络查询, 最后接入网络将 MAC地址信息告知 APP , 采用的是不同于现有技术中 APP直接向本地终端获取的方法, 解决了现有技术中屏蔽了 APP获取终端的 MAC地址的途径的问题,不 依赖于运行指令输入界面,重新建立了 APP获取终端的 MAC地址的途 径, 通过接入网络在本地终端与其进行通信的过程获取本地终端的 MAC地址 , 并且当接入网络接收到 APP发送 MAC地址查询请求后 , 将 其在与本地终端通信的过程中获取的本地终端的 MAC 地址置于其向 APP返回的 MAC地址查询响应, 使得 APP获取终端的 MAC地址, 本地 终端将 MAC 地址发给网络服务器, 进而网络服务器可以获知终端的 MAC地址 , 通过终端的 MAC地址区分不同的终端 , 实现向不同的终端 推送不同的定制化信息。 如图 2所示,在本发明的另一实施例中还提供了一种 APP获取终 端的 MAC地址的方法,该方法是 MAC地址查询请求的发送地址是由本 地终端自动发现的实现方法, 具体包括: 步骤 S 2 1 0 : 通过本地终端向接入网络发送域名解析请求, 域名 解析请求中包括待解析的域名 , 待解析的域名预先存储在 APP中。 具体地 , 待解析的域名可以是 www. wha t i s myma c. com, 该待解析 的域名是预先存储在 APP中的。 通常接入网络会接收到多个域名解析请求,但是域名解析中的待 解析的域名可以是预先存储在 APP 中的, 还可以是没有存储在 APP 中的, 对于携带没有存储在 APP中的待解析的域名的域名解析请求, 接入网络直接将该域名解析请求转发给相应的域名解析系统进行解 析, 获取相应的 MAC地址, 在此不做介绍。 对于携带预先存储在 APP 中的待解析的域名的域名解析请求 ,接入网络监测到该域名解析请求 后, 终结该域名解析请求。 在此之前接入网络需预先获知预先存储在 APP中的待解析的 i或名。 步骤 S 220: 通过本地终端接收接入网络返回的域名解析响应, 域名解析响应中携带接入网络中负责应答 MAC 地址查询请求的设备 的 I P地址, I P地址预先配置在接入网络中。 在实际应用中,接入网络具有两个功能, 第一个功能是负责用户 的接入, 第二个功能是提供 MAC地址信息的查询请求应答。 步骤 S230: 通过本地终端向接入网络发送 MAC地址查询请求。 步骤 S240: 通过本地终端接收接入网络返回的 MAC地址查询响 应; MAC地址查询响应中携带本地终端的 MAC地址信息; MAC地址信 息 , 由接入网络从本地终端与接入网络进行通信的过程中获取。 关于步聚 S 230和 S 240的实现原理可以参照图 1所示实施例中步 l S I 10和步聚 S 120的具体介绍。 本实施例提供的 APP获取终端的 MAC地址的方法,通过 APP 自动 发现接入网络的中负责应答业务的 IP地址, 省去本地终端预先配置 MAC地址查询请求的发送地址的步骤, 只要本地终端触发了一个待解 析的域名的访问请求, 且该待解析的域名是预先存储在 APP中的, 就 启动了获取接入网络中负责应答 MAC地址查询请求的设备的 IP地址 的流程,待本地终端获取到接入网络中负责应答 MAC地址查询请求的 设备的 IP地址后, APP ύ可以通过向该 IP地址发送 MAC地址查询请 求。
图, 该实施例是本地终端和接入网络配合执行的, 是属于 APP借助接 入网络, 通过 IP层数据交互, 获取本地终端的 MAC地址信息的应用 实例。 具体包括:^下步一骤: 步骤 S 301: 本地终端关联到 Wi-F i接入网络; 步骤 S 302 : Wi-F i 接入网络在关联过程中获取本地终端的 MAC 地址信息; 步骤 S 303 : APP通过本地终端向 Wi_F i接入网络发起 IP层查询 信息, 询问本地终端的 MAC地址信息; 步骤 S304: Wi-Fi接入网络才艮据 IP层查询信息中的源 IP地址或 源 MAC地址, 确认属于发送查询消息的终端的 MAC地址信息; 步骤 S305: 接入网络将 MAC地址信息携带在 MAC地址查询响应 中返回给 APP。 图 4 示出了本发明中 APP 自动获取 Wi_Fi接入网络中负责 MAC 地址查询业务应答的 IP地址的方法的信令流程图, 具体包括如下步 骤: 步骤 S401: 本地终端关联到 Wi-Fi接入网络; 步骤 S402: APP触发对待解析的域名的访问。 例如待解析的域名 为: www.whatismymac. com; 步骤 S403: 本地终端发起关于 www. whatismymac. com的域名解 析报文; 步骤 S404: 接入网络终结该域名解析报文, 获取负责应答 MAC 地址查询请求的设备的 IP地址; 步骤 S405: 寻该 IP地址返回 APP。 在本发明的另一实施例中还提供了一种 APP获取终端的 MAC地址 的系统, 如图 5所示, 该系统包括 APP 10、 本地终端 20和接入网络 30; APP10用于通过本地终端 20向接入网络 30发送 MAC地址查询请 求; APP1 0用于通过本地终端 20接收接入网络 30返回的 MAC地址查 询响应; MAC地址查询响应中携带本地终端 20的 MAC地址信息; MAC 地址信息, 由接入网络 30从本地终端 20与接入网络 30进行通信的 过程中获取。 本实施例所提供的系统可以执行本发明实施例提供的 APP1 0 获 取终端的 MAC地址的方法, 具备相应的功能和有益效果, 此处不再赘 述。 优选地 , 该 APP 1 0获取终端的 MAC地址的系统还包括: APP 1 0通 过本地终端 20向接入网络 30发送域名解析请求,域名解析请求中包 括待解析的域名, 待解析的域名预先存储在 APP1 0中; APP10通过本 地终端 20接收接入网络 30返回的域名解析响应,域名解析响应中携 带接入网络 30 中负责应答 MAC地址查询请求的设备的 I P地址, IP 地址预先配置在接入网络 30中。 优选地, 本地终端 20向接入网络 30发送 MAC地址查询请求,从 本地终端 20向接入网络 30发送的 MAC地址查询请求中获取 MAC地址 信息。 优选地, 本地终端 20与接入网络 30建立关联, 从本地终端 20 与接入网络 30的关联过程中交换的消息中获取 MAC地址信息。 优选地 , 接入网络 30返回的 MAC地址查询响应具体为: 接入网 络 30具体用于, 才艮据 MAC地址查询请求中携带的源 I P地址或源 MAC 地址, 以及预先建立的, 源 IP地址或源 MAC地址与本地终端 20的 MAC地址信息的对应关系 ,确定发送 MAC地址查询请求的本地终端 2 0 对应的 MAC地址信息; 将发送 MAC地址查询请求的本地终端 20对应 的 MAC地址信息携带在 MAC地址查询响应消息中返回发送 MAC地址查 询请求的本地终端 20。 本发明提供的 APP获取终端的 MAC地址的系统可以执行图 1—图 4 中任一方法实施例的技术方案, 其实现原理和技术效果类似, 此处不 再赘述。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本 发明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应 包含在本发明的保护范围之内。

Claims

权利要求
1. 一种 APP获取终端的 MAC地址的方法, 其特征在于 , 包括: 通过本地终端向接入网络发送 MAC地址查询请求; 通过所述本地终端接收所述接入网络返回的 MAC地址查询 响应;
所述 MAC地址查询响应中携带所述本地终端的 MAC地址信 息;
所述 MAC地址信息, 由所述接入网络从所述本地终端与所 述接入网络进行通信的过程中获取。
2. 根据权利要求 1 所述的方法, 其特征在于, 在所述通过本地终 端向接入网络发送 MAC地址查询请求之前, 还包括: 通过所述本地终端向所述接入网络发送域名解析请求, 所 述域名解析请求中包括待解析的域名 , 所述待解析的域名预先 存储在所述 APP中; 通过所述本地终端接收所述接入网络返回的域名解析响应, 所述域名解析响应中携带所述接入网络中负责应答所述 MAC地 址查询请求的设备的 IP地址, 所述 I P地址预先配置在所述接 人网络中。
3. 根据权利要求 1所述的方法,其特征在于,所述 MAC地址信息, 由所述接入网络从所述本地终端与所述接入网络进行通信的过 程中获取包括: 所述 MAC地址信息, 从本地终端向接入网络发 送的所述 MAC地址查询请求中获取。
4. 根据权利要求 1所述的方法,其特征在于,所述 MAC地址信息, 由所述接入网络从所述本地终端与所述接入网络进行通信的过 程中获取包括: 所述 MAC地址信息从所述本地终端与所述接入 网络的关联过程中交换的消息中获取。
5. 根据权利要求 1 所述的方法, 其特征在于, 所述接入网络返回 MAC地址查询响应, 包括: 所述接入网络才艮据所述 MAC地址查询请求中携带的源 I P地 址或源 MAC地址, 以及预先建立的, 源 IP地址或源 MAC地址与 本地终端的 MAC地址信息的对应关系 , 确定发送所述 MAC地址 查询请求的本地终端对应的 MAC地址信息; 将发送所述 MAC地址查询请求的本地终端对应的 MAC地址 信息携带在 MAC地址查询响应消息中返回发送所述 MAC地址查 询请求的本地终端。
6. 一种 APP获取终端的 MAC地址的系统 ,其特征在于, 包括 APP、 本地终端和接入网络;
所述 APP用于通过所述本地终端向所述接入网络发送 MAC 地址查询请求;通过所述本地终端接收所述接入网络返回的 MAC 地址查询响应; 所述 MAC地址查询响应中携带所述本地终端的 MAC地址信 息;
所述 MAC地址信息, 由所述接入网络从所述本地终端与所 述接入网络进行通信的过程中获取。
7. 根据权利要求 6所述的系统, 其特征在于, 所述 APP还用于: 通过所述本地终端向所述接入网络发送域名解析请求, 所 述域名解析请求中包括待解析的域名 , 所述待解析的域名预先 存储在所述 APP中; 通过所述本地终端接收所述接入网络返回的域名解析响应, 所述域名解析响应中携带所述接入网络中负责应答所述 MAC地 址查询请求的设备的 IP地址, 所述 IP地址预先配置在所述接 人网络中。 根据权利要求 6所述的系统, 其特征在于, 所述接入网络具体 用于接收所述本地终端发送的所述 MAC地址查询请求, 从所述 本地终端向所述接入网络发送的所述 MAC地址查询请求中获取 所述 MAC地址信息。 根据权利要求 6所述的系统, 其特征在于, 所述接入网络具体 用于与所述本地终端建立关联 , 从所述本地终端与所述接入网 络的关联过程中交换的消息中获取所述 MAC地址信息。 根据权利要求 6所述的系统, 其特征在于, 所述接入网络具体 用于 , 才艮据所述 MAC地址查询请求中携带的源 I P地址或源 MAC 地址, 以及预先建立的, 源 IP地址或源 MAC地址与本地终端的 MAC地址信息的对应关系, 确定发送所述 MAC地址查询请求的 本地终端对应的 MAC地址信息; 将发送所述 MAC地址查询请求的本地终端对应的 MAC地址信 息携带在 MAC地址查询响应消息中返回发送所述 MAC地址查询 请求的本地终端。
PCT/CN2014/076703 2013-12-23 2014-05-04 App获取终端的mac地址的方法及系统 WO2015096344A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/421,025 US20150207774A1 (en) 2013-12-23 2014-05-04 Method and System of APP for Obtaining MAC Address of Terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310717996.3A CN103647856B (zh) 2013-12-23 2013-12-23 App获取本地终端的mac地址的方法及系统
CN201310717996.3 2013-12-23

Publications (1)

Publication Number Publication Date
WO2015096344A1 true WO2015096344A1 (zh) 2015-07-02

Family

ID=50253009

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/076703 WO2015096344A1 (zh) 2013-12-23 2014-05-04 App获取终端的mac地址的方法及系统

Country Status (3)

Country Link
US (1) US20150207774A1 (zh)
CN (1) CN103647856B (zh)
WO (1) WO2015096344A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647856B (zh) * 2013-12-23 2017-09-08 成都西加云杉科技有限公司 App获取本地终端的mac地址的方法及系统
CN108551675B (zh) * 2014-04-14 2022-04-15 创新先进技术有限公司 一种应用客户端、服务端及对应的Portal认证方法
CN105635337A (zh) * 2015-12-31 2016-06-01 山东泰信电子股份有限公司 一种绑定iOS设备的方法、iOS设备及辅助设备
JP2017143497A (ja) * 2016-02-12 2017-08-17 富士通株式会社 パケット転送装置及びパケット転送方法
CN106790756B (zh) * 2016-12-29 2020-04-24 国网智能科技股份有限公司 配电终端mac地址自动生成方法及系统
CN107786559B (zh) * 2017-10-30 2020-04-24 江西博瑞彤芸科技有限公司 终端注册方法及系统
CN108282549A (zh) * 2018-01-29 2018-07-13 上海康斐信息技术有限公司 一种路由器、通过扫描二维码获取终端标识的方法及系统
CN108833607B (zh) * 2018-06-12 2022-03-11 腾讯科技(深圳)有限公司 物理地址获取方法、装置及可读介质
CN111385371B (zh) * 2018-12-28 2022-10-21 钉钉控股(开曼)有限公司 Mac地址获取方法、装置和设备
CN111107174B (zh) * 2019-11-25 2022-08-30 视联动力信息技术股份有限公司 一种地址解析方法、装置、电子设备及存储介质
CN111131546A (zh) * 2019-12-25 2020-05-08 宁波奥克斯电气股份有限公司 终端mac地址的获取方法、装置、系统、终端及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212398A (zh) * 2006-12-29 2008-07-02 王立刚 一种接入系统及方法
CN103024851A (zh) * 2012-11-23 2013-04-03 福建星网锐捷网络有限公司 基于无线网络的报文传输方法、装置及网络设备
CN103079201A (zh) * 2011-10-26 2013-05-01 中兴通讯股份有限公司 无线局域网的快速认证方法、ac及系统
CN103647856A (zh) * 2013-12-23 2014-03-19 成都西加云杉科技有限公司 App获取终端的mac地址的方法及系统

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100544343C (zh) * 2004-06-25 2009-09-23 杭州华三通信技术有限公司 用户登录名和ip地址绑定的实现方法
JP2006060464A (ja) * 2004-08-19 2006-03-02 Fujitsu Ltd 無線ネットワーク通信制御装置及びネットワークシステム
US7702309B2 (en) * 2005-05-04 2010-04-20 Nokia Corporation Using MAC address of a WLAN access point as location information
BRPI0520204B1 (pt) * 2005-05-23 2018-05-15 Telefonaktiebolaget Lm Ericsson Publ Métodos para comunicação não hierárquica em uma rede de agregação e para associação de dispositivos finais usando o proxy de arp de fluxo contrário e o proxy de arp de fluxo normal, e, sistema para comunicação não hierárquica em uma rede de agregação
US9166883B2 (en) * 2006-04-05 2015-10-20 Joseph Robert Marchese Network device detection, identification, and management
CN101155229A (zh) * 2006-09-28 2008-04-02 郑大勇 一种分布式防伪和产品信息追踪的方法和系统
CN101674268A (zh) * 2009-09-25 2010-03-17 中兴通讯股份有限公司 接入因特网控制装置及其方法、网关
US8745266B2 (en) * 2011-06-30 2014-06-03 Citrix Systems, Inc. Transparent layer 2 redirection of request to single sign in service based on applying policy to content of request
CN102957755B (zh) * 2011-08-22 2018-06-19 中兴通讯股份有限公司 一种地址解析方法、装置及信息传输方法
CN102780584B (zh) * 2012-07-25 2016-06-22 杭州华三通信技术有限公司 一种快速访问以太网设备网管系统的方法及装置
CN102892074A (zh) * 2012-09-26 2013-01-23 上海顶竹通讯技术有限公司 获取终端位置信息的系统及方法
EP2866386B1 (en) * 2013-08-26 2020-01-22 Jeong Hoan Seo Domain name system and domain name service method based on user information
US9225681B2 (en) * 2013-09-17 2015-12-29 Cisco Technology, Inc. Enabling mobile applications to acquire a MAC address for obtaining location information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212398A (zh) * 2006-12-29 2008-07-02 王立刚 一种接入系统及方法
CN103079201A (zh) * 2011-10-26 2013-05-01 中兴通讯股份有限公司 无线局域网的快速认证方法、ac及系统
CN103024851A (zh) * 2012-11-23 2013-04-03 福建星网锐捷网络有限公司 基于无线网络的报文传输方法、装置及网络设备
CN103647856A (zh) * 2013-12-23 2014-03-19 成都西加云杉科技有限公司 App获取终端的mac地址的方法及系统

Also Published As

Publication number Publication date
CN103647856A (zh) 2014-03-19
US20150207774A1 (en) 2015-07-23
CN103647856B (zh) 2017-09-08

Similar Documents

Publication Publication Date Title
WO2015096344A1 (zh) App获取终端的mac地址的方法及系统
US9667674B2 (en) Method, device, and system for connecting to a communication device
CN109842906B (zh) 一种通信的方法、装置及系统
US8671206B2 (en) Apparatus and mechanism for dynamic assignment of survivability services to mobile devices
CN109803242B (zh) 通过nrf进行nf发现的方法、设备及可读存储介质
WO2021057889A1 (zh) 一种数据处理方法、装置、电子设备及存储介质
WO2020057163A1 (zh) Mec平台部署方法及装置
WO2016008320A1 (zh) 获取终端在网络中的标识的方法、管理网元及存储介质
US20190014532A1 (en) Adss enabled global roaming system
WO2014179913A1 (zh) 一种wifi设备无需配置直接连接wifi路由器的方法
WO2012000271A1 (zh) 终端接入方法和无线通信网络
WO2014094240A1 (zh) 一种互联网应用交互方法、装置及系统
WO2011160587A1 (zh) 一种双栈终端连接网络的方法及系统
WO2015055102A1 (zh) 一种用于调用网络功能的方法及装置
EP2693691B1 (en) Method and apparatus for initializing gateway in device management system
WO2011120365A1 (zh) 多穴终端建立连接的方法和系统
CN114025023B (zh) 回源方法、装置、设备及计算机可读存储介质
CN114006915B (zh) 资源请求方法、装置、设备及计算机可读存储介质
WO2009062396A1 (fr) Procédé d'accès à des ressources et système d'accès à des ressources
WO2014008822A1 (zh) 设置dns服务器地址的方法、装置及系统
US9031060B2 (en) Voice over internet protocol system and method
WO2011103744A1 (zh) 移动切换的实现方法、系统和装置
JP2017220730A (ja) デバイスid管理サーバ、デバイスid管理方法、及びプログラム
WO2011100876A1 (zh) 一种实现网络侧去附着过程的方法及系统
WO2011137804A1 (zh) 策略的获取方法及装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 14421025

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14874518

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14874518

Country of ref document: EP

Kind code of ref document: A1