CN107864450A - Positional information dissemination method, device and computer-readable recording medium - Google Patents

Positional information dissemination method, device and computer-readable recording medium Download PDF

Info

Publication number
CN107864450A
CN107864450A CN201710497108.XA CN201710497108A CN107864450A CN 107864450 A CN107864450 A CN 107864450A CN 201710497108 A CN201710497108 A CN 201710497108A CN 107864450 A CN107864450 A CN 107864450A
Authority
CN
China
Prior art keywords
positional information
request
information
module
requested service
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.)
Pending
Application number
CN201710497108.XA
Other languages
Chinese (zh)
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201710497108.XA priority Critical patent/CN107864450A/en
Publication of CN107864450A publication Critical patent/CN107864450A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/42Determining position
    • G01S19/45Determining position by combining measurements of signals from the satellite radio beacon positioning system with a supplementary measurement
    • G01S19/46Determining position by combining measurements of signals from the satellite radio beacon positioning system with a supplementary measurement the supplementary measurement being of a radio-wave signal type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/10Details of telephonic subscriber devices including a GPS signal receiver
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention provides a kind of positional information dissemination method, and this method includes:The position subscription information of each business module in terminal is obtained, and locating rule is set according to the position subscription information;Positioned according to the locating rule, obtain the current location information of terminal;When receiving the Location Request that a certain business module is sent, the current location information is issued to the requested service module for sending Location Request.The present invention also provides a kind of positional information distributing device and computer-readable recording medium.The Location Request of the overall situation and positional information are managed by the present invention by positional information distributing device, and positional information distributing device obtains positional information, and result then is distributed into related service module.By such mode, realize information issue and subscribe to the logic decoupling of both sides, its code is clear, manages and safeguards beneficial to staff;System resource has been saved simultaneously, has improved the experience of user.

Description

Positional information dissemination method, device and computer-readable recording medium
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of positional information dissemination method, device and computer Readable storage medium storing program for executing.
Background technology
Location-based service (LBS, Location Based Service) is also known as positioning service, refers to by terminal (such as mobile phone) With the cooperation of network, the present position information (latitude and longitude coordinates data, including three-dimensional data) of user is determined, and is passed through The modes such as SMS, MMS, voice issue user, or certain value-added service is provided based on the present position information of user. The location-based service of terminal at present is already present in many fields in life, such as the push of automobile rescue, medical first aid, information Deng.
At present, in the application with position service function, positioning be service basis, therefore for " Location Request " this One logic is often called by multiple different business modules, can so cause the chaotic and logic not rigorous of code, Its investigation is also complex when there is bug using operation, is unfavorable for project management and product maintenance;Due to multiple business modules all Location Request can be carried out, the unnecessary wasting of resources can be caused, for example, multiple business modules of same application are in the same time Multiple bearing acquisition request positional information has inside been carried out, has caused unnecessary resource (such as internal memory, electricity, mobile phone flow) wave Take, reduce the experience of user.
The content of the invention
It is a primary object of the present invention to propose a kind of positional information dissemination method, device and computer-readable storage medium Matter, it is intended to solve difficult management and problem of resource waste caused by multiple business module resettings.
To achieve the above object, the present invention provides a kind of positional information dissemination method, the positional information dissemination method bag Include following steps:
The position subscription information of each business module in terminal is obtained, and positioning rule are set according to the position subscription information Then;
Positioned according to the locating rule, obtain the current location information of terminal;
When receiving the Location Request that a certain business module is sent, to the requested service module for sending the Location Request Issue the current location information.
Preferably, the locating rule includes positioning time, described to be positioned according to the locating rule, described in acquisition The step of current location information of terminal, includes:
Positioned in the positioning time, obtain the current location information of terminal.
Preferably, the locating rule includes security request threshold value, described to receive determining for a certain business module transmission During the request of position, include to the step of requested service module issue current location information for sending the Location Request:
When receiving the Location Request that a certain business module is sent, judge to send the requested service mould of the Location Request Whether the request number of times of block is more than the security request threshold value;
If the request number of times is less than or equal to the security request threshold value, to described in requested service module issue Current location information.
Preferably, it is described when receiving the Location Request that a certain business module is sent, judge to send the Location Request The request number of times of requested service module the step of whether being more than the security request threshold value after, in addition to:
If the request number of times is more than the security request threshold value, returned to the requested service module without request permissions Information, and record the requested service module request number and transfinite event.
Preferably, the locating rule also includes locating periodically, described to be positioned according to the locating rule, obtains institute After the step of stating current location information of terminal, in addition to:
By being positioned again during the locating periodically, current location information is updated.
In addition, to achieve the above object, the present invention also provides a kind of positional information distributing device, the positional information issue Device includes processor, memory and is stored in the positional information issue that can be run on the memory and on the processor Program, wherein realizing following steps when the positional information release process is by the computing device:
The position subscription information of each business module in terminal is obtained, and positioning rule are set according to the position subscription information Then;
Positioned according to the locating rule, obtain the current location information of terminal;
When receiving the Location Request that a certain business module is sent, to the requested service module for sending the Location Request Issue the current location information.
Preferably, the locating rule includes positioning time, and the positional information release process is by the computing device When, also realize following steps:
Positioned in the positioning time, obtain the current location information of terminal.
Preferably, the locating rule includes security request threshold value, and the positional information release process is by the processor During execution, following steps are also realized:
When receiving the Location Request that a certain business module is sent, judge to send the requested service mould of the Location Request Whether the request number of times of block is more than the security request threshold value;
If the request number of times is less than or equal to the security request threshold value, to described in requested service module issue Current location information;
If the request number of times is more than the security request threshold value, returned to the requested service module without request permissions Information, and record the requested service module request number and transfinite event.
Preferably, the locating rule also includes locating periodically, and the positional information release process is held by the processor During row, following steps are also realized:
By being positioned again during the locating periodically, current location information is updated.
In addition, to achieve the above object, the present invention also provides a kind of computer-readable recording medium, described computer-readable Positional information release process is stored with storage medium, is realized as described above when the positional information release process is executed by processor Positional information dissemination method the step of.
The present invention sets according to the position subscription information and determined by obtaining the position subscription information of each module in terminal Position rule;Positioned according to the locating rule, obtain the current location information of terminal;Receiving a certain business module During the Location Request of transmission, the current location information is issued to the requested service module that the Location Request occurs.By with Upper type, positional information dissemination method of the invention are based on Publish-subscribe pattern, by the overall situation logical Location Request and positional information It is managed by positional information distributing device, positional information distributing device obtains position according to the demand of each business module to be believed Breath, obtain that result is distributed into related service module after positional information;Specific business module is without being concerned about that specific positioning is patrolled Positioning action is collected or performed, as long as sending positioning application to positional information distributing device when needing positional information, is believed by position Cease the related positional information of distributing device issue, and positional information distributing device is without being concerned about specific result treatment logic, By such mode, realize positional information issue and subscribe to the logic decoupling of both sides, its code is clear, beneficial to staff couple Whole project is managed and safeguarded;Positioning action is uniformly carried out by information delivery apparatus simultaneously, avoids disparate modules repeatedly fixed Resource (such as Installed System Memory, electricity, flow) wastes caused by position, improves the experience of user.
Brief description of the drawings
Fig. 1 be the present embodiments relate to terminal hardware structural representation;
Fig. 2 is the schematic flow sheet of positional information dissemination method first embodiment of the present invention;
Fig. 3 is described in Fig. 2 when receiving the Location Request that a certain business module is sent, to the transmission Location Request Requested service module issue the refinement schematic flow sheet of the current location information;
Fig. 4 is the schematic flow sheet of positional information dissemination method second embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The main thought of scheme of the embodiment of the present invention is:Based on Publish-subscribe pattern, configuration information issue in the terminal fills Put, be managed collectively by acquisition of the positional information distributing device to positional information and issue;Positional information distributing device obtains The position subscription information of each business module in terminal is taken, and locating rule is set according to the position subscription information;According to described Locating rule is positioned, and obtains current location information of terminal;When receiving the Location Request that a certain business module is sent, to The requested service module for sending Location Request issues the current location information., can be with wherein for positional information distributing device It is that skeleton code is customized according to the type (including IOS systems, android system etc.) of terminal system:It is original in system Positioning service on addition one positioning blocking module, the module does not change original modular system and realizes interface, only to each industry Business module is intercepted by calling interface, and (Location Request of the independent calling positioner sent to each business module is blocked Cut), and uniformly positioned by the blocking module;When positioning is completed, then the positional information for positioning gained is original by system Positional information is returned to each business module by standard interface, so as to which resource caused by avoiding disparate modules multiple bearing is (such as in system Deposit, electricity, flow etc.) waste, and this blocking module module is above-mentioned positional information distributing device.
Reference picture 1, Fig. 1 are the terminal hardware structural representation that scheme of the embodiment of the present invention is related to.
The position dissemination method of the embodiment of the present invention is applied to terminal, the terminal can be PC or smart mobile phone, Tablet personal computer, E-book reader, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic shadow As expert's compression standard audio aspect 3) player, pocket computer etc. have the packaged type terminal device of display function.Such as Described in Fig. 1, the terminal can include processor 1001 (such as CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is used to realize the connection communication between these components;User interface 1003 Including positioning unit (being used to be positioned, obtain positional information), information issue unit (being used for releasing position information), can be selected Family interface 1003 can also include display screen (Display), input block such as keyboard (Keyboard);Network interface 1004 can Wireline interface, the wave point (such as WI-FI interfaces) that can include standard of choosing;Memory 1005 can be high-speed RAM storage Device or stable memory (non-volatile memory), such as magnetic disk storage, memory 1005 are optional It can also be the storage device independently of aforementioned processor 1001.
Alternatively, the terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, sound Frequency circuit, WiFi module etc..Wherein, sensor ratio such as optical sensor, motion sensor and other sensors.Specifically, Optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to the light and shade of ambient light To adjust the brightness of display screen, proximity transducer can close display screen and/or backlight when light sensation equipment is moved in one's ear.Make For one kind of motion sensor, gravity accelerometer can detect in all directions the size of (generally three axles) acceleration, Size and the direction of gravity are can detect that when static, application (such as horizontal/vertical screen switching, related trip available for identification terminal posture Play, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, the terminal can also configure top The other sensors such as spiral shell instrument, barometer, hygrometer, thermometer, infrared ray sensor, will not be repeated here.
It will be understood by those skilled in the art that the restriction of the terminal structure shown in Fig. 1 not structure paired terminal, can be wrapped Include than illustrating more or less parts, either combine some parts or different parts arrangement.
With continued reference to Fig. 1, in Fig. 1 as a kind of computer-readable storage medium memory 1005 can include operating system, Network communication module, Subscriber Interface Module SIM and positional information release process.
In the terminal shown in Fig. 1, network communication module is mainly used in connecting background server, is carried out with background server Data communicate;Subscriber Interface Module SIM is mainly used in controlling each equipment of user interface 1003;And processor 1001 can be used for adjusting With the positional information release process stored in memory 1005, and perform following operate:
The position subscription information of each module in terminal is obtained, and locating rule is set according to the position subscription information;
Positioned according to the locating rule, obtain current location information of terminal;
When receiving the Location Request that a certain business module is sent, to the requested service module for sending the Location Request Issue the current location information.
Further, processor 1001 may call upon the positional information release process stored in memory 1005, perform Operate below:
Positioned in the positioning time, obtain current location information of terminal.
Further, processor 1001 may call upon the positional information release process stored in memory 1005, perform Operate below:
When receiving the Location Request that a certain business module is sent, judge to send the requested service mould of the Location Request Whether the request number of times of block is more than the security request threshold value;
If the request number of times is less than or equal to the security request threshold value, to described in requested service module return Current location information;
If the request number of times is more than the security request threshold value, returned to the requested service module without request permissions Information, and record the requested service module request number and transfinite event.
Further, processor 1001 may call upon the positional information release process stored in memory 1005, perform Operate below:
By being positioned again during the locating periodically, current location information is updated.
Based on above-mentioned hardware configuration, positional information dissemination method embodiment of the present invention is proposed.
Reference picture 2, Fig. 2 are the schematic flow sheet of positional information dissemination method first embodiment of the present invention.
In the present embodiment, the positional information dissemination method comprises the following steps:
Step S10, the position subscription information of each module in terminal is obtained, and set and positioned according to the position subscription information Rule.
At present in the application with position service function, for " Location Request " this logic often by multiple differences Business module call and (many-to-one call relation be present), cause application code confusion and logic it is not rigorous, should Its investigation is complex when there is bug with operation, is unfavorable for project management and product maintenance;And due to multiple business modules all Location Request can be carried out, the unnecessary wasting of resources can be caused.Based on above mentioned problem, the present embodiment proposes a kind of positional information Dissemination method, the positional information dissemination method are based on Publish-subscribe pattern, in the terminal set location information delivery apparatus, lead to Acquisition and issue of the positional information distributing device to positional information is crossed to be managed collectively.Wherein Publish-subscribe pattern is a kind of Message processing facility, it is mainly used between the object with one-to-many call relation (or dependence), its main thought It is to allow multiple subscriber's objects while listening for some subject, this subject (or is being ordered when oneself state changes When reader's object sends message acquisition request), oneself state message can be sent to all subscriber's objects, enable subscriber According to the state of the information updating oneself or perform corresponding operation.When using Publish-subscribe pattern, listener and subscriber Both can be encapsulated in independent object, each of which is changed independently and is multiplexed, you can to realize listener and subscriber two Person's is decoupling, allow coupling both sides all rely on it is abstract, rather than rely on it is specific so that respective change all without Influence the change of another side.In the present embodiment, based on the Message Processing thought of above-mentioned Publish-subscribe pattern, set in the terminal Positional information distributing device is as publisher's object, using the business module for having location requirement as subscriber's object;It will apply complete The positional information of office is managed collectively by the positional information distributing device, by the positional information distributing device (positional information Publisher) positioned, obtain after position data result to be distributed into the business module of location requirement again that (positional information is subscribed to Person);Specific information called side need not be concerned about specific positioning logic or perform positioning action, as long as when needing location data Location Request is sent to positional information distributing device, related location information is returned by positional information distributing device, and position is believed Distributing device is ceased without specific result treatment logic is concerned about, by such mode, is realized positional information issue and is subscribed to The logic decoupling of both sides, code are clear.
Specifically, the terminal in the present embodiment is illustrated using mobile phone, certain terminal can also be PC or put down The terminal devices such as plate computer, E-book reader, MP4.Positional information distributing device is provided with mobile phone, positional information issue Device will obtain the position subscription information of each business module in terminal.Wherein position subscription information refers to whether business module has There are locational requirement, such as the weather condition for weather forecast module, it is necessary to according to corresponding to obtaining current location, therefore weather Forecast module has locational requirement;And SMS module also normal operation and can provide clothes in the case of no current location information Business, therefore SMS module does not have locational requirement.Further, for the business module for having locational requirement, its position is ordered Information also the locational requirement time including business module, frequency etc. are read, such as weather forecast module will obtain at 6 points work as daily Front position information, with weather condition corresponding to being obtained according to current location, then the position subscription information of weather forecast module be Daily 5: 40 timesharing need to get current location information.It can be obtained respectively according to the position subscription information of each business module Demand information of the individual business module for positional information;In demand information of each business module of acquisition for positional information, The demand of each business module will be collected, analyzed and be planned, and locating rule corresponding to setting.Wherein locating rule bag Positioning time is included, for example, the business module a and business module b in terminal in a certain application have location information requirements, is required for There is provided corresponding service according to positional information (has weather module and news push module, weather in such as browser application main interface Module needs according to corresponding to obtaining current location that weather condition is to provide weather service, and news push module needs also exist for root According to current location obtain corresponding to Present News to provide news push service;In another example there is site introduction in Mobile banking's application Module and high-quality merchant module, module is introduced in site to be needed to obtain bank outlets' address information of annex according to current location, and High-quality merchant module is needed according to the high-quality Business Information of current location acquisition annex to carry out consumption recommendation);Positional information is sent out When cloth apparatus obtains business module a and business module b position subscription information, it is thus understood that business module a will obtain position in 8 o'clock sharps Confidence ceases, and business module b will obtain positional information 8: 15;Positional information distributing device is according to business module a and business module B demand, positioning time is arranged to by 8 points.Certainly, locating rule can also include the contents such as locating periodically, positioning method.Its Middle locating periodically is preset duration, one-time positioning is carried out every preset duration, to be updated to positional information;Positioning method bag GPS location, LBS architectures, WiFi positioning, A-GPS positioning, GPS-one positioning are included, positional information distributing device can be according to net Network situation selects suitable positioning method, naturally it is also possible to is selected according to the instruction of user.Wherein A-GPS is positioned basic Thought be by set on the preferable position of satellite signal receiving effect it is some refer to GPS, and serviced using AGPS Device passes through the coarse position, the ephemeris and clock that then need the terminal by mobile network etc. for interacting acquisition terminal with terminal Assistance data is sent to terminal, and gps position measurement is carried out by terminal.Measurement terminate after, terminal can voluntarily calculation position result or Measurement result is sent back to AGPS server by person, and server is calculated and result is sent back into terminal;GPS-One is U.S.'s height The location technology based on CDMA standards of logical company's exploitation, its basic thought are to support GPS- by being loaded on terminal chip The module of One agreements, mixed positioning is carried out with reference to gps satellite signal and cdma network signal.
Step S20, positioned according to the locating rule, obtain the current location information of terminal.
In the present embodiment, when meeting locating rule, positional information distributing device carries out the locating module of calling mobile phone Positioning, obtain the current positional information of terminal.Specifically, locating rule includes positioning time, for example, when being positioned in locating rule Between be 8 points, then positional information distributing device will be positioned at 8 points.Certain positioning time can be multiple time points, such as Positioning time in one day is 8 points, 12 points, 17 points and 24: 4 time points, by setting multiple time points, ensures position letter Breath upgrades in time, so as to ensure that related service module can normally provide corresponding location-based service.
Further, when getting current location information of terminal, positional information distributing device will enter to the positional information Row encryption, the positional information is prevented to be stolen by others caused privacy of user leakage.
Step S30, when receiving the Location Request that a certain business module is sent, to the request for sending the Location Request Business module issues the current location information.
In the present embodiment, when some business module of application needs to obtain positional information, it will issue and fill to positional information Transmission Location Request is put, now the business module can be described as requested service module.Positional information distributing device receive this please , can be to the requested service module releasing position information during Location Request for asking business module to send.The requested service module is by root Corresponding service is provided a user according to the positional information.Wherein, can be to if positional information distributing device has carried out multiple bearing The requested service module returns to newest positional information, ensures the accuracy of positional information.
Further, the information issuing time can also be included in locating rule, positional information distributing device is except according to industry The Location Request releasing position information for module of being engaged in, it can also be and believed according to the information issuing time from trend business module releasing position Breath.For example, business module c weather forecast modules, positional information distributing device is obtaining business module c position subscription information When, configuration information issuing time is 8 points, then daily 8 days positional information distributing devices all can be from trend business module c releasing positions Information, Location Request is sent without waiting for business module c, has saved system resource.And taking according to the information issuing time certainly During the mode of trend business module releasing position information, each business module can also have the different information issuing times.
Further, the positional information dissemination method in the present embodiment, it is by a positional information distributing device management The object of management, can also be extended by the Location Request of different business module and positional information issue in one application, by One positional information distributing device manages the Location Request of different application and positional information issue in whole terminal, so as to application Positioning function is managed collectively, and has saved system resource.
In the present embodiment, subscribed to by obtaining the position subscription information of each business module in terminal, and according to the position Information sets locating rule;Positioned according to the locating rule, obtain the current location information of terminal;Receiving certain During the Location Request that one business module is sent, the current location information is issued to the requested service module for sending Location Request. Publish-subscribe pattern is based on by the positional information dissemination method with upper type, the present embodiment, by the Location Request of the overall situation and position Confidence breath is managed by positional information distributing device, and positional information distributing device obtains position according to the demand of each business module Confidence ceases, and obtains that result is distributed into related service module after positional information;Business module need not be concerned about specific positioning logic Or positioning action is performed, as long as positioning application is sent to positional information distributing device when needing positional information, by positional information The related positional information of distributing device issue, and positional information distributing device leads to without specific result treatment logic is concerned about Such mode is crossed, positional information issue is realized and subscribes to the logic decoupling of both sides, its code is clear, beneficial to staff to whole Individual project is managed and safeguarded;Positioning action is uniformly carried out by positional information distributing device simultaneously, avoids disparate modules multiple Resource caused by positioning (such as Installed System Memory, electricity, flow) wastes, and improves the experience of user.
Reference picture 3, Fig. 3 be described in Fig. 2 when receiving the Location Request that a certain business module is sent, it is described fixed to sending The requested service module of position request issues the refinement schematic flow sheet of the current location information.
Based on above-mentioned embodiment illustrated in fig. 2, step S30 includes:
Step S31, when receiving the Location Request that a certain business module is sent, judge to send asking for the Location Request Ask whether the request number of times of business module is more than the security request threshold value.
In the present embodiment, when some business module of application needs to obtain positional information, it will issue and fill to positional information Transmission Location Request is put, now the business module can be described as requested service module.Positional information distributing device receive this please During the Location Request for asking business module to send, it can judge whether the requested service module has positioning power according to the Location Request Limit.Specifically, locating rule includes security request threshold value, in certain time period, only sent out in the requested service module When sending the number of Location Request to be no more than security request threshold value, positional information distributing device can just be issued to the requested service module Positional information, avoid same business module that resource occupation and waste caused by request is repeated several times.
Step S32, if the request number of times is less than or equal to the security request threshold value, to the requested service module Issue the current location information.
In the present embodiment, if the number that requested service module is transmitted Location Request is less than or equal to security request threshold Value, then positional information distributing device is to the requested service module releasing position information.
Further, if the number that requested service module is transmitted Location Request is more than security request threshold value, position Information delivery apparatus thinks that the Location Request of the requested service module is unsatisfactory for location condition, and is returned to the requested service module Without request permissions information, not to the requested service module releasing position information.
Further, locating rule can also include privacy position set, positional information release module get work as During the information of front position, if current location belongs to privacy position, the positional information will not be announced, user's is hidden so as to protect It is private.
Reference picture 4, Fig. 4 are the schematic flow sheet of positional information dissemination method second embodiment of the present invention.
Based on above-mentioned embodiment illustrated in fig. 2, after step S20, in addition to:
Step S40, by being positioned again during the locating periodically, update current location information.
In the present embodiment, locating rule also includes locating periodically, and the positioning of positional information distributing device is periodically to carry out , positional information distributing device can all carry out one-time positioning at regular intervals, ensure upgrading in time for positional information, so as to protect Corresponding location-based service can be provided according to accurate positional information by demonstrate,proving related service module.
The present invention also provides a kind of positional information distributing device.
With continued reference to Fig. 2, the positional information distributing device includes processor, memory and is stored on the memory And the positional information release process that can be run on the processor, wherein the positional information release process is by the processor Following steps are realized during execution:
Step S10, the position subscription information of each business module in rotating is obtained, and set according to the position subscription information Locating rule.
In the present embodiment, it is contemplated that at present in the application with position service function, for " Location Request ", this is patrolled Collect and often called by multiple different business modules, cause the code confusion of application and logic not rigorous, run in application Its investigation is complex during appearance bug, is unfavorable for project management and product maintenance;And because multiple business modules can enter Row Location Request, the unnecessary wasting of resources can be caused.Based on above mentioned problem, the present embodiment proposes a kind of positional information publisher Method, the positional information dissemination method are based on Publish-subscribe pattern, and the global positional information of application is sent out by a positional information Cloth apparatus is managed, and is positioned by the positional information distributing device, obtains that result is distributed into relevant bits after position data Confidence ceases subscriber;Information called side need not be concerned about specific positioning logic or perform positioning action, as long as needing to position number According to when to positional information distributing device send Location Request, return to related location information by positional information distributing device, and position Information delivery apparatus is put without specific result treatment logic is concerned about, by such mode, information issue is realized and subscribes to The logic decoupling of both sides, code are clear.
Specifically, the terminal in the present embodiment is illustrated using mobile phone, certain terminal can also be PC or put down The terminal devices such as plate computer, E-book reader, MP4.Positional information distributing device is provided with mobile phone, positional information issue Device will obtain the position subscription information of each business module in terminal, be obtained according to the position subscription information of each business module Demand information of each business module for positional information;Obtaining demand information of each business module for positional information When, the demand of each business module will be collected, analyzed and be planned, and locating rule corresponding to setting.Wherein positioning rule Then include positioning time, for example, the business module a and business module b in terminal in a certain application have location information requirements, need Corresponding service to be provided according to positional information;Order the position that positional information distributing device obtains business module a and business module b When readding information, it is thus understood that business module a will obtain positional information in 8 o'clock sharps, and business module b will obtain positional information 8: 15; Positional information distributing device is arranged to positioning time according to business module a and business module b demand by 8 points.Certainly, position Rule can also include the contents such as locating periodically, positioning method.Wherein locating periodically is to carry out one-time positioning at regular intervals, To be updated to positional information;Positioning method includes GPS location, LBS architectures, WiFi positioning, A-GPS positioning, GPS- One is positioned, and positional information distributing device can select suitable positioning method according to network condition, naturally it is also possible to according to user's Instruction is selected.
Step S20, positioned according to the locating rule, obtain the current location information of terminal.
In the present embodiment, when meeting the location condition of locating rule, positional information distributing device is determined calling mobile phone Position module is positioned, and obtains the current positional information of terminal.Specifically, locating rule includes positioning time, for example, positioning rule Then middle positioning time is 8 points, then positional information distributing device will be positioned at 8 points.When certain positioning time can be multiple Between point, such as positioning time in one day is 8 points, 12 points, 17 points, 24: 4 time points, by setting multiple time points, Ensure upgrading in time for positional information, so as to ensure that related service module can normally provide corresponding location-based service.
Further, when getting current location information, positional information distributing device will add to the positional information It is close, prevent the positional information to be stolen by others caused privacy of user leakage.
Step S30, when receiving the Location Request that a certain business module is sent, to the request for sending the Location Request Business module issues the current location information.
In the present embodiment, when some business module of application needs to obtain positional information, it will issue and fill to positional information Transmission Location Request is put, now the business module can be described as requested service module.Positional information distributing device receive this please , can be to the requested service module releasing position information, for the requested service module root during Location Request for asking business module to send Corresponding service is provided a user according to the positional information.Wherein, can be to if positional information distributing device has carried out multiple bearing The requested service module returns to newest positional information, ensures the accuracy of positional information.
Further, the information issuing time can also be included in locating rule, positional information distributing device is except according to industry The Location Request releasing position information for module of being engaged in, it can also be and believed according to the information issuing time from trend business module releasing position Breath.For example, business module c weather forecast modules, positional information distributing device is obtaining business module c position subscription information When, configuration information issuing time is 8 points, then daily 8 days positional information distributing devices all can be from trend business module c releasing positions Information, Location Request is sent without waiting for business module c, has saved system resource.And taking according to the information issuing time certainly During the mode of trend business module releasing position information, each business module can also have the different information issuing times.
Further, the information issuing method in the present embodiment, it is to manage one by a positional information distributing device The object of management, can also be extended, by one by the Location Request of different business module and positional information issue in Positional information distributing device manages the Location Request of different application and positional information issue in whole terminal, so as to be positioned to application Function is managed collectively, and has saved system resource.
In the present embodiment, subscribed to by obtaining the position subscription information of each business module in terminal, and according to the position Information sets locating rule;Positioned according to the locating rule, obtain the current location information of terminal;Receiving certain During the Location Request that one business module is sent, the current location information is issued to the requested service module for sending Location Request. Publish-subscribe pattern is based on by the positional information dissemination method with upper type, the present embodiment, by the Location Request of the overall situation and position Confidence breath is managed by positional information distributing device, and positional information distributing device obtains position according to the demand of each business module Confidence ceases, and obtains that result is distributed into related service module after positional information;Business module need not be concerned about specific positioning logic Or positioning action is performed, as long as positioning application is sent to positional information distributing device when needing positional information, by positional information The related positional information of distributing device issue, and positional information distributing device leads to without specific result treatment logic is concerned about Such mode is crossed, positional information issue is realized and subscribes to the logic decoupling of both sides, its code is clear, beneficial to staff to whole Individual project is managed and safeguarded;Positioning action is uniformly carried out by positional information distributing device simultaneously, avoids disparate modules multiple Resource caused by positioning (such as Installed System Memory, electricity, flow) wastes, and improves the experience of user.
With continued reference to Fig. 3, based on above-mentioned embodiment illustrated in fig. 2, the positional information release process is held by the processor During row, following steps are also realized:
Step S31, when receiving the Location Request that a certain module is sent, judge to send the request industry of the Location Request Whether the request number of times of business module is more than the security request threshold value.
In the present embodiment, when some business module of application needs to obtain positional information, it will issue and fill to positional information Transmission Location Request is put, now the business module can be described as requested service module.Positional information distributing device receive this please During the Location Request for asking business module to send, it can judge whether the requested service module has positioning power according to the Location Request Limit.Specifically, locating rule includes security request threshold value, in certain time period, only sent out in the requested service module When sending the number of Location Request to be no more than security request threshold value, positional information distributing device can just be issued to the requested service module Positional information, avoid same business module that resource occupation and waste caused by request is repeated several times.
Step S32, if the request number of times is less than or equal to the security request threshold value, to the requested service module Issue the current location information.
In the present embodiment, if the number that requested service module is transmitted Location Request is less than or equal to security request threshold Value, then positional information distributing device is to the requested service module releasing position information.
Further, if the number that requested service module is transmitted Location Request is more than security request threshold value, position Information delivery apparatus thinks that the Location Request of the requested service module is unsatisfactory for location condition, and is returned to the requested service module Without request permissions information, not to the requested service module releasing position information.
Further, locating rule can also include privacy position set, positional information release module get work as During the information of front position, if current location belongs to privacy position, the positional information will not be announced, user's is hidden so as to protect It is private.
With continued reference to Fig. 4, based on above-mentioned embodiment illustrated in fig. 2, the positional information release process is held by the processor During row, following steps are also realized:
Step S40, by being positioned again during the locating periodically, update current location information.
In the present embodiment, locating rule also includes locating periodically, and the positioning of positional information distributing device is periodically to carry out , positional information distributing device can all carry out one-time positioning at regular intervals, ensure upgrading in time for positional information, so as to protect Corresponding location-based service can be provided according to accurate positional information by demonstrate,proving related service module.
The present invention also provides a kind of computer-readable recording medium.
Positional information release process, the positional information release process are stored with computer-readable recording medium of the present invention Realized when being executed by processor such as the step of above-mentioned positional information dissemination method.
Wherein, realize that the embodiment of step can refer to position of the present invention when positional information release process is executed by processor Each embodiment of information issuing method, positional information distributing device, here is omitted.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or system institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or system.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, Computer, server, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of positional information dissemination method, it is characterised in that the positional information dissemination method comprises the following steps:
The position subscription information of each business module in terminal is obtained, and locating rule is set according to the position subscription information;
Positioned according to the locating rule, obtain the current location information of terminal;
When receiving the Location Request that a certain business module is sent, issued to the requested service module for sending the Location Request The current location information.
2. positional information dissemination method as claimed in claim 1, it is characterised in that the locating rule includes positioning time, Described to be positioned according to the locating rule, the step of obtaining the current location information of terminal, includes:
Positioned in the positioning time, obtain the current location information of terminal.
3. positional information dissemination method as claimed in claim 1, it is characterised in that the locating rule includes security request threshold Value, it is described when receiving the Location Request that a certain business module is sent, to the requested service module for sending the Location Request The step of issuing the current location information includes:
When receiving the Location Request that a certain business module is sent, judge to send the requested service module of the Location Request Whether request number of times is more than the security request threshold value;
It is described current to requested service module issue if the request number of times is less than or equal to the security request threshold value Positional information.
4. positional information dissemination method as claimed in claim 3, it is characterised in that described to receive a certain business module hair During the Location Request sent, judge whether the request number of times for sending the requested service module of the Location Request is more than the safety and asks After the step of seeking threshold value, in addition to:
If the request number of times is more than the security request threshold value, returns to the requested service module and believe without request permissions Breath, and record the requested service module request number and transfinite event.
5. the positional information dissemination method as any one of Claims 1-4, it is characterised in that the locating rule is also It is described to be positioned according to the locating rule including locating periodically, after the step of obtaining the current location information of terminal, Also include:
By being positioned again during the locating periodically, current location information is updated.
A kind of 6. positional information distributing device, it is characterised in that the positional information distributing device include processor, memory and The positional information release process that can be run on the memory and on the processor is stored in, wherein the positional information is sent out Following steps are realized when cloth program is by the computing device:
The position subscription information of each business module in terminal is obtained, and locating rule is set according to the position subscription information;
Positioned according to the locating rule, obtain the current location information of terminal;
When receiving the Location Request that a certain business module is sent, issued to the requested service module for sending the Location Request The current location information.
7. positional information distributing device as claimed in claim 6, it is characterised in that the locating rule includes positioning time, When the positional information release process is by the computing device, following steps are also realized:
Positioned in the positioning time, obtain the current location information of terminal.
8. positional information distributing device as claimed in claim 6, it is characterised in that the locating rule includes security request threshold Value, when the positional information release process is by the computing device, also realizes following steps:
When receiving the Location Request that a certain business module is sent, judge to send the requested service module of the Location Request Whether request number of times is more than the security request threshold value;
If the request number of times is less than or equal to the security request threshold value, to the requested service mould for sending the Location Request Block issues the current location information;
If the request number of times is more than the security request threshold value, returns to the requested service module and believe without request permissions Breath, and record the requested service module request number and transfinite event.
9. the positional information distributing device as any one of claim 6 to 8, it is characterised in that the locating rule is also Including locating periodically, when the positional information release process is by the computing device, following steps are also realized:
By being positioned again during the locating periodically, current location information is updated.
10. a kind of computer-readable recording medium, it is characterised in that position letter is stored with the computer-readable recording medium Release process is ceased, is realized when the positional information release process is executed by processor as any one of claim 1 to 5 The step of positional information dissemination method.
CN201710497108.XA 2017-06-26 2017-06-26 Positional information dissemination method, device and computer-readable recording medium Pending CN107864450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710497108.XA CN107864450A (en) 2017-06-26 2017-06-26 Positional information dissemination method, device and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710497108.XA CN107864450A (en) 2017-06-26 2017-06-26 Positional information dissemination method, device and computer-readable recording medium

Publications (1)

Publication Number Publication Date
CN107864450A true CN107864450A (en) 2018-03-30

Family

ID=61699159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710497108.XA Pending CN107864450A (en) 2017-06-26 2017-06-26 Positional information dissemination method, device and computer-readable recording medium

Country Status (1)

Country Link
CN (1) CN107864450A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111107497A (en) * 2019-12-30 2020-05-05 红山信息科技研究院(杭州)有限公司 Base station fingerprint database data source supplementing method and device, server and storage medium
CN116033333A (en) * 2022-08-31 2023-04-28 荣耀终端有限公司 Method for determining position information, electronic device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316442A (en) * 2008-07-04 2008-12-03 深圳市戴文科技有限公司 Mobile terminal, method and system for locating service
US20160066135A1 (en) * 2014-09-02 2016-03-03 Baidu Online Network Technology (Beijing) Co., Ltd Service processing method and apparatus based on location information

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316442A (en) * 2008-07-04 2008-12-03 深圳市戴文科技有限公司 Mobile terminal, method and system for locating service
US20160066135A1 (en) * 2014-09-02 2016-03-03 Baidu Online Network Technology (Beijing) Co., Ltd Service processing method and apparatus based on location information

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111107497A (en) * 2019-12-30 2020-05-05 红山信息科技研究院(杭州)有限公司 Base station fingerprint database data source supplementing method and device, server and storage medium
CN116033333A (en) * 2022-08-31 2023-04-28 荣耀终端有限公司 Method for determining position information, electronic device and readable storage medium
CN116033333B (en) * 2022-08-31 2023-10-17 荣耀终端有限公司 Method for determining position information, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
US10088599B2 (en) Systems and methods for weather forecasting
US9816833B2 (en) Method and apparatus for providing location based service
KR20170018704A (en) Method for managing geo-fence and electronic device thereof
KR102439746B1 (en) Apparatus and method for location determining of electronic device
CN105900051A (en) Electronic device and method for displaying event in virtual reality mode
CN113365106B (en) Multimedia resource generation method and device, electronic equipment and storage medium
KR20170122580A (en) Electronic eevice for compositing graphic data and method thereof
CN103699369A (en) Message display method and device for mobile terminal
KR102290755B1 (en) Method and apparatus for providing information based on proximity
CN109145183A (en) Push the method and device of information to be presented
CN106453481A (en) Electronic device and method for providing service in the electronic device
CN102752711A (en) Methods, system and apparatus for sharing and using location information in portable terminal
CN107005807A (en) Control method and its electronic installation
US11579744B2 (en) Systems and methods for seat selection in virtual reality
CN107018491B (en) Method and device for processing position data
KR102304260B1 (en) Method for determining location, electronic apparatus and storage medium
CN108834040A (en) A kind of attendance information based reminding method and its equipment
CN105847068A (en) Map marking method and terminal
KR20150099236A (en) Apparatus and method for providing push service based on location
CN112052096B (en) Resource processing method, device, server and terminal
CN105408922A (en) Process flow infrastructure and configuration interface
KR20170054680A (en) Method and electronic device for establishing communication connection between electronic devices
US10433105B2 (en) Geographically-driven group communications
CN107864450A (en) Positional information dissemination method, device and computer-readable recording medium
CN107305661A (en) Apparatus and method for performing secure log service

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180330

RJ01 Rejection of invention patent application after publication