WO2014166197A1 - Device and method for positioning - Google Patents

Device and method for positioning Download PDF

Info

Publication number
WO2014166197A1
WO2014166197A1 PCT/CN2013/082795 CN2013082795W WO2014166197A1 WO 2014166197 A1 WO2014166197 A1 WO 2014166197A1 CN 2013082795 W CN2013082795 W CN 2013082795W WO 2014166197 A1 WO2014166197 A1 WO 2014166197A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
positioning
wireless communication
request
service
Prior art date
Application number
PCT/CN2013/082795
Other languages
French (fr)
Chinese (zh)
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 中兴通讯股份有限公司
Publication of WO2014166197A1 publication Critical patent/WO2014166197A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information

Definitions

  • the present invention relates to the field of positioning technologies, and in particular, to an apparatus and method for positioning.
  • USB Universal Serial Bus
  • GPS Global Positioning System
  • UFI (a data card with WIFI capability) is an upgrade of data cards, unlike traditional data card products.
  • users use it as a router.
  • UFI products do not need to be connected to a computer, but are used as a wireless router.
  • USB port As the conventional data card for GPS data transmission.
  • products like UFI cannot implement positioning.
  • the technical problem to be solved by the present invention is to provide an apparatus and method for positioning, which enables a wireless embedded device to implement a positioning function.
  • an apparatus for positioning includes: a page service module, a location service module, and a positioning module, where:
  • the page service module is configured to: receive a request sent by a requesting party by using a wireless communication manner, Sending the received request to the location service module, and sending the response of the location service module to the request to the requester by using a wireless communication manner;
  • the location service module is configured to: operate the positioning module according to the request sent by the requesting party, and respond to the request sent by the requesting party;
  • the positioning module is configured to: provide data for performing a positioning service.
  • the page service module is configured to: when receiving a connection establishment request from the requester by wireless communication, send the connection establishment request to the location service module, and receive from the location service module When the data of the positioning module is obtained, the data of the positioning module is sent to the requesting party by wireless communication;
  • the location service module is configured to: after receiving the connection establishment request from the page service module, send a connection establishment request to the positioning module, establish a wireless connection between the requesting party and the positioning module, and establish the data of the positioning module. A wireless connection is sent to the page service module.
  • the page service module is configured to: when receiving a positioning status request message from the requesting party by using a wireless communication manner, send the positioning status request message to the positioning service module, and in the secondary positioning service When receiving the status information and the port number of the positioning module, the module sends the status information and the port number of the positioning module to the requesting party by using a wireless communication manner;
  • the location service module is configured to: after receiving the location status request message from the page service module, open the location module, and send status information and port number of the location module to the page service module.
  • An apparatus for providing a location service comprising: an application module, a virtual serial port module, and a wireless communication network module, where: the application module is configured to: send a request to the wireless communication network module by using the virtual serial port module, and pass the The virtual serial port module receives the response of the request from the wireless communication network module, and provides a positioning service to the user according to the content of the response;
  • the wireless communication network module is configured to: send, by using a wireless communication manner, a request of the application module received from a virtual serial port module to a device for positioning, and use the wireless communication mode to receive the location for positioning
  • the device response to the request is sent to the application module by the virtual serial port module
  • the virtual serial port module is configured to: provide an interface for interaction between the application module and the wireless communication network module.
  • the application module is configured to: send a positioning status request message to the wireless communication network module by using the virtual serial port module, request to acquire status information of the positioning module included in the device for positioning, and receive the wireless communication network module to pass Status information and port number of the positioning module sent by the virtual serial port module;
  • the wireless communication network module is configured to: send the positioning status request message to the device for positioning by using a wireless communication manner, and return status information and a port number of the positioning module returned by the device for positioning The module is sent to the application module through a virtual serial port module.
  • the application module is further configured to: when the state of the positioning module is an open state, send a connection establishment request message to the wireless communication network module by using the virtual serial port module according to the port number, requesting, and The positioning module establishes a wireless connection, and receives data of the positioning module sent by the wireless communication network module, and uses the data of the positioning module to provide a positioning service;
  • the wireless communication network module is further configured to: after receiving the connection establishment request message, send the data to the device for positioning by using a wireless communication manner, and receive data of the positioning module sent by the device for positioning, Sending data of the positioning module to the application module through the virtual interface module.
  • a method for positioning comprising:
  • the device for positioning receives the request sent by the requesting party by using a wireless communication manner, and operates the positioning module included in the request according to the request sent by the requesting party;
  • the means for locating responds to the request sent by the requesting party, and sends a response to the request to the requesting party by way of wireless communication.
  • the device for positioning receives a request sent by the requesting party by using a wireless communication manner, performs a operation according to the request sent by the requesting party, and sends a response to the request to the device by using a wireless communication manner.
  • the requesting party including:
  • the device for positioning receives the positioning status request message sent by the requesting party by using a wireless communication manner, and after receiving the positioning status request message, opens the positioning module, and sends the status information and the port number of the positioning module through wireless communication.
  • the device for positioning after transmitting the status information and the port number of the positioning module to the requesting party, establishes a wireless connection between the requesting party and the positioning module when the requesting party requests to establish a wireless connection with the positioning module, and establishes a wireless connection. Send the data of the positioning module to the requester.
  • a method of providing a location service including:
  • the device providing the positioning service transmits the request to the device for positioning by wireless communication, and receives the response of the device for positioning to the request by wireless communication;
  • the device providing the location service provides a location service to the user according to the content of the received response.
  • the device for providing a location service transmits a request to a device for positioning by wireless communication, and receives, by means of wireless communication, a response of the device for positioning to the request, according to the received response.
  • the content provides location services for users, including:
  • the device for providing a location service sends a location status request message to the device for positioning by using a wireless communication manner, requesting to acquire state information of the location module included in the device for positioning;
  • the device for positioning receives status information and a port number of the positioning module.
  • the state of the positioning module is an open state, a wireless connection is established with the positioning module according to the port number, and the positioning module is received through the established wireless connection.
  • the data using the positioning module's data to provide location services.
  • the embodiment of the present invention can carry the positioning data by using the wireless communication mode, and can solve the problem of the positioning implementation of the device without the serial port type, can be compatible with the PC UI with the positioning function, and can be adapted to the positioning application provided by the third party, especially for When the embedded device acts as a wireless router, it carries the positioning data through the wireless network.
  • FIG. 1 is an architectural diagram of an apparatus for positioning according to an embodiment of the present invention
  • FIG. 2 is a block diagram of an apparatus for providing a location service according to an embodiment of the present invention
  • FIG. 3 is a flow chart of a method for positioning according to an embodiment of the present invention.
  • FIG. 4 is a flow chart of a method of providing a location service according to an embodiment of the present invention. Preferred embodiment of the invention
  • the present application implements a location service through a wireless network instead of a USB transmission.
  • the device part of the present application includes a device for providing a location service and a device for positioning.
  • the device for positioning may be a device without a serial port type, such as an embedded device. Firmware).
  • the device for providing location service includes: an application module, a virtual serial port module, and a wireless communication network module.
  • the application module accesses the wireless communication network module through the virtual serial port module, and the wireless communication network module acquires positioning data (such as GPS data), and after successfully obtaining the positioning data, The positioning data that is detected through the network port is transmitted to the application module (such as GPS APP) through the virtual serial port module.
  • the device for positioning includes: a web server module, a positioning service (GPS Server) module, and a positioning module.
  • GPS Server positioning service
  • the page service module is responsible for processing requests (such as http requests). After receiving the SMTP GetGpsStatus request message, the location service module is triggered to obtain the status and port number of the positioning module (such as the GPS module), and the obtained status information and the port number wireless communication manner are sent to the positioning service.
  • the device sends a connection establishment request to the location service module when receiving the connection establishment request, and sends the data of the location module to the providing by wireless communication when receiving the data (positioning data) of the positioning module from the location service module.
  • a device that locates a service is responsible for processing requests (such as http requests). After receiving the SMTP GetGpsStatus request message, the location service module is triggered to obtain the status and port number of the positioning module (such as the GPS module), and the obtained status information and the port number wireless communication manner are sent to the positioning service.
  • the device sends a connection establishment request to the location service module when receiving the connection establishment request, and sends the data of the location module to the providing by wireless communication when
  • the location service module is responsible for obtaining the status information and the port number of the positioning module, and sending the status information and the port number of the positioning module to the device providing the positioning service through the page service module, and acquiring the positioning data, and sending the positioning data to the providing through the page service module.
  • a device that locates a service A device that locates a service.
  • the device for positioning of the present application includes: a page service module, a positioning service module, and a positioning module, where:
  • a page service module configured to receive, by using a wireless communication manner, a request sent by a requesting party (a device providing a positioning service), send the received request to a positioning service module, and send a response of the positioning service module to the request to the wireless communication method to Requester
  • a positioning service module configured to operate the positioning module according to the request sent by the requesting party, The request sent by the requester responds;
  • a positioning module for providing data for performing a positioning service.
  • the page service module is configured to: when receiving the connection establishment request from the requesting party by using the wireless communication manner, send the connection establishment request to the location service module, and when receiving the data of the location module from the location service module, The data is sent to the requesting party by means of wireless communication; the positioning service module is specifically configured to send a connection establishment request to the positioning module after receiving the connection establishment request from the page service module, and establish a wireless connection between the requesting party and the positioning module, and the positioning is performed. The module's data is sent to the page service module via the established wireless connection.
  • the page service module is configured to: when receiving the location status request message from the requesting party by using the wireless communication manner, send the positioning status request message to the positioning service module, and receive the status information and the port number of the positioning module from the positioning service module. Sending status information and port number of the positioning module to the requesting party by wireless communication;
  • the positioning service module is specifically configured to: after receiving the positioning status request message from the page service module, open the positioning module, and send the status information and the port number of the positioning module to the page service module.
  • the apparatus for providing a location service of the present application includes: an application module, a virtual serial port module, and a wireless communication network module, where:
  • the application module is configured to send a request to the wireless communication network module through the virtual serial port module, and receive a response of the request from the wireless communication network module through the virtual serial port module, and provide a positioning service for the user according to the content of the response.
  • a wireless communication network module configured to send, by means of wireless communication, a request for an application module received from the virtual serial port module to the device for positioning, and pass the response of the device for positioning received by the wireless communication mode to the request
  • the virtual serial port module is sent to the application module.
  • the wireless communication network module includes: a network interface, a network protocol stack, and a network driver.
  • the virtual serial port module is configured to provide an interface for interaction between the application module and the wireless communication network module.
  • the virtual serial port module is a non-PnP (PnP) serial port.
  • the virtual serial port module includes a serial port driver, and accesses the wireless communication network module through the serial port driver.
  • the application module is specifically configured to send a positioning manner to the wireless communication network module through the virtual serial port module. a request message, requesting to acquire status information of the positioning module included in the device for positioning, and receiving status information and a port number of the positioning module sent by the wireless communication network module through the virtual serial port module;
  • the wireless communication network module is specifically configured to send the positioning status request message to the device for positioning by using a wireless communication manner, and send the status information and the port number of the positioning module returned by the device for positioning to the application module through the virtual serial port module. .
  • the application module is further configured to send a connection establishment request message to the wireless communication network module according to the port number when the status of the positioning module is the on state, requesting to establish a wireless connection with the positioning module, and receiving the wireless communication network module to send the connection Positioning the data of the module, using the data of the positioning module to provide a positioning service;
  • the wireless communication network module is further configured to: after receiving the connection establishment request message, send the information to the device for positioning by using a wireless communication manner, and receive data of the positioning module sent by the device for positioning, and pass the data of the positioning module through the virtual
  • the interface module is sent to the application module.
  • the device for positioning receives the request sent by the requester by using a wireless communication manner, and operates the positioning module included in the request according to the request sent by the requesting party;
  • the request sent by the requester responds, and the response to the request is sent to the requesting party by wireless communication.
  • the method for positioning of the present application includes:
  • Step 301 The positioning service module acquires a current state of the positioning module.
  • Step 302 The positioning service module starts an information processing thread and waits for a message of the page service module.
  • Step 303 The positioning service module starts a communication processing thread, and the thread creates a Sockets pool to listen to the port message.
  • Step 304 The page service module receives a positioning status (Http GetGpsStatus ) request message from the requesting party, and sends a positioning status request message to the positioning service module.
  • a positioning status Http GetGpsStatus
  • Step 305 After receiving the location status request message, the location service module determines the type of the received message, and determines whether to open the location module. If yes, step 306 is performed; otherwise, step 310 is performed;
  • Step 306 The positioning service module opens the positioning module and saves the startup state, and responds to the page service module by the status information and the port number of the positioning module.
  • Step 307 The page service module sends the status information and the port number to the requesting party by using wireless communication.
  • Step 308 The page service module receives a connection establishment request (TCP connection request) from the requester by using a wireless communication manner, and sends a connection establishment request to the location service module.
  • TCP connection request a connection establishment request
  • Step 309 After receiving the connection establishment request, the location service module sends a connection establishment request to the location module, establishes a wireless connection between the requester and the location module, and sends the data of the location module to the page service module through the established wireless connection;
  • the page service module sends the data of the positioning module to the requesting party by wireless communication.
  • Socket pool is cleared and the data transfer is stopped.
  • Step 310 After receiving the shutdown request, the location service module performs a shutdown operation, and returns status information to the page service module, and sends the operation status to the page service module in a web form.
  • the method for providing a location service in this embodiment includes:
  • Step 401 The application module sends a request to the wireless communication network module through the virtual serial port module.
  • Step 402 After receiving the request, the wireless communication network module sends a request for the application module received from the virtual serial port module to the wireless communication mode.
  • Positioning device
  • Step 403 The wireless communication network module receives the response of the device for positioning to the request by using a wireless communication manner, and sends the response of the device for positioning to the request to the application through the virtual serial port module.
  • Step 404 The application module receives the response of the request from the wireless communication network module through the virtual serial port module, and provides a positioning service for the user according to the content of the response.
  • the virtual serial port module is an interface between the application module and the wireless communication network module.
  • the sending, by the application module, the request to the wireless communication network module in the embodiment includes: sending, by using the virtual serial port module, a positioning status request message to the wireless communication network module, requesting to acquire status information of the positioning module included in the device for positioning.
  • the application module receives the requested response from the wireless communication network module through the virtual serial port module, and includes: receiving status information and a port number of the positioning module sent by the wireless communication network module through the virtual serial port module.
  • the wireless communication network module After receiving the request, the wireless communication network module sends a request for the application module received from the virtual serial port module to the device for positioning by wireless communication, and the method includes: the wireless communication network module sends the positioning status request message by using a wireless communication manner. Give the device for positioning.
  • the wireless communication network module sends the response of the device for positioning to the application module through the virtual serial port module, and includes: sending the status information and the port number of the positioning module returned by the device for positioning to the application module through the virtual serial port module.
  • the application module after receiving the status information and the port number, if the status of the positioning module is enabled, the application module sends a connection establishment request message to the wireless communication network module according to the port number through the virtual serial port module, and requests to establish a wireless connection with the positioning module.
  • the wireless communication network module After receiving the connection establishment request message, the wireless communication network module sends the data to the positioning device by using the wireless communication method, and receives the data of the positioning module sent by the positioning device, and sends the data of the positioning module to the virtual interface module.
  • Application module
  • the application module receives the data of the positioning module sent by the wireless communication network module, and provides the positioning service by using the data of the positioning module.
  • the embodiment of the present invention can carry the positioning data by using the wireless communication mode, and can solve the problem of positioning implementation of the device without the serial port type, can be compatible with the PC UI with the positioning function, and can be adapted to the positioning application provided by the third party, especially for the embedded device as the wireless device.
  • the positioning data is carried over the wireless network.

Abstract

Disclosed are a device and method for positioning. The device comprises: a page service module, a positioning service module and a positioning module, wherein the page service module is used for receiving a request sent by a requester in a wireless communication manner, sending the received request to the positioning service module and sending a response to the request of the positioning service module to the requester in the wireless communication manner; the positioning service module is used for performing an operation on the positioning module according to the request sent by the requester and responding to the request sent by the requester; and the positioning module is used for providing data for performing a positioning service. The present invention, by bearing positioning data in a wireless communication manner, can solve the positioning problem of a device without a serial port, can be compatible with a personal computer user interface (PCUI) with a positioning function, and can adapt to a positioning application supplied by a third party, and particularly for an embedded device as a wireless router, the positioning data is borne by means of a wireless network.

Description

一种用于定位的装置及方法  Device and method for positioning
技术领域 Technical field
本发明涉及定位技术领域, 尤其涉及一种用于定位的装置及方法。  The present invention relates to the field of positioning technologies, and in particular, to an apparatus and method for positioning.
背景技术 Background technique
随着移动互联网的迅猛发展, 移动终端需求增长及其迅猛, 移动终端设 备的定位功能使用也比较普遍。  With the rapid development of the mobile Internet, the demand for mobile terminals is growing rapidly and the positioning function of mobile terminal devices is also relatively common.
传统数据卡实现是通过 USB (通用串行总线)连接线接入计算机, 由设 备枚举 USB端口, 然后将各端口虚拟成不同的设备。然后与计算机侧驱动进 行交互达到数据传输的目的。  The traditional data card implementation is connected to the computer via a USB (Universal Serial Bus) cable. The device enumerates the USB ports and then virtualizes each port into a different device. Then interact with the computer side driver to achieve the purpose of data transmission.
传统数据卡的 GPS (全球定位系统) 功能也是如此, 由设备枚举 USB 虚拟口。 GPS数据通过 USB协议进行传输达到 GPS定位的功能。  The same is true for the traditional data card's GPS (Global Positioning System) feature, which enumerates the USB virtual port. GPS data is transmitted via the USB protocol to achieve GPS positioning.
正是由于传统数据卡 GPS功能的这种实现及广泛应用,市场上出现了通 过串口读写 GPS信息的 APP ( Application, 应用), 代表性的产品是 Google Maps„  Due to the realization and wide application of the traditional data card GPS function, there is an APP (Application) that reads and writes GPS information through the serial port. The representative product is Google Maps.
UFI (具有 WIFI功能的数据卡)是数据卡的一种升级产物, 不同于传统 数据卡产品。 很多场景下用户将其作为一个路由器使用。 在这种场景下 UFI 类产品不需要和计算机进行连接, 只是作为一个无线路由器使用。 同时在此 场景下, 由于没有与计算机连接,也无法枚举与传统数据卡相同的 USB端口 进行 GPS数据传输。 目前, 类似于 UFI的产品无法实现定位功能。  UFI (a data card with WIFI capability) is an upgrade of data cards, unlike traditional data card products. In many scenarios, users use it as a router. In this scenario, UFI products do not need to be connected to a computer, but are used as a wireless router. At the same time, in this scenario, since there is no connection with the computer, it is impossible to enumerate the same USB port as the conventional data card for GPS data transmission. Currently, products like UFI cannot implement positioning.
发明内容 Summary of the invention
本发明要解决的技术问题是提供一种用于定位的装置及方法, 能够使无 线嵌入式设备实现定位功能。  The technical problem to be solved by the present invention is to provide an apparatus and method for positioning, which enables a wireless embedded device to implement a positioning function.
为解决上述技术问题, 本发明的一种用于定位的装置, 包括: 页面服务 模块、 定位服务模块和定位模块, 其中:  In order to solve the above technical problem, an apparatus for positioning according to the present invention includes: a page service module, a location service module, and a positioning module, where:
所述页面服务模块,设置为:通过无线通信方式接收请求方发送的请求, 将接收到的请求发送给所述定位服务模块, 并将所述定位服务模块对请求的 响应通过无线通信方式发送给所述请求方; The page service module is configured to: receive a request sent by a requesting party by using a wireless communication manner, Sending the received request to the location service module, and sending the response of the location service module to the request to the requester by using a wireless communication manner;
所述定位服务模块, 设置为: 根据所述请求方发送的请求对所述定位模 块进行操作, 对所述请求方发送的请求进行响应;  The location service module is configured to: operate the positioning module according to the request sent by the requesting party, and respond to the request sent by the requesting party;
所述定位模块, 设置为: 提供进行定位服务的数据。  The positioning module is configured to: provide data for performing a positioning service.
优选地, 所述页面服务模块, 设置为: 在通过无线通信方式从所述请求 方接收到连接建立请求时, 将所述连接建立请求发送给所述定位服务模块, 并且在从定位服务模块接收到定位模块的数据时, 将定位模块的数据通过无 线通信方式发送给所述请求方;  Preferably, the page service module is configured to: when receiving a connection establishment request from the requester by wireless communication, send the connection establishment request to the location service module, and receive from the location service module When the data of the positioning module is obtained, the data of the positioning module is sent to the requesting party by wireless communication;
所述定位服务模块, 设置为: 在从所述页面服务模块接收到连接建立请 求后 ,将连接建立请求发送给定位模块,建立请求方与定位模块的无线连接, 将定位模块的数据通过建立的无线连接发送给所述页面服务模块。  The location service module is configured to: after receiving the connection establishment request from the page service module, send a connection establishment request to the positioning module, establish a wireless connection between the requesting party and the positioning module, and establish the data of the positioning module. A wireless connection is sent to the page service module.
优选地, 所述页面服务模块, 设置为: 在通过无线通信方式从所述请求 方接收到定位状态请求消息时, 将所述定位状态请求消息发送给所述定位服 务模块, 并且在从定位服务模块接收到定位模块的状态信息和端口号时, 将 定位模块的状态信息和端口号通过无线通信方式发送给所述请求方;  Preferably, the page service module is configured to: when receiving a positioning status request message from the requesting party by using a wireless communication manner, send the positioning status request message to the positioning service module, and in the secondary positioning service When receiving the status information and the port number of the positioning module, the module sends the status information and the port number of the positioning module to the requesting party by using a wireless communication manner;
所述定位服务模块, 设置为: 在从所述页面服务模块接收到定位状态请 求消息后, 打开所述定位模块, 并将定位模块的状态信息和端口号发送给所 述页面服务模块。  The location service module is configured to: after receiving the location status request message from the page service module, open the location module, and send status information and port number of the location module to the page service module.
一种提供定位服务的装置, 包括: 应用模块、 虚拟串口模块和无线通信 网络模块, 其中: 所述应用模块, 设置为: 通过所述虚拟串口模块向所述无线通信网络模 块发送请求, 并通过所述虚拟串口模块从所述无线通信网络模块接收所述请 求的响应, 根据响应的内容为用户提供定位服务;  An apparatus for providing a location service, comprising: an application module, a virtual serial port module, and a wireless communication network module, where: the application module is configured to: send a request to the wireless communication network module by using the virtual serial port module, and pass the The virtual serial port module receives the response of the request from the wireless communication network module, and provides a positioning service to the user according to the content of the response;
所述无线通信网络模块, 设置为: 通过无线通信方式将从虚拟串口模块 接收到的所述应用模块的请求发送给用于定位的装置, 并将通过无线通信方 式接收到的所述用于定位的装置对所述请求的响应通过所述虚拟串口模块发 送给所述应用模块; 所述虚拟串口模块, 设置为: 提供所述应用模块与所述无线通信网络模 块之间进行交互的接口。 The wireless communication network module is configured to: send, by using a wireless communication manner, a request of the application module received from a virtual serial port module to a device for positioning, and use the wireless communication mode to receive the location for positioning The device response to the request is sent to the application module by the virtual serial port module; The virtual serial port module is configured to: provide an interface for interaction between the application module and the wireless communication network module.
优选地, 所述应用模块, 设置为: 通过虚拟串口模块向无线通信网络模 块发送定位状态请求消息, 请求获取包含在用于定位的装置中的定位模块的 状态信息, 并接收无线通信网络模块通过虚拟串口模块发送的定位模块的状 态信息和端口号;  Preferably, the application module is configured to: send a positioning status request message to the wireless communication network module by using the virtual serial port module, request to acquire status information of the positioning module included in the device for positioning, and receive the wireless communication network module to pass Status information and port number of the positioning module sent by the virtual serial port module;
所述无线通信网络模块, 设置为: 将所述定位状态请求消息通过无线通 信方式发送给所述用于定位的装置, 并将所述用于定位的装置返回的定位模 块的状态信息和端口号通过虚拟串口模块发送给所述应用模块。  The wireless communication network module is configured to: send the positioning status request message to the device for positioning by using a wireless communication manner, and return status information and a port number of the positioning module returned by the device for positioning The module is sent to the application module through a virtual serial port module.
优选地, 所述应用模块, 还设置为: 在定位模块的状态为开启状态时, 根据所述端口号通过所述虚拟串口模块向所述无线通信网络模块发送连接建 立请求消息, 请求与所述定位模块建立无线连接, 并接收无线通信网络模块 发送的定位模块的数据, 使用定位模块的数据提供定位服务;  Preferably, the application module is further configured to: when the state of the positioning module is an open state, send a connection establishment request message to the wireless communication network module by using the virtual serial port module according to the port number, requesting, and The positioning module establishes a wireless connection, and receives data of the positioning module sent by the wireless communication network module, and uses the data of the positioning module to provide a positioning service;
所述无线通信网络模块, 还设置为: 在接收到连接建立请求消息后, 通 过无线通信方式发送给所述用于定位的装置, 并接收所述用于定位的装置发 送的定位模块的数据, 将定位模块的数据通过虚拟接口模块发送给所述应用 模块。  The wireless communication network module is further configured to: after receiving the connection establishment request message, send the data to the device for positioning by using a wireless communication manner, and receive data of the positioning module sent by the device for positioning, Sending data of the positioning module to the application module through the virtual interface module.
一种用于定位的方法, 包括:  A method for positioning, comprising:
用于定位的装置通过无线通信方式接收请求方发送的请求, 根据所述请 求方发送的请求对自身包含的定位模块进行操作;  The device for positioning receives the request sent by the requesting party by using a wireless communication manner, and operates the positioning module included in the request according to the request sent by the requesting party;
所述用于定位的装置对所述请求方发送的请求进行响应, 将对请求的响 应通过无线通信方式发送给所述请求方。  The means for locating responds to the request sent by the requesting party, and sends a response to the request to the requesting party by way of wireless communication.
优选地,所述用于定位的装置通过无线通信方式接收请求方发送的请求, 根据所述请求方发送的请求与自身包含的定位模块进行操作, 将对请求的响 应通过无线通信方式发送给所述请求方, 包括:  Preferably, the device for positioning receives a request sent by the requesting party by using a wireless communication manner, performs a operation according to the request sent by the requesting party, and sends a response to the request to the device by using a wireless communication manner. The requesting party, including:
所述用于定位的装置通过无线通信方式接收请求方发送的定位状态请求 消息, 在接收到定位状态请求消息后, 打开所述定位模块, 将定位模块的状 态信息和端口号通过无线通信方式发送给所述请求方; 所述用于定位的装置在将定位模块的状态信息和端口号发送给请求方后, 在请求方请求与定位模块建立无线连接时, 建立请求方与定位模块的无线连 接, 通过建立的无线连接将定位模块的数据发送给请求方。 The device for positioning receives the positioning status request message sent by the requesting party by using a wireless communication manner, and after receiving the positioning status request message, opens the positioning module, and sends the status information and the port number of the positioning module through wireless communication. To the requesting party; The device for positioning, after transmitting the status information and the port number of the positioning module to the requesting party, establishes a wireless connection between the requesting party and the positioning module when the requesting party requests to establish a wireless connection with the positioning module, and establishes a wireless connection. Send the data of the positioning module to the requester.
一种提供定位服务的方法, 包括:  A method of providing a location service, including:
提供定位服务的装置通过无线通信方式将请求发送给用于定位的装置, 并通过无线通信方式接收所述用于定位的装置对所述请求的响应;  The device providing the positioning service transmits the request to the device for positioning by wireless communication, and receives the response of the device for positioning to the request by wireless communication;
所述提供定位服务的装置根据接收到的响应的内容为用户提供定位服务。 优选地, 所述提供定位服务的装置通过无线通信方式将请求发送给用于 定位的装置, 并通过无线通信方式接收所述用于定位的装置对所述请求的响 应, 根据接收到的响应的内容为用户提供定位服务, 包括:  The device providing the location service provides a location service to the user according to the content of the received response. Preferably, the device for providing a location service transmits a request to a device for positioning by wireless communication, and receives, by means of wireless communication, a response of the device for positioning to the request, according to the received response. The content provides location services for users, including:
所述提供定位服务的装置通过无线通信方式向用于定位的装置发送定位 状态请求消息,请求获取所述用于定位的装置中包含的定位模块的状态信息; 所述提供定位服务的装置从所述用于定位的装置接收定位模块的状态信 息和端口号, 在所述定位模块的状态为开启状态时, 根据所述端口号与所述 定位模块建立无线连接, 通过建立的无线连接接收定位模块的数据, 使用定 位模块的数据提供定位服务。  The device for providing a location service sends a location status request message to the device for positioning by using a wireless communication manner, requesting to acquire state information of the location module included in the device for positioning; The device for positioning receives status information and a port number of the positioning module. When the state of the positioning module is an open state, a wireless connection is established with the positioning module according to the port number, and the positioning module is received through the established wireless connection. The data, using the positioning module's data to provide location services.
综上所述, 本发明实施例通过无线通信方式承载定位数据, 能够解决无 串口类设备的定位实现问题, 可以兼容具有定位功能的 PC UI, 并且可以适 配第三方提供的定位应用, 尤其针对嵌入式设备作为无线路由器时, 通过无 线网络承载定位数据。  In summary, the embodiment of the present invention can carry the positioning data by using the wireless communication mode, and can solve the problem of the positioning implementation of the device without the serial port type, can be compatible with the PC UI with the positioning function, and can be adapted to the positioning application provided by the third party, especially for When the embedded device acts as a wireless router, it carries the positioning data through the wireless network.
附图概述 BRIEF abstract
图 1是本发明实施方式的用于定位的装置的架构图;  1 is an architectural diagram of an apparatus for positioning according to an embodiment of the present invention;
图 2是本发明实施方式的提供定位服务的装置的架构图;  2 is a block diagram of an apparatus for providing a location service according to an embodiment of the present invention;
图 3是本发明实施方式的用于定位的方法的流程图;  3 is a flow chart of a method for positioning according to an embodiment of the present invention;
图 4是本发明实施方式的提供定位服务的方法的流程图。 本发明的较佳实施方式 4 is a flow chart of a method of providing a location service according to an embodiment of the present invention. Preferred embodiment of the invention
本申请通过无线网络而非 USB传输实现定位服务,本申请的装置部分包 括提供定位服务的装置和用于定位的装置, 用于定位的装置可以是无串口类 设备, 如嵌入式设备等固件(firmware ) 。  The present application implements a location service through a wireless network instead of a USB transmission. The device part of the present application includes a device for providing a location service and a device for positioning. The device for positioning may be a device without a serial port type, such as an embedded device. Firmware).
提供定位服务的装置包括: 应用模块、 虚拟串口模块和无线通信网络模 块, 应用模块通过虚拟串口模块访问无线通信网络模块, 无线通信网络模块 获取定位数据(如 GPS数据), 当成功获取定位数据后, 将通过网络端口侦 听到的定位数据通过虚拟串口模块传输给应用模块(如 GPS APP ) 。  The device for providing location service includes: an application module, a virtual serial port module, and a wireless communication network module. The application module accesses the wireless communication network module through the virtual serial port module, and the wireless communication network module acquires positioning data (such as GPS data), and after successfully obtaining the positioning data, The positioning data that is detected through the network port is transmitted to the application module (such as GPS APP) through the virtual serial port module.
用于定位的装置包括:页面服务( Web Server )模块、定位服务( GPS Server ) 模块和定位模块。  The device for positioning includes: a web server module, a positioning service (GPS Server) module, and a positioning module.
页面服务模块负责处理请求(如 http请求) 。 当接收到定位状态 (Http GetGpsStatus )请求消息后, 会触发定位服务模块获取定位模块(如 GPS模 块) 的状态及端口号, 并将获取的状态信息和端口号无线通信方式发送给提 供定位服务的装置; 在接收到连接建立请求时, 将连接建立请求发送给定位 服务模块, 并且在从定位服务模块接收到定位模块的数据(定位数据) 时, 将定位模块的数据通过无线通信方式发送给提供定位服务的装置。  The page service module is responsible for processing requests (such as http requests). After receiving the SMTP GetGpsStatus request message, the location service module is triggered to obtain the status and port number of the positioning module (such as the GPS module), and the obtained status information and the port number wireless communication manner are sent to the positioning service. The device sends a connection establishment request to the location service module when receiving the connection establishment request, and sends the data of the location module to the providing by wireless communication when receiving the data (positioning data) of the positioning module from the location service module. A device that locates a service.
定位服务模块负责获取定位模块的状态信息和端口号, 将定位模块的状 态信息和端口号通过页面服务模块发送给提供定位服务的装置, 并获取定位 数据, 将定位数据通过页面服务模块发送给提供定位服务的装置。  The location service module is responsible for obtaining the status information and the port number of the positioning module, and sending the status information and the port number of the positioning module to the device providing the positioning service through the page service module, and acquiring the positioning data, and sending the positioning data to the providing through the page service module. A device that locates a service.
下文中将结合附图对本发明的实施例进行详细说明。 需要说明的是, 在 不冲突的情况下, 申请中的实施例及实施例中的特征可以相互任意组合。  Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the examples in the application can be arbitrarily combined with each other.
如图 1所示, 本申请的用于定位的装置, 包括: 页面服务模块、 定位服 务模块和定位模块, 其中: As shown in FIG. 1 , the device for positioning of the present application includes: a page service module, a positioning service module, and a positioning module, where:
页面服务模块, 用于通过无线通信方式接收请求方 (提供定位服务的装 置)发送的请求, 将接收到的请求发送给定位服务模块, 并将定位服务模块 对请求的响应通过无线通信方式发送给请求方;  a page service module, configured to receive, by using a wireless communication manner, a request sent by a requesting party (a device providing a positioning service), send the received request to a positioning service module, and send a response of the positioning service module to the request to the wireless communication method to Requester
定位服务模块, 用于根据请求方发送的请求对定位模块进行操作, 对请 求方发送的请求进行响应; a positioning service module, configured to operate the positioning module according to the request sent by the requesting party, The request sent by the requester responds;
定位模块, 用于提供进行定位服务的数据。  A positioning module for providing data for performing a positioning service.
页面服务模块, 具体用于在通过无线通信方式从请求方接收到连接建立 请求时, 将连接建立请求发送给定位服务模块, 并且在从定位服务模块接收 到定位模块的数据时, 将定位模块的数据通过无线通信方式发送给请求方; 定位服务模块, 具体用于在从页面服务模块接收到连接建立请求后, 将 连接建立请求发送给定位模块, 建立请求方与定位模块的无线连接, 将定位 模块的数据通过建立的无线连接发送给页面服务模块。  The page service module is configured to: when receiving the connection establishment request from the requesting party by using the wireless communication manner, send the connection establishment request to the location service module, and when receiving the data of the location module from the location service module, The data is sent to the requesting party by means of wireless communication; the positioning service module is specifically configured to send a connection establishment request to the positioning module after receiving the connection establishment request from the page service module, and establish a wireless connection between the requesting party and the positioning module, and the positioning is performed. The module's data is sent to the page service module via the established wireless connection.
页面服务模块, 具体用于在通过无线通信方式从请求方接收到定位状态 请求消息时, 将定位状态请求消息发送给定位服务模块, 并且在从定位服务 模块接收到定位模块的状态信息和端口号时, 将定位模块的状态信息和端口 号通过无线通信方式发送给请求方;  The page service module is configured to: when receiving the location status request message from the requesting party by using the wireless communication manner, send the positioning status request message to the positioning service module, and receive the status information and the port number of the positioning module from the positioning service module. Sending status information and port number of the positioning module to the requesting party by wireless communication;
定位服务模块,具体用于在从页面服务模块接收到定位状态请求消息后, 打开定位模块, 并将定位模块的状态信息和端口号发送给页面服务模块。  The positioning service module is specifically configured to: after receiving the positioning status request message from the page service module, open the positioning module, and send the status information and the port number of the positioning module to the page service module.
如图 2所示, 本申请的提供定位服务的装置, 包括: 应用模块、 虚拟串 口模块和无线通信网络模块, 其中: As shown in FIG. 2, the apparatus for providing a location service of the present application includes: an application module, a virtual serial port module, and a wireless communication network module, where:
应用模块, 用于通过虚拟串口模块向无线通信网络模块发送请求, 并通 过虚拟串口模块从无线通信网络模块接收请求的响应, 根据响应的内容为用 户提供定位服务。  The application module is configured to send a request to the wireless communication network module through the virtual serial port module, and receive a response of the request from the wireless communication network module through the virtual serial port module, and provide a positioning service for the user according to the content of the response.
无线通信网络模块, 用于通过无线通信方式将从虚拟串口模块接收到的 应用模块的请求发送给用于定位的装置, 并将通过无线通信方式接收到的用 于定位的装置对请求的响应通过虚拟串口模块发送给应用模块。  a wireless communication network module, configured to send, by means of wireless communication, a request for an application module received from the virtual serial port module to the device for positioning, and pass the response of the device for positioning received by the wireless communication mode to the request The virtual serial port module is sent to the application module.
无线通信网络模块包含: 网络接口、 网络协议栈和网络驱动等。  The wireless communication network module includes: a network interface, a network protocol stack, and a network driver.
虚拟串口模块, 用于提供应用模块与无线通信网络模块之间进行交互的 接口。 虚拟串口模块为非即插即用 (PnP ) 串口。 虚拟串口模块包含串口驱 动, 通过串口驱动访问无线通信网络模块。  The virtual serial port module is configured to provide an interface for interaction between the application module and the wireless communication network module. The virtual serial port module is a non-PnP (PnP) serial port. The virtual serial port module includes a serial port driver, and accesses the wireless communication network module through the serial port driver.
应用模块, 具体用于通过虚拟串口模块向无线通信网络模块发送定位状 态请求消息, 请求获取包含在用于定位的装置中的定位模块的状态信息, 并 接收无线通信网络模块通过虚拟串口模块发送的定位模块的状态信息和端口 号; The application module is specifically configured to send a positioning manner to the wireless communication network module through the virtual serial port module. a request message, requesting to acquire status information of the positioning module included in the device for positioning, and receiving status information and a port number of the positioning module sent by the wireless communication network module through the virtual serial port module;
无线通信网络模块, 具体用于将定位状态请求消息通过无线通信方式发 送给用于定位的装置, 并将用于定位的装置返回的定位模块的状态信息和端 口号通过虚拟串口模块发送给应用模块。  The wireless communication network module is specifically configured to send the positioning status request message to the device for positioning by using a wireless communication manner, and send the status information and the port number of the positioning module returned by the device for positioning to the application module through the virtual serial port module. .
应用模块, 还用于在定位模块的状态为开启状态时, 根据端口号通过虚 拟串口模块向无线通信网络模块发送连接建立请求消息, 请求与定位模块建 立无线连接, 并接收无线通信网络模块发送的定位模块的数据, 使用定位模 块的数据提供定位服务;  The application module is further configured to send a connection establishment request message to the wireless communication network module according to the port number when the status of the positioning module is the on state, requesting to establish a wireless connection with the positioning module, and receiving the wireless communication network module to send the connection Positioning the data of the module, using the data of the positioning module to provide a positioning service;
无线通信网络模块, 还用于在接收到连接建立请求消息后, 通过无线通 信方式发送给用于定位的装置, 并接收用于定位的装置发送的定位模块的数 据, 将定位模块的数据通过虚拟接口模块发送给应用模块。  The wireless communication network module is further configured to: after receiving the connection establishment request message, send the information to the device for positioning by using a wireless communication manner, and receive data of the positioning module sent by the device for positioning, and pass the data of the positioning module through the virtual The interface module is sent to the application module.
为保证本申请的用于定位的方法的执行, 在定位服务模块中, 要完成三 个工作: In order to ensure the execution of the method for positioning of the present application, three tasks are to be completed in the location service module:
( 1 )首先初始化定位模块;  (1) first initialize the positioning module;
( 2 )启动信息处理线程, 该线程负责定位模块相关信息的处理, 包括定 位模块开启、 关闭和定位模块的数据的收集等;  (2) starting an information processing thread, which is responsible for processing the related information of the positioning module, including the collection, closing, and collection of the data of the positioning module;
( 3 )启动通信处理线程,该线程负责定位模块与提供定位服务的装置的 通讯, 包括侦听网络接口数据、 侦听网络数据和传输数据等。  (3) Initiating a communication processing thread that is responsible for the communication between the positioning module and the device providing the positioning service, including listening for network interface data, listening for network data, and transmitting data.
本实施方式的用于定位的方法中, 用于定位的装置通过无线通信方式接 收请求方发送的请求, 根据请求方发送的请求对自身包含的定位模块进行操 作; 用于定位的装置对所述请求方发送的请求进行响应, 将对请求的响应通 过无线通信方式发送给请求方。  In the method for positioning of the embodiment, the device for positioning receives the request sent by the requester by using a wireless communication manner, and operates the positioning module included in the request according to the request sent by the requesting party; The request sent by the requester responds, and the response to the request is sent to the requesting party by wireless communication.
如图 3所示, 本申请的用于定位的方法, 包括:  As shown in FIG. 3, the method for positioning of the present application includes:
步骤 301 : 定位服务模块获取定位模块的当前状态;  Step 301: The positioning service module acquires a current state of the positioning module.
步骤 302:定位服务模块启动信息处理线程,等待页面服务模块的消息; 步骤 303: 定位服务模块启动通信处理线程, 该线程创建 Sockets (套接 字)池, 侦听端口的消息; Step 302: The positioning service module starts an information processing thread and waits for a message of the page service module. Step 303: The positioning service module starts a communication processing thread, and the thread creates a Sockets pool to listen to the port message.
步骤 304: 页面服务模块从请求方收到定位状态( Http GetGpsStatus )请 求消息, 将定位状态请求消息发送给定位服务模块;  Step 304: The page service module receives a positioning status (Http GetGpsStatus ) request message from the requesting party, and sends a positioning status request message to the positioning service module.
步骤 305: 定位服务模块接收到定位状态请求消息后, 判断接收到的消 息的类型, 确定是否开启定位模块, 如果是, 则执行步骤 306; 否则, 执行 步骤 310;  Step 305: After receiving the location status request message, the location service module determines the type of the received message, and determines whether to open the location module. If yes, step 306 is performed; otherwise, step 310 is performed;
步骤 306: 定位服务模块打开定位模块并保存启动状态, 将定位模块的 状态信息和端口号应答给页面服务模块;  Step 306: The positioning service module opens the positioning module and saves the startup state, and responds to the page service module by the status information and the port number of the positioning module.
步骤 307: 页面服务模块将状态信息和端口号通过无线通信方式发送给 请求方;  Step 307: The page service module sends the status information and the port number to the requesting party by using wireless communication.
步骤 308: 页面服务模块通过无线通信方式从请求方接收连接建立请求 ( TCP连接请求) , 将连接建立请求发送给定位服务模块;  Step 308: The page service module receives a connection establishment request (TCP connection request) from the requester by using a wireless communication manner, and sends a connection establishment request to the location service module.
步骤 309: 定位服务模块接收到连接建立请求后, 将连接建立请求发送 给定位模块, 建立请求方与定位模块的无线连接, 将定位模块的数据通过建 立的无线连接发送给页面服务模块;  Step 309: After receiving the connection establishment request, the location service module sends a connection establishment request to the location module, establishes a wireless connection between the requester and the location module, and sends the data of the location module to the page service module through the established wireless connection;
页面服务模块将定位模块的数据通过无线通信方式发送给请求方。  The page service module sends the data of the positioning module to the requesting party by wireless communication.
如果收到断开无线连接的请求, 则清除 Socket池, 停止数据传输。  If a request to disconnect the wireless connection is received, the Socket pool is cleared and the data transfer is stopped.
步骤 310: 定位服务模块在接收到关闭请求后, 执行关闭操作, 并返回 状态信息给页面服务模块, 并将操作状态以 web形式发送给页面服务模块。  Step 310: After receiving the shutdown request, the location service module performs a shutdown operation, and returns status information to the page service module, and sends the operation status to the page service module in a web form.
如图 4所示, 本实施方式的提供定位服务的方法, 包括: As shown in FIG. 4, the method for providing a location service in this embodiment includes:
步骤 401 : 应用模块通过虚拟串口模块向无线通信网络模块发送请求; 步骤 402: 无线通信网络模块在接收到请求后, 通过无线通信方式将从 虚拟串口模块接收到的应用模块的请求发送给用于定位的装置;  Step 401: The application module sends a request to the wireless communication network module through the virtual serial port module. Step 402: After receiving the request, the wireless communication network module sends a request for the application module received from the virtual serial port module to the wireless communication mode. Positioning device;
步骤 403 : 无线通信网络模块通过无线通信方式接收用于定位的装置对 请求的响应, 将用于定位的装置对请求的响应通过虚拟串口模块发送给应用 模块; Step 403: The wireless communication network module receives the response of the device for positioning to the request by using a wireless communication manner, and sends the response of the device for positioning to the request to the application through the virtual serial port module. Module
步骤 404: 应用模块通过虚拟串口模块从无线通信网络模块接收请求的 响应, 根据响应的内容为用户提供定位服务。  Step 404: The application module receives the response of the request from the wireless communication network module through the virtual serial port module, and provides a positioning service for the user according to the content of the response.
虚拟串口模块是应用模块与无线通信网络模块之间进行交互的接口。 本实施方式中应用模块向无线通信网络模块发送请求, 包括: 通过虚拟 串口模块向无线通信网络模块发送定位状态请求消息, 请求获取包含在用于 定位的装置中的定位模块的状态信息。  The virtual serial port module is an interface between the application module and the wireless communication network module. The sending, by the application module, the request to the wireless communication network module in the embodiment includes: sending, by using the virtual serial port module, a positioning status request message to the wireless communication network module, requesting to acquire status information of the positioning module included in the device for positioning.
应用模块通过虚拟串口模块从无线通信网络模块接收请求的响应,包括: 接收无线通信网络模块通过虚拟串口模块发送的定位模块的状态信息和端口 号。  The application module receives the requested response from the wireless communication network module through the virtual serial port module, and includes: receiving status information and a port number of the positioning module sent by the wireless communication network module through the virtual serial port module.
无线通信网络模块在接收到请求后, 通过无线通信方式将从虚拟串口模 块接收到的应用模块的请求发送给用于定位的装置, 包括: 无线通信网络模 块将定位状态请求消息通过无线通信方式发送给用于定位的装置。  After receiving the request, the wireless communication network module sends a request for the application module received from the virtual serial port module to the device for positioning by wireless communication, and the method includes: the wireless communication network module sends the positioning status request message by using a wireless communication manner. Give the device for positioning.
无线通信网络模块将用于定位的装置对请求的响应通过虚拟串口模块发 送给应用模块, 包括: 将用于定位的装置返回的定位模块的状态信息和端口 号通过虚拟串口模块发送给应用模块。  The wireless communication network module sends the response of the device for positioning to the application module through the virtual serial port module, and includes: sending the status information and the port number of the positioning module returned by the device for positioning to the application module through the virtual serial port module.
本实施方式中, 应用模块在接收到状态信息和端口号后, 如果定位模块 的状态为开启状态, 根据端口号通过虚拟串口模块向无线通信网络模块发送 连接建立请求消息, 请求与定位模块建立无线连接;  In this embodiment, after receiving the status information and the port number, if the status of the positioning module is enabled, the application module sends a connection establishment request message to the wireless communication network module according to the port number through the virtual serial port module, and requests to establish a wireless connection with the positioning module. Connection
无线通信网络模块在接收到连接建立请求消息后, 通过无线通信方式发 送给用于定位的装置, 并接收用于定位的装置发送的定位模块的数据, 将定 位模块的数据通过虚拟接口模块发送给应用模块;  After receiving the connection establishment request message, the wireless communication network module sends the data to the positioning device by using the wireless communication method, and receives the data of the positioning module sent by the positioning device, and sends the data of the positioning module to the virtual interface module. Application module
应用模块接收无线通信网络模块发送的定位模块的数据, 使用定位模块 的数据提供定位服务。  The application module receives the data of the positioning module sent by the wireless communication network module, and provides the positioning service by using the data of the positioning module.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现, 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本申请不限制于任 何特定形式的硬件和软件的结合。 One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct the associated hardware, such as a read only memory, a magnetic disk, or an optical disk. Optionally, all or part of the steps of the above embodiments may also be used. One or more integrated circuits are implemented. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module. This application is not limited to any specific combination of hardware and software.
以上所述仅为本申请的优选实施例而已, 并不用于限制本申请, 对于本 领域的技术人员来说, 本申请可以有各种更改和变化。 凡在本申请的精神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本申请的保护 范围之内。  The above description is only for the preferred embodiment of the present application, and is not intended to limit the present application, and various changes and modifications may be made to the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application are intended to be included within the scope of this application.
工业实用性 Industrial applicability
本发明实施例通过无线通信方式承载定位数据, 能够解决无串口类设备 的定位实现问题, 可以兼容具有定位功能的 PC UI, 并且可以适配第三方提 供的定位应用, 尤其针对嵌入式设备作为无线路由器时, 通过无线网络承载 定位数据。  The embodiment of the present invention can carry the positioning data by using the wireless communication mode, and can solve the problem of positioning implementation of the device without the serial port type, can be compatible with the PC UI with the positioning function, and can be adapted to the positioning application provided by the third party, especially for the embedded device as the wireless device. When the router is used, the positioning data is carried over the wireless network.

Claims

权 利 要 求 书 Claim
1、 一种用于定位的装置, 包括: 页面服务模块、 定位服务模块和定 位模块, 其中:  A device for positioning, comprising: a page service module, a location service module, and a positioning module, wherein:
所述页面服务模块,设置为:通过无线通信方式接收请求方发送的请求, 将接收到的请求发送给所述定位服务模块, 并将所述定位服务模块对请求的 响应通过无线通信方式发送给所述请求方;  The page service module is configured to: receive a request sent by the requesting party by using a wireless communication manner, send the received request to the positioning service module, and send the response of the positioning service module to the request to the wireless communication method to The requesting party;
所述定位服务模块, 设置为: 根据所述请求方发送的请求对所述定位模 块进行操作, 对所述请求方发送的请求进行响应;  The location service module is configured to: operate the positioning module according to the request sent by the requesting party, and respond to the request sent by the requesting party;
所述定位模块, 设置为: 提供进行定位服务的数据。  The positioning module is configured to: provide data for performing a positioning service.
2、 如权利要求 1所述的装置, 其中,  2. The apparatus according to claim 1, wherein
所述页面服务模块, 设置为: 在通过无线通信方式从所述请求方接收到 连接建立请求时, 将所述连接建立请求发送给所述定位服务模块, 并且在从 定位服务模块接收到定位模块的数据时, 将定位模块的数据通过无线通信方 式发送给所述请求方;  The page service module is configured to: when receiving a connection establishment request from the requesting party by wireless communication, send the connection establishment request to the positioning service module, and receive a positioning module from the positioning service module Data of the positioning module is sent to the requesting party by wireless communication;
所述定位服务模块, 设置为: 在从所述页面服务模块接收到连接建立请 求后 ,将连接建立请求发送给定位模块,建立请求方与定位模块的无线连接, 将定位模块的数据通过建立的无线连接发送给所述页面服务模块。  The location service module is configured to: after receiving the connection establishment request from the page service module, send a connection establishment request to the positioning module, establish a wireless connection between the requesting party and the positioning module, and establish the data of the positioning module. A wireless connection is sent to the page service module.
3、 如权利要求 1或 2所述的装置, 其中,  3. The apparatus according to claim 1 or 2, wherein
所述页面服务模块, 设置为: 在通过无线通信方式从所述请求方接收到 定位状态请求消息时, 将所述定位状态请求消息发送给所述定位服务模块, 并且在从定位服务模块接收到定位模块的状态信息和端口号时, 将定位模块 的状态信息和端口号通过无线通信方式发送给所述请求方;  The page service module is configured to: when receiving a positioning status request message from the requesting party by using a wireless communication manner, send the positioning status request message to the positioning service module, and receive the information from the positioning service module When the status information and the port number of the module are located, the status information and the port number of the positioning module are sent to the requesting party by using a wireless communication manner;
所述定位服务模块, 设置为: 在从所述页面服务模块接收到定位状态请 求消息后, 打开所述定位模块, 并将定位模块的状态信息和端口号发送给所 述页面服务模块。  The location service module is configured to: after receiving the location status request message from the page service module, open the location module, and send status information and port number of the location module to the page service module.
4、 一种提供定位服务的装置, 包括: 应用模块、 虚拟串口模块和无 线通信网络模块, 其中: 所述应用模块, 设置为: 通过所述虚拟串口模块向所述无线通信网络模 块发送请求, 并通过所述虚拟串口模块从所述无线通信网络模块接收所述请 求的响应, 根据响应的内容为用户提供定位服务; 4. A device for providing a location service, comprising: an application module, a virtual serial port module, and a wireless communication network module, wherein: The application module is configured to: send a request to the wireless communication network module by using the virtual serial port module, and receive, by using the virtual serial port module, the response of the request from the wireless communication network module, according to the content of the response User provides location service;
所述无线通信网络模块, 设置为: 通过无线通信方式将从虚拟串口模块 接收到的所述应用模块的请求发送给用于定位的装置, 并将通过无线通信方 式接收到的所述用于定位的装置对所述请求的响应通过所述虚拟串口模块发 送给所述应用模块;  The wireless communication network module is configured to: send, by using a wireless communication manner, a request of the application module received from a virtual serial port module to a device for positioning, and use the wireless communication mode to receive the location for positioning The device response to the request is sent to the application module by the virtual serial port module;
所述虚拟串口模块, 设置为: 提供所述应用模块与所述无线通信网络模 块之间进行交互的接口。  The virtual serial port module is configured to: provide an interface for interaction between the application module and the wireless communication network module.
5、 如权利要求 4所述的装置, 其中,  5. The apparatus according to claim 4, wherein
所述应用模块, 设置为: 通过虚拟串口模块向无线通信网络模块发送定 位状态请求消息,请求获取包含在用于定位的装置中的定位模块的状态信息, 并接收无线通信网络模块通过虚拟串口模块发送的定位模块的状态信息和端 口号;  The application module is configured to: send a positioning status request message to the wireless communication network module by using the virtual serial port module, request to obtain status information of the positioning module included in the device for positioning, and receive the wireless communication network module through the virtual serial port module. Status information and port number of the sent positioning module;
所述无线通信网络模块, 设置为: 将所述定位状态请求消息通过无线通 信方式发送给所述用于定位的装置, 并将所述用于定位的装置返回的定位模 块的状态信息和端口号通过虚拟串口模块发送给所述应用模块。  The wireless communication network module is configured to: send the positioning status request message to the device for positioning by using a wireless communication manner, and return status information and a port number of the positioning module returned by the device for positioning The module is sent to the application module through a virtual serial port module.
6、 如权利要求 5所述的装置, 其中,  6. The apparatus according to claim 5, wherein
所述应用模块, 还设置为: 在定位模块的状态为开启状态时, 根据所述 端口号通过所述虚拟串口模块向所述无线通信网络模块发送连接建立请求消 息, 请求与所述定位模块建立无线连接, 并接收无线通信网络模块发送的定 位模块的数据, 使用定位模块的数据提供定位服务;  The application module is further configured to: when the state of the positioning module is the on state, send a connection establishment request message to the wireless communication network module by using the virtual serial port module according to the port number, requesting to establish with the positioning module Wirelessly connecting, and receiving data of the positioning module sent by the wireless communication network module, and using the data of the positioning module to provide a positioning service;
所述无线通信网络模块, 还设置为: 在接收到连接建立请求消息后, 通 过无线通信方式发送给所述用于定位的装置, 并接收所述用于定位的装置发 送的定位模块的数据, 将定位模块的数据通过虚拟接口模块发送给所述应用 模块。  The wireless communication network module is further configured to: after receiving the connection establishment request message, send the data to the device for positioning by using a wireless communication manner, and receive data of the positioning module sent by the device for positioning, Sending data of the positioning module to the application module through the virtual interface module.
7、 一种用于定位的方法, 包括:  7. A method for positioning, comprising:
用于定位的装置通过无线通信方式接收请求方发送的请求, 根据所述请 求方发送的请求对自身包含的定位模块进行操作; The device for positioning receives the request sent by the requesting party by wireless communication, according to the request The request sent by the requester operates on the positioning module included in the request;
所述用于定位的装置对所述请求方发送的请求进行响应, 将对请求的响 应通过无线通信方式发送给所述请求方。  The means for locating responds to the request sent by the requesting party, and sends a response to the request to the requesting party by way of wireless communication.
8、 如权利要求 7 所述的方法, 其中, 所述用于定位的装置通过无线 通信方式接收请求方发送的请求, 根据所述请求方发送的请求与自身包含的 定位模块进行操作, 将对请求的响应通过无线通信方式发送给所述请求方, 包括:  8. The method according to claim 7, wherein the means for positioning receives a request sent by a requesting party by means of wireless communication, and performs an operation according to the request sent by the requesting party and the positioning module included in the requesting party, and The requested response is sent to the requesting party by wireless communication, including:
所述用于定位的装置通过无线通信方式接收请求方发送的定位状态请求 消息, 在接收到定位状态请求消息后, 打开所述定位模块, 将定位模块的状 态信息和端口号通过无线通信方式发送给所述请求方;  The device for positioning receives the positioning status request message sent by the requesting party by using a wireless communication manner, and after receiving the positioning status request message, opens the positioning module, and sends the status information and the port number of the positioning module through wireless communication. To the requesting party;
所述用于定位的装置在将定位模块的状态信息和端口号发送给请求方后, 在请求方请求与定位模块建立无线连接时, 建立请求方与定位模块的无线连 接, 通过建立的无线连接将定位模块的数据发送给请求方。  The device for positioning, after transmitting the status information and the port number of the positioning module to the requesting party, establishes a wireless connection between the requesting party and the positioning module when the requesting party requests to establish a wireless connection with the positioning module, and establishes a wireless connection. Send the data of the positioning module to the requester.
9、 一种提供定位服务的方法, 包括:  9. A method of providing a location service, comprising:
提供定位服务的装置通过无线通信方式将请求发送给用于定位的装置, 并通过无线通信方式接收所述用于定位的装置对所述请求的响应;  The device providing the positioning service transmits the request to the device for positioning by wireless communication, and receives the response of the device for positioning to the request by wireless communication;
所述提供定位服务的装置根据接收到的响应的内容为用户提供定位服务。 The device providing the location service provides a location service to the user according to the content of the received response.
10、 如权利要求 9 所述的方法, 其中, 所述提供定位服务的装置通过 无线通信方式将请求发送给用于定位的装置, 并通过无线通信方式接收所述 用于定位的装置对所述请求的响应, 根据接收到的响应的内容为用户提供定 位服务, 包括: 10. The method according to claim 9, wherein the means for providing a location service transmits a request to a device for positioning by wireless communication, and receives the device for positioning by wireless communication. The requested response provides the user with location services based on the content of the received response, including:
所述提供定位服务的装置通过无线通信方式向用于定位的装置发送定位 状态请求消息,请求获取所述用于定位的装置中包含的定位模块的状态信息; 所述提供定位服务的装置从所述用于定位的装置接收定位模块的状态信 息和端口号, 在所述定位模块的状态为开启状态时, 根据所述端口号与所述 定位模块建立无线连接, 通过建立的无线连接接收定位模块的数据, 使用定 位模块的数据提供定位服务。  The device for providing a location service sends a location status request message to the device for positioning by using a wireless communication manner, requesting to acquire state information of the location module included in the device for positioning; The device for positioning receives status information and a port number of the positioning module. When the state of the positioning module is an open state, a wireless connection is established with the positioning module according to the port number, and the positioning module is received through the established wireless connection. The data, using the positioning module's data to provide location services.
PCT/CN2013/082795 2013-07-19 2013-09-02 Device and method for positioning WO2014166197A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310307593.1 2013-07-19
CN201310307593.1A CN104301863A (en) 2013-07-19 2013-07-19 Device and method for positioning

Publications (1)

Publication Number Publication Date
WO2014166197A1 true WO2014166197A1 (en) 2014-10-16

Family

ID=51688899

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082795 WO2014166197A1 (en) 2013-07-19 2013-09-02 Device and method for positioning

Country Status (2)

Country Link
CN (1) CN104301863A (en)
WO (1) WO2014166197A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106873014B (en) * 2017-01-22 2019-05-28 北京通途永久科技有限公司 A kind of method of transportation and communication quantity in express statistic region

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437196A (en) * 2007-11-13 2009-05-20 朗讯科技公司 Position service information transmission of mobile packet mode
CN101887112A (en) * 2009-05-15 2010-11-17 佛山市顺德区汉达精密电子科技有限公司 Sharing system of satellite positioning data and method thereof
CN102325300A (en) * 2011-07-20 2012-01-18 中兴通讯股份有限公司 Positioning method and system
CN102547561A (en) * 2011-12-13 2012-07-04 华为终端有限公司 Method realizing location service of mobile device, and wireless access device
CN102724629A (en) * 2012-06-21 2012-10-10 中兴通讯股份有限公司 Method and system for realizing driver-free wireless terminal positioning service

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8761064B2 (en) * 2010-04-14 2014-06-24 Qualcomm Incorporated Power savings through cooperative operation of multiradio devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437196A (en) * 2007-11-13 2009-05-20 朗讯科技公司 Position service information transmission of mobile packet mode
CN101887112A (en) * 2009-05-15 2010-11-17 佛山市顺德区汉达精密电子科技有限公司 Sharing system of satellite positioning data and method thereof
CN102325300A (en) * 2011-07-20 2012-01-18 中兴通讯股份有限公司 Positioning method and system
CN102547561A (en) * 2011-12-13 2012-07-04 华为终端有限公司 Method realizing location service of mobile device, and wireless access device
CN102724629A (en) * 2012-06-21 2012-10-10 中兴通讯股份有限公司 Method and system for realizing driver-free wireless terminal positioning service

Also Published As

Publication number Publication date
CN104301863A (en) 2015-01-21

Similar Documents

Publication Publication Date Title
JP5718522B2 (en) Over the air equipment configuration
US9942379B2 (en) Wireless docking
WO2017045276A1 (en) Terminal interconnecting method, device, and storage medium
US9052739B2 (en) Method and apparatus for virtualizing hardware dongle over a wireless connection
WO2015149285A1 (en) Security unit management method and terminal
TW201433137A (en) Host device, client device and method for wireless docking in a dynamic environment for multiple clients
EP2861037A1 (en) Radio frequency communication method, device and terminal device for near field communication
WO2014206321A1 (en) Bluetooth communication method and bluetooth communication device
US20140317058A1 (en) Wireless storage device and system having capability of autonomous backup
CN105764159B (en) Network connection method, system and terminal thereof
WO2013174265A1 (en) Data transmission method and device
KR20190065101A (en) An electronic device for transmitting and receiving data in a wireless communication system and a method thereof
EP2905938B1 (en) Method for acquiring locating information, terminal and mobile broadband interface model (mbim) device
EP3700169B1 (en) Electronic device for communicating with external electronic device
KR102343301B1 (en) Method for wireless connection and electronic device thereof
WO2016119623A1 (en) Method and device for realizing network sharing
WO2015139401A1 (en) Establishment method and system for wireless network, and wireless routing device
WO2013152644A1 (en) Wireless sd-card type processing device
WO2014166197A1 (en) Device and method for positioning
JP2015156526A (en) Communication device, information processing device and control method therefor, and communication system
US20130107697A1 (en) Network Connection System of Network Electronic Device and Method to Solve Terminal Device Unable to Reach Electronic Device Caused by Router Not Supporting NAT Loopback
WO2017063437A1 (en) Wearable device and method thereof for receiving and sending data
CN111726848B (en) Equipment binding method, target starting device, fixed terminal and storage medium
JP6000231B2 (en) Network system, always-on connection method, electronic device, always-on server, application server, program
JP5896975B2 (en) Network system, data communication method, electronic device, and program

Legal Events

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

Ref document number: 13881677

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: 13881677

Country of ref document: EP

Kind code of ref document: A1