[go: up one dir, main page]

CN107203592A - A kind of pushed information based on three-point fox method accepts and believe detection method - Google Patents

A kind of pushed information based on three-point fox method accepts and believe detection method Download PDF

Info

Publication number
CN107203592A
CN107203592A CN201710277470.6A CN201710277470A CN107203592A CN 107203592 A CN107203592 A CN 107203592A CN 201710277470 A CN201710277470 A CN 201710277470A CN 107203592 A CN107203592 A CN 107203592A
Authority
CN
China
Prior art keywords
information
message
location
map
distance
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201710277470.6A
Other languages
Chinese (zh)
Other versions
CN107203592B (en
Inventor
余啸
刘进
伍蔓
张建升
崔晓晖
吕珊珊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN201710277470.6A priority Critical patent/CN107203592B/en
Publication of CN107203592A publication Critical patent/CN107203592A/en
Application granted granted Critical
Publication of CN107203592B publication Critical patent/CN107203592B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • 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/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明涉及一种基于三点定位法的推送信息采信检测方法,利用主观消息中的位置信息这个客观因素作为评价参考,无添加新的评价标准,有效降低检验过程的复杂度,应用三点定位法,通过智能手机中的电子地图的定位功能辅助,依据几何扫描算法给出了一个重要的距离计算算法,初步判定信息提供者所在区域范围,并将其与信息发生区域进行比对,粗粒度地检验出可靠的时效信息。

The invention relates to a push information detection method based on a three-point positioning method, which uses the objective factor of position information in subjective messages as an evaluation reference, without adding new evaluation standards, effectively reduces the complexity of the inspection process, and applies three-point positioning With the assistance of the positioning function of the electronic map in the smart phone, an important distance calculation algorithm is given based on the geometric scanning algorithm, which preliminarily determines the area where the information provider is located, and compares it with the area where the information occurs. The coarse-grained reliable timeliness information.

Description

一种基于三点定位法的推送信息采信检测方法A push information detection method based on three-point positioning method

技术领域technical field

本发明属于Android平台定位技术领域,特别是涉及一种基于三点定位法的推送信息检测机制。The invention belongs to the technical field of Android platform positioning, and in particular relates to a push information detection mechanism based on a three-point positioning method.

背景技术Background technique

(1)定位技术(1) Positioning Technology

从技术的方面来看,目前国内移动设备的定位技术可以分为如下3类:From a technical point of view, the positioning technology of domestic mobile devices can be divided into the following three categories:

1)网络定位。网络定位对设备的硬件要求和软件需求比较低,只要能连接至网络就可以。因此通过网络定位获得的地理位置的精度无法得到很好的保证。网络定位根据网络的不同又可以细分,常见的有基站定位和Wi-Fi定位。手机与基站的距离越远,信号越差,反之越靠近基站,信号就越强。基站定位就是通过计算设备发送的信息到达每个基站的时间来获得设备与基站的距离及角度。由于基站的位置是由各个移动通讯运营商所建造,因此它们的位置已知且明确。所以根据基站的位置和测量的距离与角度,就可以计算出设备的位置信息。Wi-Fi定位又称为Wi-Fi热点定位,它依赖于现有的wlan网络,采用RSS定位方式,利用的是固定位置的无线AP(Access Point,俗称“热点”)。每一个无线热点都具有一个全球唯一的MAC地址,并且一般来说,在一段时间内,这个无线热点是不会移动的。然而,无线热点的位置并不是通过现场精确测量得出的。当一台设备打开Wi-Fi功能时,可以搜索到很多的Wi-Fi热点,无论是否加密,是否已连接,也可以测出每个热点的信号强度,同时还能知道每个热点的SSID(Service Set Identifier,服务集标识)和MAC(Media AccessControl或者Medium Access Control,媒体访问控制,或者称为物理地址)地址。当这个设备打开了GPS功能,设备会将这些能够标示热点的数据发送到位置服务商的位置服务器。这样就形成了一个大型的热点坐标数据库。如果一个热点能够被不断采集,那么此热点的坐标随着采集次数的增多而不断地迭代,其坐标也会越来越精准。当一个设备打开Wi-Fi进行定位时,服务器能够获取周围的Wi-Fi的MAC地址和信号强弱。利用这些信息,在数据库中进行检索,就可以反查出所在的位置。1) Network positioning. Network positioning has relatively low hardware and software requirements for devices, as long as they can be connected to the network. Therefore, the accuracy of the geographic location obtained through network positioning cannot be well guaranteed. Network positioning can be subdivided according to different networks. Common ones include base station positioning and Wi-Fi positioning. The farther the mobile phone is from the base station, the weaker the signal will be, and the closer to the base station, the stronger the signal will be. Base station positioning is to obtain the distance and angle between the device and the base station by calculating the time when the information sent by the device arrives at each base station. Since the locations of the base stations are constructed by various mobile communication operators, their locations are known and definite. Therefore, according to the location of the base station and the measured distance and angle, the location information of the device can be calculated. Wi-Fi positioning is also called Wi-Fi hotspot positioning. It relies on the existing wlan network, adopts the RSS positioning method, and uses a fixed-position wireless AP (Access Point, commonly known as "hot spot"). Each wireless hotspot has a globally unique MAC address, and generally speaking, within a period of time, this wireless hotspot will not move. However, the location of wireless hotspots is not obtained through precise on-site measurements. When a device turns on the Wi-Fi function, it can search many Wi-Fi hotspots, no matter whether it is encrypted or not, whether it is connected or not, it can also measure the signal strength of each hotspot, and at the same time know the SSID of each hotspot ( Service Set Identifier, service set identifier) and MAC (Media Access Control or Medium Access Control, media access control, or called physical address) address. When the device turns on the GPS function, the device will send the data capable of marking hotspots to the location server of the location service provider. This forms a large database of hotspot coordinates. If a hotspot can be continuously collected, the coordinates of this hotspot will be iterated continuously as the number of collections increases, and its coordinates will become more and more accurate. When a device turns on Wi-Fi for positioning, the server can obtain the MAC address and signal strength of the surrounding Wi-Fi. Using this information, search in the database, you can find out the location.

2)GPS定位。GPS(Global Position System,全球定位系统)是由覆盖地球的24颗卫星组成的系统。GPS定位就是通过设备与GPS卫星之间的通讯来获取设备的位置信息。任意地点任意时间都能够观测到4颗卫星,因此这种定位方式精确度较高。但是GPS定位对移动设备的硬件和软件要求也相对更高,必须有具有内置的GPS模块。耗电量大也是它的一个不足之处。2) GPS positioning. GPS (Global Position System, Global Positioning System) is a system composed of 24 satellites covering the earth. GPS positioning is to obtain the location information of the device through the communication between the device and the GPS satellite. Four satellites can be observed at any time at any place, so this positioning method has high accuracy. However, GPS positioning has relatively higher hardware and software requirements for mobile devices, and must have a built-in GPS module. Power consumption is also a shortcoming of it.

3)混合定位。混合定位就是集成网络定位和GPS定位的综合使用。混合定位技术把这两项定位技术的优势进行综合,取长补短。定位的速度得到提高的同时也提高了定位的准确性。定位速度和准确性的提升,会引发更多相应的拓展服务。因此,混合定位技术是定位技术之后的发展趋势(石婷,2014)。3) Hybrid positioning. Hybrid positioning is the comprehensive use of integrated network positioning and GPS positioning. The hybrid positioning technology integrates the advantages of these two positioning technologies and learns from each other. While the speed of positioning is improved, the accuracy of positioning is also improved. The improvement of positioning speed and accuracy will lead to more corresponding expansion services. Therefore, hybrid positioning technology is the development trend after positioning technology (Shi Ting, 2014).

(2)地图服务(2) Map service

依赖于位置的业务发展非常快速,包括了工商、医务、工作和生活的每个角落。这些业务给使用者提供了定位、追踪和敏感地区警报等一连串的服务。例如谷歌地图、百度地图等,都需要通过位置服务才能够使用。Location-dependent business is developing very fast, including every corner of business, medicine, work and life. These services provide users with a series of services such as positioning, tracking and alerting of sensitive areas. For example, Google Maps, Baidu Maps, etc., all need to use location services.

电子地图也称为数字地图。区别于一般的纸质地图,电子地图运用计算机技术,使用数字化方法进行储存和浏览。通过网络使用地图数据库的就能够获取使用者的位置所在信息。电子地图的特征在于易于操作,不被时间和地域所约束,可以使用数据发送到任意的地点(石婷,2014)。相较于传统的纸质地图,电子地图成本低廉、更新速度快,而且可以进行交互。采用虚拟现实技术实现三维地图,让人在视觉上获得更舒适的享受。Electronic maps are also called digital maps. Different from ordinary paper maps, electronic maps use computer technology to store and browse digitally. The user's location information can be obtained by using the map database through the network. The characteristics of electronic maps are that they are easy to operate, not restricted by time and region, and can be sent to any place using data (Shi Ting, 2014). Compared with traditional paper maps, electronic maps are cheap, fast to update, and can be interactive. The use of virtual reality technology to realize the three-dimensional map makes people enjoy more visually.

电子地图中常见的是二维地图。开发电子地图最重要的是将大量的地理信息数据组合在一起。数据结构和模型是完整的电子地图开发的基本。数据结构包含矢量结构、栅格结构和矢栅集成结构,用于说明地图上的信息在计算机中的逻辑结构和物理存储方法。数据模型包含关系数据模型及面向对象数据模型,还有时空数据模型、多媒体数据模型等其他的一些数据模型。Two-dimensional maps are common in electronic maps. The most important thing in developing an electronic map is to combine a large amount of geographic information data. Data structures and models are the basis of complete electronic map development. The data structure includes vector structure, raster structure and vector-raster integration structure, which are used to illustrate the logical structure and physical storage method of the information on the map in the computer. Data models include relational data models, object-oriented data models, and other data models such as spatiotemporal data models and multimedia data models.

平时生活中,电子地图具有很大的作用。用户可以通过电子地图查询任意地方的位置、寻找出行的最佳方式和线路。通过电子地图还能够知晓例如简介、联络方式、用户评价等包含在详细位置之外的信息。通过电子地图也能够发送消息,进行宣传和互动。In daily life, electronic maps play a very important role. Users can query the location of any place and find the best way and route to travel through the electronic map. Through the electronic map, it is also possible to know information other than the detailed location, such as brief introduction, contact information, and user evaluation. It is also possible to send messages, publicize and interact through the electronic map.

(3)地图模块Android SDK(3) Map module Android SDK

地图模块Android SDK是百度地图针对Android 2.1及以上版本设备推出的应用程序接口。开发人员能够通过使用该接口,获得百度地图提供的服务和数据来实现基于Android移动设备的地图类应用程序。目前地图模块Android SDK提供基础地图、POI检索、地理编码、测距、导航、定位、离线地图、周边雷达、LBS云、个性化地图等特色功能,如图1所示,表1显示了本发明主要使用的地图模块Android SDK中的功能。The map module Android SDK is an application program interface launched by Baidu Maps for Android 2.1 and above devices. Developers can use this interface to obtain the services and data provided by Baidu Maps to implement map applications based on Android mobile devices. At present, the map module Android SDK provides characteristic functions such as basic map, POI retrieval, geocoding, ranging, navigation, positioning, offline map, peripheral radar, LBS cloud, and personalized map, as shown in Figure 1, and Table 1 shows the features of the present invention Mainly used map module functions in Android SDK.

1)搜索服务:百度地图SDK提供了多种搜索业务,包含位置搜索、周边搜索、公交搜索等等。对MKSearch类进行初始化,注册检索结果的监视对象MKSearchListener,就能够非同步地完成检索服务。搜索业务应用结束之后,需要使用MKSearch的destory()方法来解除资源的占用。1) Search service: Baidu Maps SDK provides a variety of search services, including location search, surrounding search, bus search, etc. Initialize the MKSearch class, register the monitoring object MKSearchListener of the retrieval results, and then complete the retrieval service asynchronously. After the search business application is finished, you need to use the destroy() method of MKSearch to release the resource occupation.

2)兴趣点(POI)搜索:指的是在特定的一个长方形区域内,依据开发人员设置的特定关键字,1.使用poiSearchInbounds(String key,GeoPointptLB,GeoPointptRT)方法检索兴趣点信息;2.使用poiSearchInCity(String city,String key)方法可以搜索一个城市内的兴趣点信息;3.以指定坐标点为圆心,根据给定关键字查询某一半径范围内的全部兴趣点,应用的方式是poiSearchNearBy(String key,GeoPointpt,intradius)。搜索的结果将通过MySearchListener的onGetPoiResult显示。2) Point of interest (POI) search: refers to within a specific rectangular area, according to the specific keywords set by the developer, 1. Use the poiSearchInbounds(String key, GeoPointptLB, GeoPointptRT) method to retrieve POI information; 2. Use The poiSearchInCity(String city,String key) method can search for POI information in a city; 3. With the specified coordinate point as the center, query all POIs within a certain radius according to a given keyword. The application method is poiSearchNearBy( String key, GeoPointpt, intradius). The search result will be displayed through onGetPoiResult of MySearchListener.

表1地图模块Android SDK的部分功能Table 1 Some functions of map module Android SDK

3)地址信息查询:根据地理坐标查询地址信息,通过reverseGeocode()和geocode()方法实现逆地址解析和地址解析。其中地址解析和逆地址解析的返回结果都在MKSearchListener中的onGetAddrResult()方法里。需要根据MKAddrInfo中的type字段是为MKAddrInfo.MK_GEOCODE还是为MKAddrInfo.MK_REVERSEGEOCODE来具体区分是逆地址解析的结果还是地址解析的结果。3) Address information query: query address information according to geographic coordinates, and implement reverse geocode and geocode through reverseGeocode() and geocode() methods. The return results of address resolution and reverse address resolution are in the onGetAddrResult() method in MKSearchListener. According to whether the type field in MKAddrInfo is MKAddrInfo.MK_GEOCODE or MKAddrInfo.MK_REVERSEGEOCODE, it is necessary to specifically distinguish whether it is the result of reverse geocoding or the result of geocoding.

4)及时搜索建议:根据检索的关键词,在线给出建议词。通过suggestionSearch(String key,String city)方法进行实现。其中参数key为关键字,参数city为检索城市。4) Timely search suggestions: According to the keywords retrieved, suggested words are given online. It is implemented through the suggestionSearch(String key, String city) method. The parameter key is the keyword, and the parameter city is the search city.

发明内容Contents of the invention

针对媒体和公众无法判断社交媒体中发布的信息是否可信,本发明针对利用无法人为更改的客观因素——位置信息,并设计了基于三点定位法的推送信息采信设置检测机制,实现消息的可信度的检测,力求达到“正确的信息在正确的时间在正确的位置上发生”的目的。Aiming at the inability of the media and the public to judge whether the information published in social media is credible, the present invention aims at using the objective factor that cannot be artificially changed—location information, and designs a push information collection and setting detection mechanism based on the three-point positioning method to realize the authenticity of the message. The detection of credibility strives to achieve the goal of "the correct information occurs at the correct position at the correct time".

本发明提供的技术方案是一种基于三点定位法的推送信息采信设置检测机制,包括以下步骤:The technical solution provided by the present invention is a push information acquisition setting detection mechanism based on the three-point positioning method, which includes the following steps:

一种基于三点定位法的推送信息采信检测方法,其特征是,包括以下步骤:A kind of push information acceptance detection method based on three-point positioning method, it is characterized in that, comprises the following steps:

步骤1,搭建Android系统开发环境,具体是:Step 1, build the Android system development environment, specifically:

配置Android开发环境:安装JDK配置Windows上JDK的变量环境,其次下载Eclipse并配置环境变量,然后下载安装安卓SDK,最后为Eclipse安装ADT插件Configure the Android development environment: install JDK and configure the variable environment of JDK on Windows, then download Eclipse and configure environment variables, then download and install the Android SDK, and finally install the ADT plug-in for Eclipse

地图模块Android SDK:在工程里创建一个libs的文件夹,把开发包中的文件对应复制到libs目录下然后集成到自己的工程中。Map module Android SDK: Create a libs folder in the project, copy the files in the development kit to the libs directory and integrate it into your own project.

步骤2,基于Android系统的移动终端上的Activity应用程序,设计检测机制结构并实现主界面模块,整个检测机制的逻辑结构可划分成表现层、逻辑处理层以及数据存储层三层,Step 2, based on the Activity application program on the mobile terminal of the Android system, design the detection mechanism structure and realize the main interface module. The logical structure of the entire detection mechanism can be divided into three layers: the presentation layer, the logic processing layer and the data storage layer.

表现层:提供消息发送者的软件交互页面,包括软件的设置页面、消息发送页面以及地图展示页面。Presentation layer: Provide the message sender's software interaction page, including software setting page, message sending page and map display page.

逻辑处理层:负责系统整个检测机制所有的数据处理和数据发送。包括参数修改的处理、消息发送者与测距点距离的计算、消息发送者定位的处理、消息可信度的判断。Logic processing layer: Responsible for all data processing and data transmission of the entire detection mechanism of the system. Including the processing of parameter modification, the calculation of the distance between the message sender and the distance measuring point, the processing of the location of the message sender, and the judgment of the message credibility.

数据存储层:主要实现对信息报道者报道的信息的接收和存储。Data storage layer: mainly realizes the reception and storage of information reported by information reporters.

步骤3,基于三点定位法的推送信息检测机制,实现推送信息的检测,Step 3, based on the push information detection mechanism of the three-point positioning method, realize the detection of push information,

步骤3.1,对打开应用程序的用户进行定位,获取位置信息,即通过requestLocationUpdates()对象设置一个位置改变条件。这个条件包括定位请求发起的最小时间间隔,以及定位请求发起时的最小位移变化。这两个条件必须同时满足,才能执行回调函数,触发位置监听。避免多次重复的无用定位。人工进行removeUpdates()进行位置信息的更新,onResume()中持续跟踪,相应的在onPause()中关闭跟踪。Step 3.1: Locate the user who opened the application and obtain location information, that is, set a location change condition through the requestLocationUpdates() object. This condition includes the minimum time interval when the positioning request is initiated, and the minimum displacement change when the positioning request is initiated. These two conditions must be met at the same time to execute the callback function and trigger the location monitoring. Avoid useless positioning repeated many times. Manually perform removeUpdates() to update the location information, keep tracking in onResume(), and turn off tracking in onPause() accordingly.

步骤3.2,用户发送消息时,判断消息是否为空,同时查询消息发生地点,避免空白信息和无效信息的发送;Step 3.2, when the user sends a message, judge whether the message is empty, and at the same time query the location of the message to avoid sending blank information and invalid information;

步骤3.3,三点定位法计算测量点距离,绘制圆形。In step 3.3, the three-point positioning method calculates the distance between the measurement points and draws a circle.

步骤3.4,信息检测,依据几何扫描算法,提出并采用计算报道消息发生地和消息发送者所在区域之间的距离算法。Step 3.4, information detection, based on the geometric scanning algorithm, proposes and adopts an algorithm for calculating the distance between the place where the reported message occurs and the area where the message sender is located.

在上述基于三点定位法的推送信息采信检测方法,步骤3.3的实现方式为,使用百度地图画圆API类Circle来创建圆覆盖物,通过map.addOverlay(circle)可以增加一个圆形,以及其他方法个性化设置所画的图形。In the above-mentioned push information detection method based on the three-point positioning method, the implementation method of step 3.3 is to use the Baidu map drawing circle API class Circle to create a circle overlay, and a circle can be added through map.addOverlay(circle), and others The method personalizes the graphics drawn.

在上述基于三点定位法的推送信息采信检测方法,步骤3.4的实现方式为,依据几何扫描算法,针对地址空间的点进行研究,本发明提出了一种计算报道消息发生地和消息报道者所在区域间的距离的算法,输入三个侦察点S1、S2、S3及其与消息发送者之间的距离L1、L2、L3,消息发生地P,即可得到消息发生地和消息报道者所在区域之间的距离L。In the above-mentioned push information detection method based on the three-point positioning method, the implementation method of step 3.4 is to conduct research on the points in the address space according to the geometric scanning algorithm. The algorithm of the distance between regions, input the three reconnaissance points S1, S2, S3 and the distances L1, L2, L3 between them and the message sender, and the place where the news happened P, then you can get the place where the news happened and the area where the news reporter is located The distance L between.

本发明具有如下优点:利用主观消息中的位置信息这个客观因素作为评价参考,无需添加新的评价标准,降低检验过程的复杂度;同时也可以与其他评价体系组合使用,具有可扩展性;运用普及的智能手机中常见的定位功能,使得该项技术有良好的便捷性,同时检测的结果在消息发送和接收时就能够获得,具有及时性;提出对可信度评价的分级体系,为之后的研究提供发展方向。The present invention has the following advantages: using the objective factor of position information in subjective information as an evaluation reference, without adding new evaluation criteria, and reducing the complexity of the inspection process; at the same time, it can also be used in combination with other evaluation systems, and has scalability; The positioning function common in popular smart phones makes this technology very convenient. At the same time, the detection results can be obtained when the message is sent and received, which is timely; a grading system for credibility evaluation is proposed for future research provides direction for development.

附图说明Description of drawings

图1本发明实施例的地图模块Android SDK提供的开发资源。Fig. 1 is the development resource provided by the map module Android SDK of the embodiment of the present invention.

图2本发明实施例的基于三点定位法的消息检测机制实现流程图。Fig. 2 is a flow chart of implementing the message detection mechanism based on the three-point positioning method according to the embodiment of the present invention.

图3本发明实施例的Android平台的基本架构图。FIG. 3 is a basic architecture diagram of the Android platform of the embodiment of the present invention.

图4本发明实施例的Android工程目录图。Fig. 4 is an Android project directory diagram of the embodiment of the present invention.

图5本发明实施例的Android工程目录添加权限信息图。Fig. 5 is a diagram of permission information added to the Android project directory according to the embodiment of the present invention.

图6本发明实施例的布局xml文件中添加地图控件图。Fig. 6 is a map control diagram added in the layout xml file of the embodiment of the present invention.

图7本发明实施例的生命周期图。Fig. 7 is a life cycle diagram of the embodiment of the present invention.

图8本发明实施例的引入相关类图。Fig. 8 is an import-related class diagram of the embodiment of the present invention.

图9本发明实施例通过三点定位法检测即时信息可信度流程图。Fig. 9 is a flow chart of detecting the credibility of instant information through the three-point positioning method according to the embodiment of the present invention.

图10本发明实施例的检测机制逻辑结构图。Fig. 10 is a logical structure diagram of the detection mechanism of the embodiment of the present invention.

图11本发明实施例的实验主界面图。Fig. 11 is the experimental main interface diagram of the embodiment of the present invention.

图12本发明实施例的百度地图拾取坐标系统图。Fig. 12 is a coordinate system diagram of Baidu map picking according to the embodiment of the present invention.

图13本发明实施例的应用设置页面图。Fig. 13 is a diagram of the application setting page of the embodiment of the present invention.

图14本发明实施例的设置测量点坐标成功图。Fig. 14 is a successful diagram of setting measurement point coordinates according to the embodiment of the present invention.

图15本发明实施例的还原默认测量点坐标成功图。Fig. 15 is a successful diagram of restoring the default measurement point coordinates according to the embodiment of the present invention.

图16本发明实施例的避免空白信息和无效信息图。Fig. 16 is a diagram of avoiding blank information and invalid information according to the embodiment of the present invention.

图17本发明实施例的消息检测页面图。Fig. 17 is a message detection page diagram of the embodiment of the present invention.

图18本发明实施例的“灾难现场”定位页面图。Fig. 18 is a page diagram of "disaster scene" positioning according to the embodiment of the present invention.

图19本发明实施例的圆形切线划分图。Fig. 19 is a circular tangent division diagram of the embodiment of the present invention.

图20本发明实施例的二维几何扫描图。Fig. 20 is a two-dimensional geometric scan diagram of an embodiment of the present invention.

图21本发明实施例的三点定位算法扫描图。Fig. 21 is a scanning diagram of the three-point positioning algorithm of the embodiment of the present invention.

图22本发明实施例的武汉大学测试结果图。Fig. 22 is a diagram of test results of Wuhan University in the embodiment of the present invention.

具体实施方式detailed description

本发明设计的基于三点定位法的消息检测机制实现流程见图2,可由本领域技术人员采用计算机软件技术实现流程自动运行。实施例具体实现过程如下:The implementation flow of the message detection mechanism based on the three-point positioning method designed by the present invention is shown in Figure 2, and the automatic operation of the flow can be realized by those skilled in the art by using computer software technology. The specific implementation process of the embodiment is as follows:

步骤1,搭建Android系统开发环境,配置Android开发环境和地图模块AndroidSDK;Step 1, build the Android system development environment, configure the Android development environment and map module AndroidSDK;

Android开发环境主要分为以下4个步骤:The Android development environment is mainly divided into the following four steps:

(1)安装JDK,配置Windows上JDK的变量环境;(1) Install JDK and configure the variable environment of JDK on Windows;

(2)下载安装Eclipse,配置环境变量;(2) Download and install Eclipse, configure environment variables;

(3)下载安装Android SDK;(3) Download and install the Android SDK;

(4)为Eclipse安装ADT插件。(4) Install the ADT plug-in for Eclipse.

JDK(Java SE Development Kit)是Java语言的软件开发工具包。JDK是Java开发过程的重心,包括了Java开发的执行环境(Java Runtime Environment)、一系列Java开发的工具和给开发人员开发应用程序时调用的Java类库。JDK包含的基本工具如表2所示,这些工具可以在JDK的安装目录下的bin目录里面查看。JDK (Java SE Development Kit) is a software development kit for the Java language. JDK is the focus of the Java development process, including the Java development execution environment (Java Runtime Environment), a series of Java development tools, and the Java class library called by developers when developing applications. The basic tools included in the JDK are shown in Table 2. These tools can be viewed in the bin directory under the JDK installation directory.

表2 Java SE Development Kit包含的基本工具Table 2 Basic tools included in the Java SE Development Kit

Eclipse是跨平台的集成开发环境,主要是为Java应用程序及Android开发的IDE,有着大量定制的接口和无数的插件。Eclipse无需进行安装,将它解压到想要安装的目录文件中就可以。假如没有现成的IDE(Integrated Development Environment,集成开发环境,主要指可以辅助开发程序的应用软件),可以直接下载SDK完整包。完整包里面包含了Eclipse,不需要再另外下载安装。Eclipse is a cross-platform integrated development environment, mainly an IDE developed for Java applications and Android, with a large number of customized interfaces and countless plug-ins. Eclipse does not need to be installed, just unzip it to the directory file you want to install. If there is no ready-made IDE (Integrated Development Environment, integrated development environment, mainly refers to the application software that can assist in the development of programs), you can directly download the complete SDK package. Eclipse is included in the complete package, so there is no need to download and install it separately.

Android SDK是Android应用软件开发包工具,提供了开发Android应用程序所需的API库和组建、测试和调试Android应用程序需要的开发工具。Android SDK is an Android application software development kit tool, which provides the API library required to develop Android applications and the development tools required to build, test and debug Android applications.

ADT(Android Developer Tools,安卓开发者工具),是在Eclipse集成开发环境上进行Android应用开发的插件。这个插件实际上也就是在Eclipse上用来开发Android应用程序的软件工具。它能够让Eclipse和Android SDK关联起来,方便开发人员进行Android应用程序的开发和调试。本发明主要开发环境是Eclipse 3.5.2,Android平台的基本架构如附图3所示。ADT (Android Developer Tools, Android Developer Tools), is a plug-in for Android application development on the Eclipse integrated development environment. This plug-in is actually a software tool used to develop Android applications on Eclipse. It can associate Eclipse with Android SDK, which is convenient for developers to develop and debug Android applications. The main development environment of the present invention is Eclipse 3.5.2, and the basic structure of the Android platform is as shown in Figure 3.

配置地图模块Android SDK,附图4展示了Android主要的工程目录。其中src文件夹用来放置java程序源代码,assets文件夹放置原样打包进应用程序中的文件。文件夹gen用于存放Android开发工具所生成的源文件,其下有一个R.java文件是由开发工具自动生成和维护的,不需要我们进行创建和修改。当需要向res目录中添加引用文件时,R.java能够自动完成引用的添加。同时R.java还能判断程序编译时是否用到了所有res目录下的文件,未被使用的文件将不会被打包到应用程序中,优化了执行空间。res目录下的前几个文件依次根据文件名存放由不同像素的图片文件,layout和values分别存放用户界面文件和界面上使用的文字。AndroidManifest.xml是功能清单文件,在这里可以看到整个工程里有多少activity、services、providers、receivers,以及需要的安全授权uses-permission等。在完成了Android开发环境的配置的工程里创建一个libs的文件夹后,把开发包中的文件对应复制到libs目录下然后集成到自己的工程中。Configure the map module Android SDK, Figure 4 shows the main project directory of Android. Among them, the src folder is used to store the java program source code, and the assets folder is used to store the files packaged into the application as they are. The folder gen is used to store the source files generated by Android development tools, and there is an R.java file under it that is automatically generated and maintained by the development tools, and we do not need to create and modify it. When it is necessary to add reference files to the res directory, R.java can automatically complete the addition of references. At the same time, R.java can also judge whether all the files in the res directory are used when the program is compiled, and the unused files will not be packaged into the application program, which optimizes the execution space. The first few files in the res directory store image files with different pixels according to the file name, and layout and values store user interface files and text used on the interface respectively. AndroidManifest.xml is a function manifest file, where you can see how many activities, services, providers, receivers, and the required security authorization uses-permission in the entire project. After creating a libs folder in the project that has completed the configuration of the Android development environment, copy the files in the development package to the libs directory and integrate it into your own project.

要显示百度地图,首先需在AndroidManifest中加上开发密钥、所需权限等信息。一般所需的权限主要为运营商信息、网络定位、GPS定位、Wi-Fi网络信息、Wi-Fi获取权限并在布局xml文件中添加地图控件。如附图5,附图6所示。To display Baidu Maps, you first need to add information such as the development key and required permissions to the AndroidManifest. Generally, the permissions required are mainly operator information, network positioning, GPS positioning, Wi-Fi network information, Wi-Fi access permissions and adding map controls in the layout xml file. As shown in accompanying drawing 5, accompanying drawing 6.

Android中起到显示作用的是四大主件之一—Activity。Activity是Android中最基本的构成组件之一,它提供了与用户的交互界面。Activity的一个生命周期是指它从创建到关闭的状态。整个过程中一共可能经历运行、状态、状态和销毁四种状态,如附图7所示。The display function in Android is one of the four major components—Activity. Activity is one of the most basic components in Android, which provides an interactive interface with users. A life cycle of an Activity refers to its state from creation to shutdown. In the whole process, there may be four states of operation, state, state and destruction, as shown in Figure 7.

当Activity第一次启动时将使用onCreate()方法进行Activity的初始化,这是一个Activity生命周期的起始。打开应用程序时,需要按顺序运行onCreateO、onStartO、onResume()这三个方法,这个时候Activity已经正常显示了。如果在此时点击回退键,先后调用onPauseO、onStopO、onDestory()三个方法,这个应用程序就将结束;如果在此时按Home键,去打开其他应用,这个应用程序并没有结束或者销毁,而是先后执行了onPause()、onStop()这两个方法,转变成了停止状态。如果再次打开应用程序,将会按顺序运行onRestartO、onStartO、onResume()三个方法变为运行状态。When the Activity starts for the first time, the onCreate() method will be used to initialize the Activity, which is the beginning of an Activity life cycle. When opening the application, you need to run the three methods onCreateO, onStartO, and onResume() in order. At this time, the Activity has been displayed normally. If you click the back button at this time and call the three methods onPauseO, onStopO, and onDestory() successively, the application will end; if you press the Home button at this time to open other applications, the application will not end or be destroyed. , but executes the two methods onPause() and onStop() successively, and turns into a stop state. If the application is opened again, the three methods onRestartO, onStartO, and onResume() will be run in order to become running.

百度地图须在应用程序建立时对SDK引用的Context全局变量进行初始化,在SDK各功能组件调用之前使用SDKInitializer.initialize(getApplicationContext())方法。创建地图Activity,管理地图生命周期,需要在打开时通过mMapView=(MapView)findViewById(R.id.bmapView)获得对地图控件的引入。针对暂停、停止和销毁三个状态,百度地图分别提供了mMapView.onPause()、mMapView.onResume()、mMapView.onDestroy()三种方法实现地图生命周期管理。最后使用import引入相关的类,如附图8所示。至此,整个的开发环境就已经全部配置完成。Baidu Maps must initialize the Context global variable referenced by the SDK when the application is created, and use the SDKInitializer.initialize(getApplicationContext()) method before calling each functional component of the SDK. To create a map Activity and manage the map life cycle, it is necessary to obtain the introduction of the map control through mMapView=(MapView)findViewById(R.id.bmapView) when opening. For the three states of pause, stop, and destruction, Baidu Maps provides three methods, mMapView.onPause(), mMapView.onResume(), and mMapView.onDestroy(), to realize map lifecycle management. Finally, use import to introduce related classes, as shown in Figure 8. So far, the entire development environment has been fully configured.

步骤2,基于Android系统的移动终端上的Activity应用程序,设计检测机制结构并实现主界面模块;Step 2, based on the Activity application program on the mobile terminal of the Android system, design the detection mechanism structure and realize the main interface module;

考虑到整个检测机制的功能需求,我们对整个检测机制进行模块的细分。我们将逻辑结构组织成单独的、职能相关的离散层,在主要方面加以内聚,让逻辑结构变得更加明确。整个检测机制的逻辑结构可划分成表现层、逻辑处理层以及数据存储层三层,如图9所示。Considering the functional requirements of the entire detection mechanism, we subdivide the entire detection mechanism into modules. We organize the logical structure into separate, functionally related discrete layers, cohesive in the main aspects, and make the logical structure more explicit. The logical structure of the entire detection mechanism can be divided into three layers: presentation layer, logic processing layer and data storage layer, as shown in Figure 9.

表现层:提供消息发送者的软件交互页面,包括软件的设置页面、消息发送页面以及地图展示页面。Presentation layer: Provide the message sender's software interaction page, including software setting page, message sending page and map display page.

逻辑处理层:负责系统整个检测机制所有的数据处理和数据发送。包括参数修改的处理、消息发送者与测距点距离的计算、消息发送者定位的处理、消息可信度的判断。Logic processing layer: Responsible for all data processing and data transmission of the entire detection mechanism of the system. Including the processing of parameter modification, the calculation of the distance between the message sender and the distance measuring point, the processing of the location of the message sender, and the judgment of the message credibility.

数据存储层:主要实现对信息报道者报道的信息的接收和存储。Data storage layer: mainly realizes the reception and storage of information reported by information reporters.

其中数据存储层主要是在服务器端。其中消息ID和报道者ID均为整数类型,由系统在获取消息和用户注册的时候按顺序分配。消息发送时间为DATETIME类型,获取信息发送时的服务器日期和时间并进行记录。消息发生地和消息内容为字符型。考虑到一般报道的消息不会超出字符型数据的最长8000个字符的限制,因此没有采用文本型数据存储,以节省存储空间。可信度判断只有两种情况——消息可疑和消息较可靠,因此布尔型数据就可以表示。默认的消息的可靠度为FALSE不可靠。The data storage layer is mainly on the server side. Among them, the message ID and the reporter ID are both integer types, which are assigned in sequence by the system when obtaining messages and registering users. The message sending time is of DATETIME type, and the server date and time when the message is sent are obtained and recorded. The place where the message occurs and the content of the message are characters. Considering that the news generally reported will not exceed the maximum character limit of 8000 characters, so the text data is not stored in order to save storage space. There are only two situations for credibility judgment—the news is suspicious and the news is more reliable, so Boolean data can be expressed. The default message reliability is FALSE unreliable.

表3数据存储表Table 3 data storage table

本检测机制是在Android系统的移动终端上进行设计和实现的。Android应用程序是所有程序的入口文件,但是实际上应用程序只是一个宽泛的概念,并没有一个实际与之对应的界面。而在一个应用程序中,Activity才表示相对应的一个界面。一个Activity的扩展相当于一个界面。大多数的应用程序一般都会拥有多个界面,相应的,程序中将包括多个Activity类。因此,从实际显示的角度来看,MainActivity.java文件才是程序的主界面。This detection mechanism is designed and implemented on the mobile terminal of the Android system. The Android application program is the entry file of all programs, but in fact the application program is only a broad concept, and there is no actual interface corresponding to it. In an application program, Activity represents a corresponding interface. An extension of Activity is equivalent to an interface. Most applications generally have multiple interfaces, and accordingly, the program will include multiple Activity classes. Therefore, from the perspective of actual display, the MainActivity.java file is the main interface of the program.

本发明主界面主要完成两个功能,其中一个功能是完成三个测量点设置和对可接受范围划定的应用设置,另一个功能即是完成即时信息的发送。附图11展示了程序的主界面。The main interface of the present invention mainly completes two functions, one of which is to complete the setting of three measuring points and the application setting for the delineation of the acceptable range, and the other is to complete the sending of instant information. Figure 11 shows the main interface of the program.

有关三个测量点的设置我们是通过百度地图拾取坐标系统进行选取的。百度地图拾取坐标系统是百度推出的一个可以让用户方便地获得百度地图上某个位置的精准定位的地理位置信息(以经纬度坐标呈现),如图12所示。Regarding the settings of the three measurement points, we selected them through the coordinate system picked up by Baidu Maps. The Baidu map picking coordinate system is a geographic location information (presented in longitude and latitude coordinates) launched by Baidu that allows users to easily obtain the precise location of a certain location on the Baidu map, as shown in Figure 12.

在搜索栏输入想要搜索的地点后点击搜索,地图上就会出现相应的标记,点击其中的某一个标记点,就能看到相应的坐标;同时页面右侧也列出了查询到的所有地点及其坐标。在对具体地点名称不了解的情况下,鼠标放在地图上滑动,鼠标滑到每一个地方,都会同步显示对应的地图坐标,点击选定的坐标,右上角会记录下选定的坐标以备以后使用。Enter the place you want to search in the search bar and click Search, and the corresponding mark will appear on the map. Click on one of the marked points to see the corresponding coordinates; at the same time, all the searched places are listed on the right side of the page. places and their coordinates. If you don’t know the name of the specific location, put the mouse on the map and slide the mouse to each place, the corresponding map coordinates will be displayed synchronously, click on the selected coordinates, and the selected coordinates will be recorded in the upper right corner for future use for later use.

同时百度地图拾取坐标系统还提供了坐标反查的功能。当选择这个功能后,在搜索栏中输入已知点的坐标,该点就能显示在地图上。如果坐标解析成功,还能返回一个地址。At the same time, the Baidu map pick-up coordinate system also provides the function of coordinate reverse check. When this function is selected, enter the coordinates of a known point in the search bar, and the point will be displayed on the map. If the coordinates are resolved successfully, an address can also be returned.

地图上两点间的距离计算公式如式(1)所示,其中R=6370996.81,lng(Longitude)为经度,lat(Latitude)为纬度。The formula for calculating the distance between two points on the map is shown in formula (1), where R=6370996.81, lng (Longitude) is the longitude, and lat (Latitude) is the latitude.

因为本实验主要是在湖北省武汉市进行,同时由于在地图上“差之毫厘,谬以千里”,选取学校周边的测量点在数据上太接近不便于数据分辨,因此本发明随机在周边地图上选取了三个测量点(114.349802,30.535147)、(114.363457,30.545038)和(114.404498,30.511795)。Because this experiment is mainly carried out in Wuhan City, Hubei Province, and at the same time, due to the fact that "a slight difference is a thousand miles away" on the map, the measurement points around the selected school are too close in data to be easy to distinguish from the data, so the present invention randomizes them on the surrounding map Three measurement points (114.349802, 30.535147), (114.363457, 30.545038) and (114.404498, 30.511795) were selected on the above.

在可接受距离范围的选取上,我们利用一个常用的距离判读口诀——“五清六不清,七空八不空,千米看劳动”,选择了500米。这个口诀的意思就是,人在距离500米时可以通过他们穿着的衣物和肢体动作辨明性别,当距离增加到600米时就分不清男女了;在距离为700米时,可以看到对方行走时两腿间走路产生的空间,但在800米时就不能看到了;在距离为1000米的时候只能看到对方坐、站和劳动弯腰等幅度较大的动作改变,在2000米的时候人的身体就只是一个小黑点,什么都没有办法分清了。为了细化对即时信息的检测,我们选择可以看到正常行为、分清身形性别的500米作为可接受的距离范围。In the selection of the acceptable distance range, we used a commonly used formula for distance interpretation - "five clears and six unclear, seven empty and eight empty, one thousand meters depends on labor", and chose 500 meters. The meaning of this mantra is that people can tell their gender through the clothes they wear and their body movements when the distance is 500 meters, but when the distance increases to 600 meters, they can't tell the difference between men and women; when the distance is 700 meters, they can see each other walking When walking between the two legs, you can’t see the space when walking at 800 meters; when the distance is 1000 meters, you can only see the relatively large movement changes such as sitting, standing, and bending over for labor. At that time, the human body is just a small black spot, and nothing can be distinguished. In order to refine the detection of real-time information, we choose 500 meters as the acceptable distance range where we can see normal behavior and distinguish body shape and gender.

以上的所有默认数据都是可以在如图12所示的应用设置里面进行修改。在三个测量点的选取上,只要保证两点之间的距离在百米以上(避免存在无效测量点),即可,如果消息发送者在选取的三个测量点所形成的三角形以内,测量的效果会更加。如果对视觉可见的即时信息可接受距离范围不同,也可以自行进行填写,不过本发明还是建议选择500米相对精确。对默认数据进行设置修改成功如图14所示。同时,如果对设置的数据不满意,希望还原为初始设置,也可以选择还原默认坐标,还原成功如图15所示。All the above default data can be modified in the application settings as shown in Figure 12. In the selection of the three measurement points, as long as the distance between the two points is more than 100 meters (to avoid the existence of invalid measurement points), then if the message sender is within the triangle formed by the three selected measurement points, the measurement The effect will be even more. If the acceptable distance range for visually visible instant information is different, it can also be filled in by itself, but the present invention still recommends that 500 meters is relatively accurate. The default data is set and modified successfully, as shown in Figure 14. At the same time, if you are not satisfied with the set data and want to restore to the initial settings, you can also choose to restore the default coordinates, and the restoration is successful, as shown in Figure 15.

步骤3,基于三点定位法的推送信息检测机制,实现推送信息的检测,Step 3, based on the push information detection mechanism of the three-point positioning method, realize the detection of push information,

步骤3.1,对打开应用程序的用户进行定位,获取位置信息。在用户打开应用程序的时候,我们会对用户进行定位,用于计算测量点的距离以便绘制圆形。由于人的位置会不断改变,我们需要通过requestLocationUpdates()对象设置一个位置改变条件。这个条件包括定位请求发起的最小时间间隔,以及定位请求发起时的最小位移变化。这两个条件必须同时满足,才能执行回调函数,触发位置监听。这样,我们就可以避免多次重复的无用定位。需要注意的是,由于我们要求不断获得位置更新,因此我们必须在人工进行removeUpdates()。我们只在Activity运行时进行跟踪,否则即使应用中所有的Activity都关闭,app仍继续在不断更新位置信息。这样会导致应用资源无法被回收。所以,我们在onResume()中持续跟踪,相应的在onPause()中关闭跟踪。Step 3.1, locate the user who opens the application program, and obtain location information. When the user opens the app, we position the user, which is used to calculate the distance of the measurement point to draw the circle. Since the location of a person is constantly changing, we need to set a location change condition through the requestLocationUpdates() object. This condition includes the minimum time interval when the positioning request is initiated, and the minimum displacement change when the positioning request is initiated. These two conditions must be met at the same time to execute the callback function and trigger the location monitoring. In this way, we can avoid useless positioning repeated many times. Note that since we're asking for constant location updates, we'll have to do removeUpdates() manually. We only track when the Activity is running, otherwise the app will continue to update location information even if all activities in the app are closed. This will result in application resources not being reclaimed. Therefore, we continue to track in onResume(), and correspondingly turn off tracking in onPause().

步骤3.2,当用户发送消息时,判断消息是否为空,同时查询消息发生地点,避免空白信息和无效信息的发送,如图16所示。由于日常使用百度地图查询地址时,往往会出现多条查询结果。本发明在查询消息发生地时,为了避免查询结果的多样性,默认选取查询结果中的第一条结果作为消息发生地点。因此,如果要保证消息发生地址的准确性,发送消息的时候,地址写得越详细查询结果才会越接近目标地址。Step 3.2, when the user sends a message, determine whether the message is empty, and at the same time query the location of the message to avoid sending blank and invalid information, as shown in Figure 16. When you use Baidu Maps to query addresses on a daily basis, there will often be multiple query results. In order to avoid the diversity of query results when querying the location of the message, the present invention selects the first result in the query results as the location of the message by default. Therefore, if you want to ensure the accuracy of the message address, when sending the message, the more detailed the address is, the closer the query result will be to the target address.

步骤3.3,计算测量点距离,绘制圆形。百度地图目前已经提供了画圆API类Circle(center:Point,radius:Number[,opts:CircleOptions])来创建圆覆盖物,只要传入圆的中心经纬度、圆的半径就可以实现画圆。通过map.addOverlay(circle)可以新增加一个圆形,同时还提供了circle.setFillColor()、circle.setStrokeColor()等方法来个性化设置所画的图形。Step 3.3, calculate the distance of the measuring point, and draw a circle. Baidu Maps currently provides a circle drawing API class Circle(center:Point,radius:Number[,opts:CircleOptions]) to create a circle overlay, as long as the latitude and longitude of the center of the circle and the radius of the circle are passed in, the circle can be drawn. A new circle can be added through map.addOverlay(circle), and methods such as circle.setFillColor() and circle.setStrokeColor() are also provided to personalize the drawn graphics.

步骤3.4,信息检测,依据几何扫描算法,提出并采用计算报道消息发生地和消息发送者所在区域之间的距离算法。Step 3.4, information detection, based on the geometric scanning algorithm, proposes and adopts an algorithm for calculating the distance between the place where the reported message occurs and the area where the message sender is located.

本发明的难点主要存在于如何判断消息发送者所在区域和报道消息发生地是否在可接受范围内。计算出的消息发送者所在区域是肯定存在的。该区域是三个圆交叉形成的区域,可能有如图17所示的四种情况。将图17中所示的区域进行补全完整可以得到图18,涂黑部分展示的是补全前设计的相交区域。可以看出,图17a、17b、17c分别与图18a、18b、18c相互对应,图17d则对应图18d、18e两种情况。在图18a、18b、18d这三种情况其实都归结到了图18a这一种情况,而图18c这种情况其实三个圆圈并没有共同相交的区域,与我们之前所得出的“计算出的消息发送者所在区域是肯定存在的”观点明显不同,因此这种情况并不归入本发明所讨论的范围里面。所以,本发明所需要讨论的只有图18a和图18e这两种情况。由于图18中a)和e)这两种情况所展示的共同区域都不是标准的多边形,没有直接处理的方法,因此我们需要对这些区域进行近似处理。从图19我们可以看出,三个圆形所相交的区域在图中L1、L2、L3、L4四条直线所划定的长方形之内,其中L1是三个圆形分别的最左边的点中最靠近右边的点的基于该点的该圆的切线,L2是三个圆形分别的最右边的点中最靠近左边的点的基于该点的该圆切线,L3是三个圆形分别的最下面的点中最靠近上面的点的基于该点的该圆的切线,L4是三个圆形分别的最上面的点中最靠近下面的点的基于该点的该圆的切线。这四条切线正好包含了三个圆形所相交的区域。同样,这种情况对于图18e也同样适用,因此我们利用这个矩形来缩小我们需要查找的范围。The difficulty of the present invention mainly lies in how to judge whether the area where the message sender is located and the place where the reported message occurs are within an acceptable range. The calculated area where the message sender is located must exist. This area is formed by the intersection of three circles, and there may be four situations as shown in Figure 17. Figure 18 can be obtained by completing the area shown in Figure 17. The blackened part shows the intersection area of the design before completion. It can be seen that Figures 17a, 17b, and 17c correspond to Figures 18a, 18b, and 18c, respectively, and Figure 17d corresponds to Figures 18d and 18e. The three situations in Figure 18a, 18b, and 18d are actually attributed to the situation in Figure 18a, and the situation in Figure 18c actually has no common intersecting area for the three circles, which is different from the "calculated message" we obtained before The area where the sender is located must exist" is obviously different, so this situation does not fall into the scope of the present invention. Therefore, only the two cases of Fig. 18a and Fig. 18e need to be discussed in the present invention. Since the common areas shown in the two cases a) and e) in Figure 18 are not standard polygons, there is no direct processing method, so we need to approximate these areas. From Figure 19, we can see that the area where the three circles intersect is within the rectangle delimited by the four straight lines L1, L2, L3, and L4 in the figure, where L1 is the leftmost point of the three circles respectively The tangent of the circle based on the point closest to the right, L2 is the tangent of the circle based on the point closest to the left among the rightmost points of the three circles respectively, L3 is the tangent of the circle of the three circles respectively The tangent line of the circle based on the point closest to the uppermost point among the lowermost points, L4 is the tangent line of the circle based on the point closest to the lower point among the uppermost points of the three circles respectively. These four tangents exactly encompass the area where the three circles intersect. Again, this situation is also true for Figure 18e, so we use this rectangle to narrow down what we need to look for.

考虑到本算法主要针对地图二维空间的点进行研究,本发明参考了相似的算法——几何扫描算法。在几何算法中,考虑的主要对象通常是二维、三维或者是更高维空间中的点、线段、多边形和其他几何体。有时候一个问题的解法需要通过“扫描”给出的输入对象来收集信息以便找到可行的解决方案。这种技术在二维平面被称为平面扫描,在三维空间上则被称为空间扫描。在它的简单形式中,一条垂直的直线在平面上从左向右进行扫描,在每个对象(比如说一个点)处逗留,从最左侧的对象开始,一直向右扫描到最后测的对象。Considering that this algorithm is mainly researched on the points in the two-dimensional space of the map, the present invention refers to a similar algorithm—geometric scanning algorithm. In geometric algorithms, the main objects considered are usually points, line segments, polygons and other geometric objects in two-dimensional, three-dimensional or higher-dimensional spaces. Sometimes the solution to a problem requires "scanning" given input objects to gather information in order to find feasible solutions. This technique is called planar scanning on a two-dimensional plane, and space scanning on a three-dimensional space. In its simple form, a vertical line sweeps across the plane from left to right, stopping at each object (say, a point), starting with the leftmost object and sweeping right to the last measured object. object.

例如,在平面上给出的一个有n个点的集合S中找出集合中的极大点。可以先把S中的所有的点按照它们的x坐标进行非升序排列(如果两个点具有相同的x坐标,那么将有较大y坐标值的点排列在前面),那么最右侧的点无疑是个极大点,因为它具有最大的x坐标值。根据几何扫描算法,从最右侧向左扫描这些点,同时确定这些点的y坐标是否是极大值。整个算法过程如图20所示,极大集{a,b,c,d,e}形成了一个阶梯的形状。For example, in a set S with n points given on the plane, find the maximum point in the set. You can first arrange all the points in S according to their x coordinates in non-ascending order (if two points have the same x coordinate, then the point with the larger y coordinate value will be arranged in front), then the rightmost point Undoubtedly a maximal point, since it has the largest x-coordinate value. According to the geometric scanning algorithm, these points are scanned from the far right to the left, and at the same time, it is determined whether the y coordinate of these points is a maximum value. The whole algorithm process is shown in Figure 20, the maximal set {a, b, c, d, e} forms a ladder shape.

本发明依据以上几何扫描算法,提出了如下算法来计算报道消息发生地和消息发送者所在区域之间的距离。Based on the above geometric scanning algorithm, the present invention proposes the following algorithm to calculate the distance between the place where the report message occurs and the area where the message sender is located.

算法的过程如图21所示。扫描线从PL所在x坐标值开始向右测扫描所有y坐标值在PD和PU的y坐标值之间的点至PR所在x坐标值的切线处,判断该点是否在三个圆相交的范围内。对于每个在x坐标下三个圆相交范围内的点,分别计算y坐标值最大和最小两个点与消息发生地之间的距离,记录其中的最小距离并继续进行之后的扫描,直至整个扫描过程结束,最后得到的最小距离,就是报道消息发生地与消息发送者所在区域之间的距离。消息发生地的位置有三种情况:在L4上方;在L3下方;在L3和L4之间。根据不同的情况,针对同一个x值,我们需要进行扫描的y值如式(2)所示。The process of the algorithm is shown in Figure 21. The scan line starts from the x-coordinate value of PL and scans to the right to scan all points whose y-coordinate value is between the y-coordinate value of PD and PU to the tangent line of the x-coordinate value of PR, and judge whether the point is within the range of three circles intersecting Inside. For each point within the intersecting range of the three circles under the x coordinate, calculate the distance between the two points with the largest and smallest y coordinate values and the place where the message occurred, record the minimum distance and continue to scan until the entire After the scanning process is over, the minimum distance obtained at last is the distance between the place where the news is reported and the area where the message sender is located. There are three situations for where the message occurs: above L4; below L3; between L3 and L4. According to different situations, for the same x value, the y value we need to scan is shown in formula (2).

当PD·y<P·y<PU.y时,y值方向需要先从PD.y开始向上扫描至第一个在相交范围内的点y1,然后从PU.y开始向下扫描至第一个在相交范围内的点y2。When PD·y<P·y<PU.y, the y value direction needs to scan upwards from PD.y to the first point y1 within the intersection range, and then scan downwards from PU.y to the first A point y2 within the intersection range.

(1)如果P.y≥y2,则此时最近距离为y2与P之间的距离;(1) If P.y≥y2, then the shortest distance is the distance between y2 and P;

(2)如果P.y<y1,则此时最近距离为y1与P之间的距离;(2) If P.y<y1, then the shortest distance is the distance between y1 and P;

(3)如果y1≤P.y<y2,则此时最近距离为点(x,P.y)与P之间的距离。(3) If y1≤P.y<y2, then the shortest distance is the distance between point (x, P.y) and P.

地图上所示的三个圆形为根据三个测量点的坐标和与消息发送者之间的距离所画,点击“侦察点1”、“侦察点2”、“侦察点3”可以分别定位到三个测量点在地图上的相应位置。图22展示了在武汉大学信息学部发送有关武汉大学文理学部消息的测试结果。The three circles shown on the map are drawn according to the coordinates of the three measurement points and the distance from the sender of the message. Click "Scout Point 1", "Scout Point 2" and "Scout Point 3" to locate them respectively to the corresponding locations on the map of the three measurement points. Figure 22 shows the test results of sending messages about the Faculty of Arts and Sciences of Wuhan University in the Faculty of Informatics of Wuhan University.

本发明中所描述的具体实施例仅仅是对本发明精神作举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或者超越所附权利要求书所定义的范围。The specific embodiments described in the present invention are only to illustrate the spirit of the present invention. Those skilled in the art to which the present invention belongs can make various modifications or supplements to the described specific embodiments or adopt similar methods to replace them, but they will not deviate from the spirit of the present invention or go beyond the definition of the appended claims range.

Claims (3)

1.一种基于三点定位法的推送信息采信检测方法,其特征是,包括以下步骤:1. a kind of push information based on three-point positioning method is characterized in that, comprises the following steps: 步骤1,搭建Android系统开发环境,具体是:Step 1, build the Android system development environment, specifically: 配置Android开发环境:安装JDK配置Windows上JDK的变量环境,其次下载Eclipse并配置环境变量,然后下载安装安卓SDK,最后为Eclipse安装ADT插件Configure the Android development environment: install JDK and configure the variable environment of JDK on Windows, then download Eclipse and configure environment variables, then download and install the Android SDK, and finally install the ADT plug-in for Eclipse 地图模块Android SDK:在工程里创建一个libs的文件夹,把开发包中的文件对应复制到libs目录下然后集成到自己的工程中;Map module Android SDK: Create a libs folder in the project, copy the files in the development kit to the libs directory and integrate it into your own project; 步骤2,基于Android系统的移动终端上的Activity应用程序,设计检测机制结构并实现主界面模块,整个检测机制的逻辑结构可划分成表现层、逻辑处理层以及数据存储层三层,Step 2, based on the Activity application program on the mobile terminal of the Android system, design the detection mechanism structure and realize the main interface module. The logical structure of the entire detection mechanism can be divided into three layers: the presentation layer, the logic processing layer and the data storage layer. 表现层:提供消息发送者的软件交互页面,包括软件的设置页面、消息发送页面以及地图展示页面;Presentation layer: Provide software interaction pages for message senders, including software setting pages, message sending pages, and map display pages; 逻辑处理层:负责系统整个检测机制所有的数据处理和数据发送;包括参数修改的处理、消息发送者与测距点距离的计算、消息发送者定位的处理、消息可信度的判断;Logic processing layer: Responsible for all data processing and data transmission of the entire detection mechanism of the system; including the processing of parameter modification, the calculation of the distance between the message sender and the distance measuring point, the processing of the location of the message sender, and the judgment of message credibility; 数据存储层:主要实现对信息报道者报道的信息的接收和存储;Data storage layer: mainly realizes the reception and storage of information reported by information reporters; 步骤3,基于三点定位法的推送信息检测机制,实现推送信息的检测,Step 3, based on the push information detection mechanism of the three-point positioning method, realize the detection of push information, 步骤3.1,对打开应用程序的用户进行定位,获取位置信息,即通过requestLocationUpdates()对象设置一个位置改变条件;这个条件包括定位请求发起的最小时间间隔,以及定位请求发起时的最小位移变化;这两个条件必须同时满足,才能执行回调函数,触发位置监听;避免多次重复的无用定位;人工进行removeUpdates()进行位置信息的更新,onResume()中持续跟踪,相应的在onPause()中关闭跟踪;Step 3.1, locate the user who opened the application, and obtain the location information, that is, set a location change condition through the requestLocationUpdates() object; this condition includes the minimum time interval when the location request is initiated, and the minimum displacement change when the location request is initiated; this The two conditions must be met at the same time to execute the callback function and trigger location monitoring; avoid repeated useless positioning; manually perform removeUpdates() to update the location information, continue tracking in onResume(), and close it in onPause() accordingly track; 步骤3.2,用户发送消息时,判断消息是否为空,同时查询消息发生地点,避免空白信息和无效信息的发送;Step 3.2, when the user sends a message, judge whether the message is empty, and at the same time query the location of the message to avoid sending blank information and invalid information; 步骤3.3,三点定位法计算测量点距离,绘制圆形;Step 3.3, the three-point positioning method calculates the distance of the measuring point, and draws a circle; 步骤3.4,信息检测,依据几何扫描算法,提出并采用计算报道消息发生地和消息发送者所在区域之间的距离算法。Step 3.4, information detection, based on the geometric scanning algorithm, proposes and adopts an algorithm for calculating the distance between the place where the reported message occurs and the area where the message sender is located. 2.根据权利要求1所述基于三点定位法的推送信息采信检测方法,其特征是:步骤3.3的实现方式为,使用百度地图画圆API类Circle来创建圆覆盖物,通过map.addOverlay(circle)可以增加一个圆形,以及其他方法个性化设置所画的图形。2. according to claim 1, based on the push information detection method of three-point positioning method, it is characterized in that: the implementation mode of step 3.3 is, use Baidu map to draw circle API class Circle to create circle covering, by map.addOverlay( circle) can add a circle, and other methods to personalize the drawn graphics. 3.根据权利要求1所述基于三点定位法的推送信息采信检测方法,其特征是:步骤3.4的实现方式为,依据几何扫描算法,针对地址空间的点进行研究,本发明提出了一种计算报道消息发生地和消息报道者所在区域间的距离的算法,输入三个侦察点S1、S2、S3及其与消息发送者之间的距离L1、L2、L3,消息发生地P,即可得到消息发生地和消息报道者所在区域之间的距离L。3. according to the described push information detection method based on the three-point positioning method of claim 1, it is characterized in that: the implementation mode of step 3.4 is, according to the geometric scanning algorithm, the point of the address space is studied, and the present invention proposes a The algorithm for calculating the distance between the place where the news is reported and the area where the reporter is located, input the three reconnaissance points S1, S2, S3 and the distances L1, L2, L3 between them and the message sender, and the place where the news happened P, then Get the distance L between the place where the news happened and the area where the news reporter is located.
CN201710277470.6A 2017-04-25 2017-04-25 A push information detection method based on three-point positioning method Expired - Fee Related CN107203592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710277470.6A CN107203592B (en) 2017-04-25 2017-04-25 A push information detection method based on three-point positioning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710277470.6A CN107203592B (en) 2017-04-25 2017-04-25 A push information detection method based on three-point positioning method

Publications (2)

Publication Number Publication Date
CN107203592A true CN107203592A (en) 2017-09-26
CN107203592B CN107203592B (en) 2019-11-22

Family

ID=59905535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710277470.6A Expired - Fee Related CN107203592B (en) 2017-04-25 2017-04-25 A push information detection method based on three-point positioning method

Country Status (1)

Country Link
CN (1) CN107203592B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055276A (en) * 2021-03-09 2021-06-29 井冈山大学 Ring chat creating method, display method and system based on smart phone
CN114662020A (en) * 2022-04-29 2022-06-24 深圳依时货拉拉科技有限公司 Method and device for point of interest recommendation based on contour of point of interest

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102945258A (en) * 2012-10-18 2013-02-27 北京淘友天下科技发展有限公司 Method and system for obtaining reliability of users in social networking services
EP2832577A2 (en) * 2013-07-30 2015-02-04 HERE Global B.V. Detecting sobriety or driving condition using a mobile device
CN104462282A (en) * 2014-11-26 2015-03-25 百度在线网络技术(北京)有限公司 Information searching method and device
US20160080900A1 (en) * 2003-12-19 2016-03-17 Telecommunication Systems, Inc. User plane location services over session initiation protocol (sip)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160080900A1 (en) * 2003-12-19 2016-03-17 Telecommunication Systems, Inc. User plane location services over session initiation protocol (sip)
CN102945258A (en) * 2012-10-18 2013-02-27 北京淘友天下科技发展有限公司 Method and system for obtaining reliability of users in social networking services
EP2832577A2 (en) * 2013-07-30 2015-02-04 HERE Global B.V. Detecting sobriety or driving condition using a mobile device
CN104462282A (en) * 2014-11-26 2015-03-25 百度在线网络技术(北京)有限公司 Information searching method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055276A (en) * 2021-03-09 2021-06-29 井冈山大学 Ring chat creating method, display method and system based on smart phone
CN113055276B (en) * 2021-03-09 2022-07-22 井冈山大学 Ring chat creating method, display method and system based on smart phone
CN114662020A (en) * 2022-04-29 2022-06-24 深圳依时货拉拉科技有限公司 Method and device for point of interest recommendation based on contour of point of interest

Also Published As

Publication number Publication date
CN107203592B (en) 2019-11-22

Similar Documents

Publication Publication Date Title
Simon et al. A mobile application framework for the geospatial web
JP6063965B2 (en) Geocoding personal information
CN103703458B (en) Create and monitor the method and system of the warning for geographic area
US9179253B2 (en) Map service method and system of providing target contents based on location
CN111881377B (en) Method and device for processing position interest points
CN109246611A (en) System and method for using three dimensional local information to improve positioning service
US20200116816A1 (en) Location error radius determination
WO2010075456A1 (en) System and method for initiating actions and providing feedback by pointing at object of interest
WO2016101660A1 (en) Method for protecting terminal position information and intelligent terminal
CN103473253A (en) Geocoded data detection and user interfaces for same
US8358201B1 (en) Storage and recall of buried asset data over communications networks for damage avoidance and mapping
US20110225151A1 (en) Methods, devices, and computer program products for classifying digital media files based on associated geographical identification metadata
CN107203592B (en) A push information detection method based on three-point positioning method
Retscher et al. Experiences with techniques and sensors for smartphone positioning
JP2010028806A (en) Position management server and communication system and communication terminal device, and position providing apparatus and communication system
US11503431B2 (en) Simulator for nearby interactions of devices
US20140180574A1 (en) Electronic device and method for updating rendezvous location of communication devices
Dar et al. A system to track android devices: An implementation of lbs, location manager, services and web-services in android
US10896533B2 (en) Automated identification of geographic site boundaries
CN118945815B (en) Service scene identification method, electronic equipment and storage medium
US8823492B2 (en) Detection of incursion of proposed excavation zones into buried assets
Beeharee et al. Filtering location-based information using visibility
Klepal et al. Ols: opportunistic localization system for smart phones devices
CN107806862A (en) Aerophotogrammetric field work measuring method and system
Billen et al. Dynamic and mobile GIS: investigating changes in space and time

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20191122

Termination date: 20210425