WO2017092039A1 - Method, apparatus and equipment for providing and obtaining location information - Google Patents

Method, apparatus and equipment for providing and obtaining location information Download PDF

Info

Publication number
WO2017092039A1
WO2017092039A1 PCT/CN2015/096444 CN2015096444W WO2017092039A1 WO 2017092039 A1 WO2017092039 A1 WO 2017092039A1 CN 2015096444 W CN2015096444 W CN 2015096444W WO 2017092039 A1 WO2017092039 A1 WO 2017092039A1
Authority
WO
WIPO (PCT)
Prior art keywords
positioning
terminal
request
photographing
module
Prior art date
Application number
PCT/CN2015/096444
Other languages
French (fr)
Chinese (zh)
Inventor
杨帆
卢恒惠
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2015/096444 priority Critical patent/WO2017092039A1/en
Publication of WO2017092039A1 publication Critical patent/WO2017092039A1/en

Links

Images

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present invention relates to the field of intelligent terminals, and in particular, to a method, device and device for providing and acquiring location information.
  • Adding a location tag to a photo is very important to the user. For example, the user can sort the photo based on the location tag of the photo, or share the photo based on the location tag, or, based on the location tag of the photo, Maps are combined to build travel trails and more.
  • the camera terminal can only connect with the positioning terminal carried by the user, and uses the positioning function of the positioning terminal to obtain the location information when the photo is taken.
  • the photographing terminal performs the photographing operation normally, wherein the photographing terminal records the photographing time when photographing, and the mobile terminal is always turned on. Positioning function, and recording the time of the interval point and the position information corresponding to the time of the interval point according to the set time interval. Finally, comparing the time when the photographing terminal takes the photo with the time of the interval recorded by the mobile terminal to obtain The position information corresponding to the time of the closest interval when the photographing terminal takes the photograph, and the position label is added to the photographed photograph according to the position information corresponding to the time of the closest interval point.
  • the positioning terminal must always be positioned, resulting in the consumption of the positioning terminal. More electricity.
  • the technical problem to be solved by the present application is to provide a method, device and device for providing and acquiring location information, which can reduce the consumption of power of the positioning terminal.
  • a first aspect a method for providing location information, including the following steps: a positioning terminal establishes a connection with a camera terminal, wherein a distance between the positioning terminal and the camera terminal does not exceed a preset threshold; The positioning terminal receives the positioning request sent by the photographing terminal through the connection, wherein the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing; the positioning terminal determines at least the following a: the time difference between the positioning terminal and the last positioning request is greater than a time threshold; and the displacement of the positioning terminal in the time period when the positioning terminal receives the positioning request and the last positioning request Whether it is greater than the displacement threshold; determining whether to perform positioning according to the result of the judgment; acquiring the current location information only when determining to perform positioning, and transmitting the current location information to the photographing terminal through the connection, and the positioning request Some or all of the information included.
  • the positioning terminal receives the positioning request sent by the photographing terminal, and the positioning terminal receives the positioning request sent by the photographing terminal, and the photographing terminal performs the photographing of the photographing terminal.
  • the positioning terminal and/or the photographing terminal determine that the positioning is really needed, the positioning terminal obtains the current location information by positioning, thereby effectively reducing the power consumption of the positioning terminal.
  • the method before the acquiring, by the positioning terminal, the current location information, the method further includes: determining whether the remaining power of the positioning terminal is greater than a power threshold; If the remaining power is greater than the power threshold, the positioning mode is determined according to the first scanning priority; if the remaining power of the positioning terminal is less than the power threshold, the positioning mode is determined according to the second scanning priority, where the first scanning priority is different. The second scan priority.
  • the first possible implementation manner of the first aspect is capable of determining the first scan priority or the second scan priority according to the remaining power amount, so that the selected positioning mode is more suitable for the current state of the remaining power.
  • the method before the acquiring, by the positioning terminal, the current location information, the method further includes: determining whether the current environment of the positioning terminal is indoors or outdoors; The current environment is indoor, using wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, At least one of a broadcast signal positioning mode, an optical positioning mode, and a computer vision positioning mode acquires current location information; if the current environment of the positioning terminal is outdoor, the global navigation satellite system GNSS positioning mode is used to acquire current location information.
  • wireless fidelity Wi-Fi positioning mode Bluetooth positioning mode
  • cellular positioning mode geomagnetic positioning mode
  • ultrasonic positioning mode infrared positioning mode
  • radio frequency tag positioning mode radio frequency tag positioning mode
  • Zigbee positioning mode ultra-wideband radio positioning mode
  • At least one of a broadcast signal positioning mode, an optical positioning mode, and a computer vision positioning mode acquire
  • the second possible implementation manner of the first aspect can select an appropriate current positioning manner according to whether the current environment is indoors or outdoors, and avoid unsuccessful positioning due to environmental influences, thereby improving positioning reliability.
  • the positioning terminal determines at least one of the following Whether the time difference between the positioning request and the last positioning request is greater than a time threshold; whether the displacement of the positioning terminal is within a time period during which the positioning terminal receives the positioning request and the last positioning request And determining, by the positioning terminal, whether the positioning is performed according to the result of the determining is: the positioning terminal determines whether the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request is greater than a time threshold; if the positioning terminal receives the If the time difference between the positioning request and the last positioning request is greater than the time threshold, determining whether the displacement of the positioning terminal is greater than the displacement threshold in the time period between the positioning request and the receiving the previous positioning request; If the displacement of the positioning terminal is greater than the displacement threshold, it is determined to perform positioning.
  • the third possible implementation manner of the first aspect is to determine the positioning terminal that is easier to judge by first judging Whether the time difference between the location request and the previous location request is greater than a time threshold, and then determining whether the displacement of the positioning terminal is greater than a displacement threshold during the time period in which the positioning terminal receives the positioning request and the last positioning request, if the positioning terminal receives the positioning request and If the time difference of the last positioning request is greater than the time threshold, it is not necessary to determine whether the displacement of the positioning terminal is greater than the displacement threshold during the time period in which the positioning terminal receives the positioning request and the last positioning request, thereby reducing the complexity of the judgment.
  • the method further includes: if the positioning terminal receives the positioning request and receives a time difference of a previous positioning request If the time threshold is less than or equal to the time threshold, it is determined that the positioning is not performed; or if the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request is greater than a time threshold, and the positioning terminal receives the positioning request and receiving If the displacement of the positioning terminal is less than or equal to the displacement threshold during the time period between the positioning requests, it is determined that the positioning is not performed.
  • the method further includes: if it is determined not to perform the positioning Sending, to the photographing terminal, a notification that no positioning is performed, and at least one of an identification of a photo in the positioning request or a time of photographing; or sending the last position information to the photographing terminal, and the positioning At least one of the identification of the photo in the request or the time of photographing.
  • the method before the positioning terminal acquires the current location information, includes: enabling the positioning module; after acquiring the current location information, the positioning terminal includes: closing the positioning module.
  • the positioning module can be enabled before the positioning terminal acquires the current location information, and the positioning module is closed after the positioning terminal acquires the current location information, which can effectively reduce the power consumption of the positioning terminal.
  • the positioning terminal acquires a current location information After the information, the method further includes: sending the location information to the third server, and part or all of the information included in the positioning request, for some or all information included by the third server according to the positioning request, and the photographing The terminal has taken the information of the photo, matches the location information with the photographed photo, and adds a location tag to the corresponding photo according to the location information.
  • the second aspect provides a method for obtaining location information, where the method includes: establishing a connection between the camera terminal and the positioning terminal, the positioning terminal is not more than a preset distance from the camera terminal; and determining whether a positioning request needs to be sent;
  • the photographing terminal sends a positioning request to the positioning terminal through the connection, the positioning request includes at least one of an identifier of a photo and a photographing time of a photo, if the photographing terminal receives And the location information returned by the positioning terminal according to the positioning request, and part or all of the information included in the positioning request, according to part or all of the information included in the positioning request, and information that the photographing terminal has taken a photo, Matching the location information with the photographed photo; adding a location tag to the corresponding photo based on the location information.
  • the camera terminal only sends a positioning request to the positioning terminal when it is determined that the positioning request needs to be sent to the positioning terminal, thereby reducing the workload of the communication module of the camera terminal and reducing the workload. Loss of power of the camera terminal. Moreover, the communication module of the positioning terminal also reduces the workload and reduces the loss of the power of the positioning terminal.
  • determining whether the location request needs to be sent includes: determining, by the photographing terminal, whether the time difference between the photographing terminal and the last shooting is greater than a time threshold. If the time difference between the photographing terminal and the last shooting is greater than the time threshold, it is determined that the positioning request needs to be sent. If the time difference between the photographing terminal and the last shooting is less than or equal to the time threshold, it is determined.
  • the photographing terminal does not need to send a positioning request; or the photographing terminal determines whether the displacement of the photographing terminal is greater than a displacement threshold in a time period during which the photographing terminal performs the photographing and the last photographing, if the displacement of the photographing terminal The quantity is greater than the displacement threshold, and it is determined that the positioning request needs to be sent. If the displacement of the photographing terminal is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
  • the method further includes: if receiving the notification that the positioning terminal does not perform positioning, acquiring Before the positioning request is sent, the last saved location information, according to the identifier of the photo returned by the positioning terminal and/or the shooting time of the photo, and the information that the photo terminal has taken the photo, the last saved location The information matches the photographed photograph; the location label is added to the corresponding photo based on the last saved location information.
  • a third aspect provides an apparatus for providing location information, including: a connection establishment module, a receiving module, a first determining module, a determining module, and an obtaining sending module, where the connection establishing module is configured to establish a connection with the photographing terminal.
  • the receiving module is configured to receive a positioning request that is sent by the camera terminal by using the connection, where the positioning request includes the location request, where the distance between the positioning terminal and the camera terminal does not exceed a preset threshold.
  • the first judging module is configured to determine at least one of the following: whether the time difference between the receiving module and the last positioning request is greater than a time threshold
  • the determining module is configured to determine whether to perform positioning according to the result of the determining, in the time period when the receiving module receives the positioning request and the last positioning request, whether the displacement amount of the positioning terminal is greater than a displacement threshold
  • the acquisition sending module is configured to obtain current location information only when determining to perform positioning, and Through the transmitting terminal connected to the photographing information of the current location, the location request and information included in some or all.
  • the positioning terminal receives the positioning request sent by the photographing terminal, and the positioning terminal receives the positioning request sent by the photographing terminal, and the photographing terminal performs the photographing of the photographing terminal.
  • the positioning terminal and/or the photographing terminal determine that it is really necessary to perform positioning, the positioning terminal obtains the current position information by positioning, thereby effectively reducing the setting.
  • the power consumption of the bit terminal is a simple reducing the setting.
  • the device further includes a second determining module and a priority determining module, where the second determining module is configured to determine whether the remaining power of the positioning terminal is When the remaining power of the positioning terminal is greater than the power threshold, the priority determining module is configured to determine the positioning mode according to the first scanning priority; when the remaining power of the positioning terminal is less than the power threshold, press the first The second scan priority determines a positioning mode, wherein the first scan priority is different from the second scan priority.
  • the first possible implementation manner of the third aspect is capable of determining the first scan priority or the second scan priority according to the remaining power amount, so that the selected positioning mode is more suitable for the current state of the remaining power.
  • the device further includes a third determining module, where the third determining module is configured to determine whether the current environment of the positioning terminal is indoor or outdoor;
  • the obtaining and sending module is configured to use a wireless fidelity Wi-Fi positioning mode, a Bluetooth positioning mode, a cellular positioning mode, a geomagnetic positioning mode, an ultrasonic positioning mode, an infrared positioning mode, and a radio frequency tag when the current environment of the positioning terminal is indoors.
  • At least one of positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode, optical positioning mode, and computer vision positioning mode acquires current location information; when the current environment of the positioning terminal is outdoor, the current location is adopted
  • the GNSS positioning method of the global navigation satellite system acquires current location information.
  • the second possible implementation manner of the third aspect can select an appropriate current positioning manner according to whether the current environment is indoor or outdoor, and avoid unsuccessful positioning due to the influence of the environment, thereby improving the reliability of the positioning.
  • the first determining module is used Determining whether the time difference between the receiving module receiving the positioning request and receiving the last positioning request is If the time difference between the receiving module receiving the positioning request and receiving the last positioning request is greater than a time threshold, determining that the receiving module receives the positioning request and receiving the last positioning request, the time period is greater than a time threshold. Whether the displacement of the positioning terminal is greater than a displacement threshold; the determining module is configured to determine to perform positioning when the displacement of the positioning terminal is greater than a displacement threshold.
  • the third possible implementation manner of the third aspect after determining whether the time difference between the positioning request and the last positioning request by the positioning terminal that is relatively easy to determine is greater than a time threshold, and then determining that the positioning terminal receives the positioning request and the last positioning request.
  • a time threshold determines whether the displacement of the positioning terminal is greater than the displacement threshold.
  • the determining module is configured to: when the positioning terminal receives the positioning request and receives a time difference of a previous positioning request When the time threshold is less than or equal to the time threshold, it is determined that the positioning is not performed; or, the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request is greater than a time threshold, and the positioning terminal receives the positioning request and receiving When the displacement of the positioning terminal is less than or equal to the displacement threshold during the time period between the positioning requests, it is determined that the positioning is not performed.
  • the acquiring and transmitting module is configured to determine not to perform During positioning, at least one of a notification of not performing positioning and a photo of the photo in the positioning request or a time of photographing is sent to the photographing terminal; or the positioning request of the last position information is sent to the photographing terminal. At least one of the identification of the photo in the photo or the time of photographing.
  • the device further includes an opening module and a closing module,
  • the opening module is configured to open the positioning module;
  • the closing module is configured to close the positioning module Piece.
  • the acquiring the sending module is used to the third server Sending the location information, and part or all of the information included in the positioning request, for the third server to include part or all of the information according to the positioning request, and information that the photographing terminal has taken a photo,
  • the location information matches the captured photo, and a location tag is added to the corresponding photo based on the location information.
  • the fourth aspect provides an apparatus for acquiring location information, including: a connection module, a determining module, a sending module, a receiving module, a matching module, and an adding module, where the connecting module is configured to establish a connection with the positioning terminal, where the positioning terminal.
  • the determining module is configured to determine whether a positioning request needs to be sent
  • the sending module is configured to send, by using the connection, the positioning terminal, when the location request needs to be sent.
  • the positioning request includes at least one of an identifier of a photo and a photographing time of a photo;
  • the receiving module is configured to receive location information returned by the positioning terminal according to the positioning request, and a part included in the positioning request Or all the information;
  • the matching module is configured to match the location information with the photographed photo according to part or all of the information included in the positioning request, and information that the photographing terminal has taken a photo;
  • the adding The module is configured to add a location tag to the corresponding photo according to the location information.
  • the camera terminal only sends a positioning request to the positioning terminal when it is determined that the positioning request needs to be sent to the positioning terminal, thereby reducing the workload of the communication module of the camera terminal and reducing the workload. Loss of power of the camera terminal. Moreover, the communication module of the positioning terminal also reduces the workload and reduces the loss of the power of the positioning terminal.
  • the determining module is configured to determine whether a time difference between the photographing terminal and the last shooting is greater than a time threshold, where the photographing terminal is The time difference between this shooting and the last shooting is greater than the time threshold Determining that a positioning request needs to be sent, and determining that the positioning request does not need to be sent when the time difference between the current shooting and the last shooting is less than or equal to the time threshold; or the determining module is configured to determine Whether the displacement of the photographing terminal is greater than the displacement threshold during the time period when the photographing terminal performs the photographing and the last photographing, and when the displacement of the photographing terminal is greater than the displacement threshold, it is determined that the positioning request needs to be sent, and the displacement of the photographing terminal When the amount is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
  • the device further includes an acquiring module, where the acquiring module is configured to receive the positioning When the terminal does not perform the notification of the positioning, obtain the last saved location information before sending the positioning request; the matching module is configured to return the photo of the photo and the photo shooting time according to the positioning terminal, and the photo taking The terminal has taken the information of the photo, and matches the last saved location information with the captured photo; the adding module is configured to add a location tag to the corresponding photo according to the last saved location information.
  • a fifth aspect provides a positioning terminal, including a processor, a communication module, and a positioning module; the positioning module is configured to acquire current location information; and the communication module is configured to communicate with the camera terminal; a processor, configured to instruct the communication module to establish a connection with the photographing terminal, and receive a positioning request sent by the photographing terminal through the connection, wherein a distance between the positioning terminal and the photographing terminal is not Exceeding a preset threshold, the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing, and the processor is further configured to determine at least one of the following according to the positioning request: the communication module receives Whether the time difference between the positioning request and the last positioning request is greater than a time threshold; whether the displacement of the positioning terminal is greater than a displacement threshold during a period in which the communication module receives the positioning request and the last positioning request, according to the judgment The result of determining whether to perform positioning, and only when determining to perform positioning, instructing the positioning module to acquire The location
  • the positioning terminal receives the positioning request sent by the photographing terminal, and the positioning terminal receives the positioning request sent by the photographing terminal, and the photographing terminal performs the photographing of the photographing terminal.
  • the positioning terminal and/or the photographing terminal determine that the positioning is really needed, the positioning terminal obtains the current location information by positioning, thereby effectively reducing the power consumption of the positioning terminal.
  • the processor is further configured to determine whether the remaining power of the positioning terminal is greater than a power threshold, if the remaining power of the positioning terminal is greater than a power threshold Determining the positioning mode according to the first scanning priority; determining the positioning mode according to the second scanning priority when the remaining power of the positioning terminal is less than the power threshold, wherein the first scanning priority is different from the second Scan priority.
  • the first possible implementation manner of the fifth aspect is capable of determining the first scan priority or the second scan priority according to the remaining power amount, so that the selected positioning mode is more suitable for the current state of the remaining power.
  • the processor is further configured to determine whether the current environment of the positioning terminal is indoors or outdoors, and when the current environment of the positioning terminal is indoors, Determine wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode At least one of the optical positioning mode and the computer vision positioning mode acquires the current location information. When the current environment of the positioning terminal is outdoor, it is determined that the global navigation satellite system GNSS positioning mode is used to obtain the current location information.
  • the global navigation satellite system GNSS positioning mode is used to obtain the current location information.
  • the second possible implementation manner of the fifth aspect can select a suitable current positioning manner according to whether the current environment is indoor or outdoor, and avoid unsuccessful positioning due to environmental influence, thereby improving the reliability of the positioning.
  • the processor is specifically configured to determine And determining, by the communication module, whether the time difference between the positioning request and the last positioning request is less than a time threshold, and determining that the communication module receives the positioning request and receiving the previous positioning request when the determination result is not less than a time threshold The time period, whether the displacement of the positioning terminal is smaller than the displacement threshold; when the judgment result is not less than the displacement threshold, the current position information is acquired.
  • the third possible implementation manner of the fifth aspect after determining whether the time difference between the positioning request and the last positioning request by the positioning terminal that is relatively easy to determine is greater than a time threshold, and then determining that the positioning terminal receives the positioning request and the last positioning request.
  • a time threshold determines whether the displacement of the positioning terminal is greater than the displacement threshold.
  • the processor is specifically configured to determine that the communications module receives the positioning request and receives a previous positioning request Whether the time difference is greater than a time threshold, and determining a time period between the receiving the positioning request and receiving the last positioning request when the time difference between the receiving the positioning request and the receiving the last positioning request is greater than a time threshold The displacement of the positioning terminal is greater than a displacement threshold, and when the displacement of the positioning terminal is greater than the displacement threshold, determining to perform positioning.
  • the processor is further configured to: When performing positioning, instructing the communication module to transmit at least one of a notification of not performing positioning and a photo of the photo in the positioning request or a time of photographing, or transmitting the last location information and a photo in the positioning request At least one of the logo or the time of the photo.
  • the processor is further configured to: after acquiring the current location information, enable the positioning module, and after acquiring the current location information, close the positioning module.
  • the positioning module can be enabled before the positioning terminal acquires the current location information, and the positioning module is closed after the positioning terminal acquires the current location information, which can effectively reduce the power consumption of the positioning terminal.
  • the communication module is configured to send to a third server The location information, and part or all of the information included in the positioning request, for the third server to include some or all of the information according to the positioning request, and information that the photographing terminal has taken a photo, The location information matches the photographed photo, and a location tag is added to the corresponding photo based on the location information.
  • a camera terminal includes: a communication module, a photographing module, and a processor, wherein the photographing module is configured to perform photographing; the communication module is configured to communicate with a positioning terminal; The communication module establishes a connection, wherein the positioning terminal is not more than a preset distance from the camera terminal; the processor is further configured to determine whether a positioning request needs to be sent, and when determining that a positioning request needs to be sent, instructing the The communication module sends a positioning request to the positioning terminal through the connection, wherein the positioning request includes at least one of an identifier of a photo and a photographing time of a photo; the processor is further configured to: according to the part included in the positioning request Or all the information, and the information that the photographing terminal has taken the photo, matching the position information returned by the communication module with the photographed photograph, and adding a position label to the corresponding photo according to the position information.
  • the processor is further configured to determine whether a time difference between the current shooting of the shooting module and the last shooting is greater than a time threshold, When the time difference between the shooting module and the last shooting is greater than the time threshold, it is determined that the positioning request needs to be sent, and the shooting module performs the shooting and the last shooting. When the time difference is less than or equal to the time threshold, it is determined that the positioning request does not need to be sent; or the processor is further configured to determine that the photographing terminal is in a time period during which the shooting module performs the shooting and the last shooting.
  • the displacement amount is greater than the displacement threshold, when the displacement of the photographing terminal is greater than the displacement threshold, it is determined that the positioning request needs to be sent, and when the displacement of the photographing terminal is less than or equal to the displacement threshold, it is determined that the positioning request is not required to be sent.
  • the camera terminal only sends a positioning request to the positioning terminal when it is determined that the positioning request needs to be sent to the positioning terminal, thereby reducing the workload of the communication module of the camera terminal and reducing the workload. Loss of power of the camera terminal. Moreover, the communication module of the positioning terminal also reduces the workload and reduces the loss of the power of the positioning terminal.
  • the processor is further configured to: after receiving the notification that the positioning terminal does not perform positioning And acquiring the last saved location information before sending the positioning request, according to the identifier of the photo returned by the positioning terminal and/or the shooting time of the photo, and the information that the photo terminal has taken the photo, the last time The saved location information matches the taken photo, and a location tag is added to the corresponding photo based on the last saved location information.
  • FIG. 1 is an interaction diagram of a camera terminal according to the location information provided by a positioning terminal according to the present invention
  • FIG. 2 is a schematic structural diagram of an apparatus for providing location information provided by the present application
  • FIG. 3 is a schematic structural diagram of an apparatus for providing location information provided by the present application.
  • FIG. 4 is a schematic structural diagram of an apparatus for acquiring location information provided by the present application.
  • FIG. 5 is a schematic structural diagram of a smart phone provided by the present application.
  • FIG. 6 is a schematic structural diagram of a camera terminal provided by the present application.
  • FIG. 1 is an interaction diagram of a camera terminal according to the location information provided by the positioning terminal according to the present invention. This embodiment includes the following steps:
  • the positioning terminal has a terminal for communication, positioning, timing, and the like, and the positioning terminal may further have a function of detecting displacement.
  • the positioning terminal is any one of a smartphone, a tablet, a notebook, a navigator, and the like.
  • Positioning terminal positioning methods include but are not limited to wireless fidelity (Wi-Fi) positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode , optical positioning, computer vision positioning and Global Navigation Satellite System (GNSS) positioning methods.
  • the camera terminal is a terminal having functions of photographing, communication, timing, etc., and the photographing terminal may further include functions such as detecting displacement.
  • Camera terminals include, but are not limited to, digital cameras, smart phones, tablets, and the like.
  • a communication connection can be established between the positioning terminal and the camera terminal through a wireless or wired manner.
  • the positioning terminal and the camera terminal can be connected by wireless means such as Wi-Fi, Bluetooth, cellular, or the like.
  • a universal asynchronous communication transceiver Universal Asynchronous Receiver/Transmitter, UART
  • UART Universal Asynchronous Receiver/Transmitter
  • USB universal serial bus
  • the positioning terminal sends the exchange information to the camera terminal, where the exchange information may be a pre-agreed character of the positioning terminal and the photographing terminal.
  • the photographing terminal calculates the distance between the photographing terminal and the positioning terminal by exchanging information from the positioning terminal to the time received by the photographing terminal. The distance between the photographing terminal and the positioning terminal is equal to the time between the exchange of the information from the positioning terminal and the reception of the photographed terminal multiplied by the speed at which the information is exchanged. If the distance between the positioning terminal and the photographing terminal is less than a preset threshold, the photographing terminal sends a request for allowing the requested location to the positioning terminal.
  • the preset threshold can be set according to the actual needs according to the actual needs.
  • the setting needs to ensure that the normal communication between the positioning terminal and the photographing terminal and the position where the positioning terminal is positioned as the position of the photographing terminal are not seriously unrealistic, resulting in unacceptable can.
  • the positioning terminal pops up the prompt interface.
  • the prompt interface includes an allow button and a disallow button. If the user selects the permission button, the positioning terminal allows the camera terminal to request positioning from the positioning terminal, and if the user selects the disallow button, the positioning terminal The camera terminal is not allowed to request positioning from the positioning terminal.
  • the positioning terminal initiates the connection between the establishing and the photographing terminal, or the photographing terminal initiates the connection between the establishing and the positioning terminal.
  • the communication connection can be maintained after the power is turned on, and the connection between the positioning terminal and the camera terminal can be established only when the camera terminal needs to take a picture, and even the camera terminal needs to request the positioning terminal.
  • the connection between the positioning terminal and the camera terminal is established.
  • the photographing terminal sends a positioning request to the positioning terminal by using a connection.
  • the photographing terminal passes the established photo.
  • the communication connection sends a positioning request to the positioning terminal.
  • the timer is started to perform timing. After the time is up, the camera terminal sends a positioning request to the positioning terminal through the established communication connection.
  • the location request may include at least one of an identifier of the photo or a time of photographing, and the location request may further include an identifier of the photographing terminal and the like.
  • the photo's logo is usually the unique code for the photo and can be used to identify the photo.
  • the time of taking a photo is the time when the user takes a photo to obtain a photo.
  • the identification of the camera terminal is usually a unique code of the camera terminal and can be used to identify the camera terminal.
  • S103 The positioning terminal determines whether to perform positioning.
  • the positioning terminal first determines whether the time difference between the positioning terminal receiving the positioning request and the receiving the previous positioning request is greater than a time threshold, and if the determination result is less than or equal to the time threshold, determining If the result of the determination is greater than the time threshold, it is further determined whether the displacement of the positioning terminal is greater than the displacement threshold in the time period between the positioning of the positioning request and the reception of the previous positioning request, and if the determination result is less than or equal to the displacement
  • the threshold is determined not to perform positioning, and if the result of the determination is greater than the displacement threshold, it is determined to perform positioning.
  • the time threshold can be set according to the needs of the user. When setting, only the time threshold is guaranteed.
  • the value is set to be small enough that in a normal situation, the displacement between the positioning terminal and the photographing terminal is negligible within the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request.
  • the displacement threshold can be set according to the needs of the user. When setting, the displacement between the positioning terminal and the camera terminal can be neglected during the time period between receiving the positioning request and receiving the previous positioning request. The time period can be It is 10 seconds, 30 seconds or half an hour and so on.
  • the positioning terminal can calculate the displacement of the positioning terminal by reading sensor data of one or more of the acceleration sensor, the gyro sensor, and the like.
  • the positioning terminal reads sensor data of one or more of the acceleration sensor, the gyro sensor, and the like at the time of receiving the last positioning request, and reads the acceleration sensor, the gyro sensor, and the like at the time of receiving the positioning request.
  • One or more sensor data to calculate the displacement of the positioning terminal during the time period between two positioning requests.
  • step S104 If it is determined that the positioning is not performed, the process proceeds to step S104, and if it is determined that the positioning is performed, the process proceeds to step S105.
  • S104 The positioning terminal feeds back to the camera terminal.
  • the positioning terminal sends a notification that the positioning is not performed to the photographing terminal, and at least one of the identifier of the photo in the positioning request or the time of photographing; or sending the last location information to the photographing terminal. And at least one of an identification of a photo in the location request or a time of photographing.
  • the location information may be latitude and longitude information, or may be address information obtained after parsing the latitude and longitude. After the end of this step, the process proceeds to step S107.
  • the positioning terminal acquires current location information.
  • the positioning terminal may directly locate the current location information according to the specified positioning manner, or may perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location. Location information to improve positioning efficiency and save power.
  • the specified positioning mode may be wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning Mode, broadcast signal positioning method, A combination of any one or more of optical positioning mode, computer vision positioning mode, and GNSS positioning mode.
  • the positioning terminal selects a positioning mode according to the remaining power. Specifically, the positioning terminal determines whether the remaining power of the positioning terminal is greater than the power threshold; if the remaining power of the positioning terminal is greater than the power threshold, determining the positioning mode according to the first scanning priority; if the remaining power of the positioning terminal is less than the power threshold, The positioning mode is determined according to the second scanning priority. Among them, the power threshold can be set as needed. The first scan priority and the second scan priority are used to indicate the ordering of the priority levels of the positioning modes. When the positioning mode is determined according to the first scanning priority or the second scanning priority, the positioning mode with the highest priority is selected first. If the positioning mode with the highest priority cannot be used, the positioning mode with the second highest priority is used, and so on.
  • the first scanning priority is different from the second scanning priority, and the positioning manner in the first scanning priority may be different from the positioning manner in the second scanning priority, or may be the positioning manner in the first scanning priority.
  • the positioning manner in the second scanning priority is the same, but the priority of the positioning mode in the first scanning priority is different from the priority of the positioning mode in the second scanning priority.
  • the priority levels of the positioning modes in the first scanning priority are arranged in descending order of the accuracy of the positioning mode, and the priority levels of the positioning modes in the second scanning priority are arranged in ascending order according to the power consumption of the positioning mode.
  • the GNSS positioning method has the highest positioning accuracy, the largest power consumption, the lowest positioning accuracy of the cellular positioning mode, and the lowest power consumption, and the Wi-Fi positioning mode is centered. Therefore, the first scanning priority is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode. Or, the first power threshold and the second power threshold are used to divide the power into three regions, and the positioning terminal determines, in which region the remaining power of the positioning terminal falls, if the remaining power of the positioning terminal falls within a threshold greater than or equal to the first power threshold. In the interval, the positioning mode is determined according to the first scanning priority.
  • the scanning priority positioning mode is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode
  • the second scanning priority positioning mode is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode
  • third scanning The priority positioning mode is Wi-Fi positioning mode->GNSS positioning mode->cellular positioning mode.
  • the positioning terminal selects a positioning mode according to the current environment. Specifically, the positioning terminal determines whether the current environment of the positioning terminal is indoors or outdoors. The positioning terminal can determine whether the current environment of the positioning terminal is indoors or outdoors by reading and analyzing at least one of sensor data such as a light sensor, a barometer, and a temperature sensor. If the current environment of the positioning terminal is indoor, the positioning method suitable for indoor positioning is adopted, for example, Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, and radio frequency tag positioning mode.
  • At least one of Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode, optical positioning mode, computer vision positioning mode, and the like acquires current location information; if the current environment of the positioning terminal is outdoor, it is suitable for outdoor use.
  • the positioning method of positioning for example, using GNSS positioning method or the like to obtain current location information.
  • the positioning module is enabled to enable the power supply to supply power to the positioning module. After obtaining the current location information, the positioning module is closed, so that the power supply cannot be performed to the positioning module. powered by.
  • the positioning module may be any one or more of a Wi-Fi module, a Bluetooth module, a cellular module, a geomagnetic module, an ultrasonic module, an infrared module, a radio frequency tag module, a Zigbee module, an ultra-wideband radio module optical module, and a camera module.
  • the positioning module is a GNSS module.
  • the positioning module is a Wi-Fi module or the like.
  • the positioning terminal after obtaining the location information, sends at least one of the identifier of the photo in the positioning request or the time of photographing to the photographing terminal by using the connection between the positioning terminal and the photographing terminal, and the location acquired by the positioning terminal. information.
  • the photographing terminal performs matching according to the feedback of the positioning terminal and adds a position label.
  • the header file of the photo usually includes a plurality of different labels for recording shooting time, shutter speed, exposure compensation, focal length, position information, and the like.
  • a location tag is a tag in a header file of a photo that is specifically used to record location information.
  • a location tag is a tag specifically used to record global positioning data in an Exchangeable Image File (EXIF).
  • EXIF Exchangeable Image File
  • the photographing terminal acquires the last saved location information before sending the positioning request in step 102, and according to the identifier of the photo returned by the positioning terminal and/or Or the shooting time of the photo, and the information of the photo taken by the photographing terminal, matching the last saved location information with the photographed photograph, wherein the photo information includes the logo of the photo and/or the photographing time of the photo, and the like.
  • the location tag is added to the corresponding photo according to the last saved location information.
  • the positioning terminal may not feed back any information to the camera terminal when determining that the positioning is not performed.
  • the camera terminal does not receive any information fed back by the positioning terminal for a period of time, and acquires the last saved location information before transmitting the positioning request described in step 102, and according to the identifier and/or photo of the photo returned by the positioning terminal.
  • the shooting time, as well as the information that the camera terminal has taken the photo matches the last saved location information with the captured photo, and then adds a location tag to the corresponding photo based on the last saved location information.
  • the photographing terminal receives the last location information returned by the positioning terminal, or the obtained location information returned by the positioning terminal, according to the returned location information, and part or all of the information included in the positioning request, And the information that the photo terminal has taken the photo, and the location information is matched with the photograph taken.
  • the matching may be performed according to the identifier of the photo returned by the positioning terminal and the identifier of the photograph taken. If the identifier of the photo returned by the positioning terminal is consistent with the identifier of the photograph taken, the matching is successful, or according to the return of the positioning terminal.
  • the shooting time of the photo is matched with the shooting time of the taken photo.
  • the shooting time of the photo returned by the positioning terminal coincides with the shooting time of the taken photo, the matching is successful.
  • Matching is performed, and if the photographing time is the same as the photographing time of the photographed photo and the photographing time of the photograph, the matching is successful. After the match is successful, add a location tag to the corresponding photo based on the location information.
  • the photographing terminal can also send the photograph taken to the third party server.
  • the positioning terminal After acquiring the location information, the positioning terminal sends at least one of the identifier of the photo in the location request or the time of photographing, and the location information to the third-party server.
  • the third-party server matches the location information with the captured photo according to the location information sent by the positioning terminal, part or all of the information included in the positioning request, and the information that the camera terminal has taken the photo, and then adds the location to the corresponding photo according to the location information. label.
  • the photographing terminal sends the photographed photograph to the positioning terminal.
  • the photographing terminal sends the photographed photograph to the positioning request sent to the positioning terminal, or the photographing terminal separately sends the photographed photograph to the positioning terminal.
  • the positioning terminal After receiving the captured photo and acquiring the location information, the positioning terminal matches the location information with the captured photo, and then adds a location tag to the corresponding photo according to the location information.
  • Solution 1 After the camera terminal and the positioning terminal establish a connection, the camera terminal determines whether the time difference between the current shooting and the previous shooting is greater than a time threshold. If the result of the determination by the photographing terminal is less than or equal to the time threshold, the photographing terminal determines not to perform the positioning. Therefore, the photographing terminal determines that it is not necessary to send a positioning request to the positioning terminal, but obtains the last saved position information from the memory to match the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the time threshold, the photographing terminal determines that the positioning request needs to be sent to the positioning terminal, and sends a positioning request to the positioning terminal.
  • the positioning terminal After receiving the positioning request, the positioning terminal determines whether the displacement of the positioning terminal is greater than the displacement threshold within a time period between receiving the positioning request and receiving the previous positioning request. If the judgment result obtained by the positioning terminal is less than or equal to the displacement threshold, the positioning terminal determines not to perform positioning.
  • the positioning terminal sends, to the photographing terminal, a notification that no positioning is performed, and at least one of the identification of the photo in the positioning request or the time of photographing; or, positioning The terminal transmits the last location information to the camera terminal, and at least one of the identification of the photo in the location request or the time of photographing. If the result of the positioning terminal judgment is greater than the displacement threshold, it is determined to perform positioning.
  • the locating terminal can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information. After obtaining the current location information, the positioning terminal sends the current location information to the camera terminal for matching and adding a label, or after acquiring the current location information, the positioning terminal sends the current location information to the third-party server and sends the current location information to the third-party server.
  • the third-party server performs matching and labeling. For details, refer to the foregoing embodiment. The description is not repeated here.
  • Solution 2 After the camera terminal and the positioning terminal establish a connection, the camera terminal determines whether the time difference between the current shooting and the previous shooting is greater than a time threshold. If the result of the camera terminal determination is less than or equal to the time threshold, the camera terminal determines not to Positioning. The photographing terminal determines that it is not necessary to send a positioning request to the positioning terminal, but obtains the last saved position information from the memory to match the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the time threshold, the photographing terminal further determines whether the displacement of the photographing terminal is greater than the displacement threshold in the period between the current photographing and the last photographing.
  • the photographing terminal determines not to perform the positioning.
  • the photographing terminal determines that it is not necessary to send a positioning request to the positioning terminal, but obtains the last saved position information from the memory to match the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the displacement threshold, the photographing terminal determines to perform the positioning. The photographing terminal determines that a positioning request needs to be sent to the positioning terminal, and sends a positioning request to the positioning terminal.
  • the positioning terminal After receiving the positioning request, the positioning terminal can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information. . After obtaining the current location information, the positioning terminal sends the current location information to the camera terminal for matching and adding tags. Or, after obtaining the current location information, the locating terminal sends the current location information to the third-party server to be sent to the third-party server for matching and labeling. For details, refer to the foregoing embodiment, and the description is not further described herein.
  • Solution 3 After the photo terminal and the positioning terminal establish a connection, the photographing terminal determines whether the displacement of the photographing terminal is greater than the displacement threshold in the time period during which the photographing terminal performs the photographing and the last photographing. If the result of the determination by the photographing terminal is less than or equal to the displacement threshold, the photographing terminal determines not to perform the positioning. Therefore, the photographing terminal determines that it is not necessary to send the positioning request to the positioning terminal, but obtains the last saved position information from the memory and has taken the photograph. The photos match, and then add a location tag to the corresponding photo based on the last saved location information.
  • the photographing terminal determines that the positioning request needs to be sent to the positioning terminal, and sends a positioning request to the positioning terminal. After receiving the positioning request, the positioning terminal determines whether the time difference between receiving the positioning request and receiving the last positioning request is less than a time threshold. If the result of the determination by the positioning terminal is less than or equal to the time threshold, it is determined that the positioning is not performed.
  • the positioning terminal sends at least one of a notification that no positioning is performed to the photographing terminal, and an identifier of the photo in the positioning request or a time of photographing; or the positioning terminal transmits the last location information to the photographing terminal, and locates the photo in the request At least one of the time of identification or photographing.
  • the positioning terminal determines to perform positioning.
  • the locating terminal can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information.
  • the positioning terminal After obtaining the current location information, the positioning terminal sends the current location information to the camera terminal for matching and adding a label, or after acquiring the current location information, the positioning terminal sends the current location information to the third-party server and sends the current location information to the third-party server.
  • the third-party server performs matching and labeling. For details, refer to the foregoing embodiment. The description is not repeated here.
  • the technical solution proposed by the present application is only positioned in comparison with the prior art.
  • the terminal receives the location request sent by the camera terminal, and when the location terminal and/or the camera terminal determine that the location needs to be determined, the location terminal obtains the current location information by using the location, thereby effectively reducing the power consumption of the location terminal.
  • FIG. 2 is a schematic structural diagram of an apparatus for providing location information provided by the present application.
  • the apparatus for providing location information in this embodiment includes: a connection establishment module 201, a receiving module 202, a first judging module 203, a determining module 204, and an obtaining and transmitting module 205.
  • the connection establishing module 201 is configured to establish a connection with the photographing terminal, wherein a distance between the positioning terminal and the photographing terminal does not exceed a preset threshold.
  • the receiving module 202 is configured to receive a positioning request that is sent by the photographing terminal through the connection, where the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing.
  • the first determining module 203 is configured to determine at least one of the following: the receiving module 202 receives the time difference between the positioning request and the last positioning request is greater than a time threshold; and the receiving module 202 receives the positioning request and the last time Whether the displacement amount of the positioning terminal is greater than the displacement threshold during the time period of the positioning request.
  • the determining module 204 is configured to determine whether to perform positioning according to the result of the determining;
  • the obtaining and sending module 205 is configured to: when determining to perform positioning, acquire current location information, and send the current location information to the camera terminal through the connection, and some or all information included in the positioning request. .
  • FIG. 3 is a schematic structural diagram of an apparatus for providing location information provided by the present application.
  • the device for providing location information in this embodiment includes: a connection establishing module 301, a receiving module 302, a first determining module 303, a determining module 304, and an obtaining transmitting module 306.
  • the connection establishing module 301 is configured to establish a connection with the photographing terminal, wherein a distance between the positioning terminal and the photographing terminal does not exceed a preset threshold.
  • the receiving module 302 is configured to receive a positioning request that is sent by the photographing terminal through the connection, where the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing.
  • the first determining module 303 is configured to determine at least one of the following: the receiving module 302 receives the time difference between the positioning request and the last positioning request is greater than a time threshold; and the receiving module 302 receives the positioning request and the last time Whether the displacement amount of the positioning terminal is greater than the displacement threshold during the time period of the positioning request.
  • the determining module 304 is configured to determine whether to perform positioning according to the result of the determining;
  • the obtaining and sending module 306 is configured to: when determining to perform positioning, acquire current location information, and send the current location information to the camera terminal through the connection, and some or all information included in the positioning request. .
  • the device further includes a second determining module 308 and a priority determining module 309, where the second determining module 308 is configured to determine whether the remaining power of the positioning terminal is greater than a power threshold; the priority determining module 309 When the remaining power of the positioning terminal is greater than the power threshold, the positioning mode is determined according to the first scanning priority; when the remaining power of the positioning terminal is less than the power threshold, the positioning mode is determined according to the second scanning priority, where The first scan priority is different from the second scan priority.
  • the second determining module 308 is configured to determine whether the remaining power of the positioning terminal is greater than a power threshold
  • the priority determining module 309 When the remaining power of the positioning terminal is greater than the power threshold, the positioning mode is determined according to the first scanning priority; when the remaining power of the positioning terminal is less than the power threshold, the positioning mode is determined according to the second scanning priority, where The first scan priority is different from the second scan priority.
  • the device further includes a third determining module 310, where the third determining module 310 is configured to determine whether the current environment of the positioning terminal is indoors or outdoors; and the obtaining sending module 306 is configured to be in the positioning terminal.
  • the third determining module 310 is configured to determine whether the current environment of the positioning terminal is indoors or outdoors; and the obtaining sending module 306 is configured to be in the positioning terminal.
  • wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning Obtaining current location information by at least one of a mode, a broadcast signal positioning mode, an optical positioning mode, and a computer vision positioning mode;
  • the GNSS positioning method of the global navigation satellite system is used to obtain the current location information.
  • the first determining module 303 is configured to determine whether the time difference between the receiving the positioning request and the receiving the last positioning request is greater than a time threshold, and receiving, by the receiving module 302, the positioning request and receiving The time difference of the last positioning request is greater than the time threshold, and the time interval between the receiving of the positioning request and the receiving of the previous positioning request is determined, whether the displacement of the positioning terminal is greater than a displacement threshold; When the displacement of the positioning terminal is greater than the displacement threshold, it is determined to perform positioning.
  • the determining module 304 is configured to determine, when the positioning terminal receives the positioning request and the time difference between receiving the last positioning request is less than or equal to a time threshold, determining that the positioning is not performed; or receiving, at the positioning terminal, The time difference between the positioning request and the receiving the last positioning request is greater than a time threshold, and the displacement of the positioning terminal is less than or equal to the displacement threshold in a time period between the positioning terminal receiving the positioning request and receiving the last positioning request. When it is determined, no positioning is performed.
  • the acquiring and sending module 306 is configured to, when determining that no positioning is performed, send, to the photographing terminal, at least one of a notification of not performing positioning and a time of identifying or photographing a photo in the positioning request; or And transmitting, to the photographing terminal, at least one of an identification of a photo in the positioning request of the last position information or a time of photographing.
  • the device further includes an opening module 305 and a closing module 307, the opening module 305 is configured to open the positioning module, and the closing module 307 is configured to close the positioning module.
  • FIG. 4 is a schematic structural diagram of an apparatus for acquiring location information provided by the present application.
  • the device for acquiring location information in this embodiment includes: a connection module 401, a determining module 402, a sending module 403, a receiving module 404, a matching module 405, and an adding module 406.
  • the connection module 401 is configured to establish a connection with the positioning terminal, where the positioning terminal is not more than a preset distance from the camera terminal;
  • the determining module 402 is configured to determine whether a positioning request needs to be sent
  • the sending module 403 is configured to send a positioning request to the positioning terminal by using the connection, where the positioning request includes at least one of an identifier of a photo and a photographing time of a photo, when determining that a positioning request needs to be sent;
  • the receiving module 404 is configured to receive location information returned by the positioning terminal according to the positioning request, and part or all of information included in the positioning request;
  • the matching module 405 is configured to match the location information with the captured photo according to part or all of the information included in the positioning request and information that the camera terminal has taken a photo;
  • the adding module 406 is configured to add a location tag to the corresponding photo according to the location information.
  • the determining module 402 is configured to determine whether the time difference between the photographing terminal and the last shooting is greater than a time threshold, and the time difference between the photographing terminal and the last shooting is greater than the time.
  • the threshold it is determined that the positioning request needs to be sent, and when the time difference between the current shooting and the last shooting is less than or equal to the time threshold, it is determined that the positioning request does not need to be sent; or the determining module 402 is configured to determine Whether the displacement amount of the photographing terminal is greater than a displacement threshold during the time when the photographing terminal performs the photographing and the last photographing, and when the displacement of the photographing terminal is greater than the displacement threshold, it is determined that the positioning request needs to be sent, and the photographing terminal is required. When the displacement amount is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
  • the device further includes an obtaining module 407, configured to acquire, after receiving the notification that the positioning terminal does not perform positioning, location information that is saved last time before the positioning request is sent;
  • the matching module 405 is configured to display the last saved location information and the taken photo according to the identifier of the photo returned by the positioning terminal and/or the shooting time of the photo, and the information that the camera terminal has taken the photo.
  • Matching; the adding module 406 is configured to add a location tag to the corresponding photo according to the last saved location information.
  • the embodiment of the invention relates to a positioning terminal, which is a terminal having functions of positioning, communication, etc., for example, the positioning terminal may be any one of a smart phone, a tablet computer, a notebook computer, a navigator and the like.
  • Positioning terminal positioning methods include, but are not limited to, wireless fidelity (Wi-Fi) positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning Mode, ultra-wideband radio positioning, broadcast signal positioning, optical positioning, computer vision positioning, and Global Navigation Satellite System (GNSS) positioning methods.
  • Wi-Fi wireless fidelity
  • Bluetooth positioning mode cellular positioning mode
  • ultrasonic positioning mode infrared positioning mode
  • radio frequency tag positioning mode infrared positioning mode
  • Zigbee positioning Mode ultra-wideband radio positioning
  • broadcast signal positioning optical positioning
  • computer vision positioning and Global Navigation Satellite System (GNSS) positioning methods.
  • GNSS Global Navigation Satellite System
  • FIG. 5 is a block diagram showing a part of the structure of the smartphone 500 related to the embodiment of the present invention.
  • the smart phone 500 includes components such as a communication module 510, a memory 520, an input unit 530, a display unit 540, a displacement sensor 550, an audio circuit 560, a positioning module 570, a processor 580, and a power source 590.
  • the smartphone structure illustrated in FIG. 5 does not constitute a limitation to a smartphone, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements.
  • the communication module 510 is configured to communicate with the camera terminal.
  • the communication module 510 may be any one of a wireless communication module such as a Wi-Fi module, a Bluetooth module, a cellular communication module, or the like, or may be any one of a serial communication module, a USB module, and the like.
  • a Bluetooth module is taken as an example.
  • the Bluetooth module includes a chip and peripheral devices, and can implement short-range wireless communication.
  • the memory 520 can be used to store software programs and modules, and the processor 580 executes various functional applications and data processing of the smartphone 500 by running software programs and modules stored in the memory 520.
  • the memory 520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data (such as audio data, phone book, etc.) created according to the use of the smartphone 500.
  • the memory 520 may include a high speed random access memory, Non-volatile memory may be included, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 530 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the smartphone 500.
  • the input unit 530 may include a touch panel 531 and other input devices 532.
  • the touch panel 531 also referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 131 or near the touch panel 531. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 531 can include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 580 is provided and can receive commands from the processor 580 and execute them.
  • the touch panel 531 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 530 may also include other input devices 532. Specifically, other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 540 can be used to display information input by the user or information provided to the user and various menus of the smartphone 500.
  • the display unit 540 can include a display panel 541.
  • the display panel 541 can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch panel 531 can cover the display panel 541. When the touch panel 531 detects a touch operation on or near it, the touch panel 531 transmits to the processor 580 to determine the type of the touch event, and then the processor 580 according to the touch event. The type provides a corresponding visual output on display panel 541.
  • the touch panel 531 and the display panel 541 are two independent components to implement the input and input functions of the smartphone 500, in some embodiments, the touch panel 531 and the display panel 541 may be Integrate and realize the input and output functions of the smartphone 500 can.
  • the sensor 550 includes a combination of any one or more of an acceleration sensor, a gyro sensor, and the like that can measure the displacement of the smartphone 500.
  • the accelerometer sensor can detect the acceleration of each direction (usually three axes), and the magnitude and direction of gravity can be detected at rest. Therefore, it can also be used to identify the posture of the mobile phone (such as horizontal and vertical screen). Switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping).
  • Sensor 550 can also optionally include a light sensor, a barometer, a temperature sensor, a proximity sensor, and the like.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may determine the location of the smart phone 500 in combination with a barometer, a temperature sensor, or the like, for example, determining whether the smart phone is indoors or outdoors.
  • the proximity sensor can turn off the display panel 541 and/or the backlight when the smartphone 500 moves to the ear. Other sensors of the smart phone 500 will not be described here.
  • Audio circuit 560, speaker 561, microphone 562 can provide an audio interface between the user and smartphone 500.
  • the audio circuit 560 can transmit the converted electrical data of the received audio data to the speaker 561 for conversion to the sound signal output by the speaker 561; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal by the audio circuit 560. After receiving, it is converted into audio data, and the audio data is output to the communication module 510 for transmission to, for example, another mobile phone, or the audio data is output to the memory 520 for further processing.
  • the positioning module 570 can be any one or more of a Wi-Fi module, a Bluetooth module, a cellular module, a geomagnetic module, an ultrasonic module, an infrared module, a radio frequency tag module, a Zigbee module, an ultra-wideband radio module optical module, and a camera module. combination.
  • the positioning module is a GNSS module.
  • the positioning module is a Wi-Fi module or the like. It can be understood that when the positioning module 570 is any one of a Wi-Fi module, a Bluetooth module, and a cellular module, the positioning module 570 and the communication module 510 may also be the same module.
  • Processor 580 is the control center of smartphone 500, which connects various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in memory 520, and recalling data stored in memory 520.
  • the smartphone 500 is monitored as a whole by performing various functions and processing data of the smartphone 500.
  • the processor 580 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 580.
  • the smart phone 500 also includes a power source 590 (such as a battery) that supplies power to various components.
  • a power source 590 such as a battery
  • the power source can be logically coupled to the processor 580 through a power management system to manage functions such as charging, discharging, and power consumption through the power management system.
  • the smartphone 500 may further include a camera or the like, which will not be described herein.
  • the distance between the smartphone 500 and the camera terminal does not exceed a preset threshold.
  • the camera terminal is a terminal having a shooting function, including but not limited to a digital camera, another smart phone, a tablet computer, and the like.
  • the preset threshold can be set according to the actual needs according to the actual needs. The setting needs to ensure that the normal communication between the smart phone 500 and the photographing terminal and the position where the smart phone 500 is positioned as the position of the photographing terminal are not seriously unrealistic, resulting in unacceptable can.
  • a communication connection can be established between the smart phone 500 and the camera terminal through a wireless or wired manner.
  • the smart phone 500 and the camera terminal can be connected by wireless means such as Wi-Fi, Bluetooth, and cellular.
  • the communication connection can be established by a wired method such as a Universal Asynchronous Receiver/Transmitter (UART), a network port, or a Universal Serial Bus (USB).
  • UART Universal Asynchronous Receiver/Transmitter
  • USB Universal Serial Bus
  • the smart phone 500 sends the exchange information to the photographing terminal, wherein the exchange information may be a character pre-agreed by the smart phone 500 and the photographing terminal.
  • the camera terminal is receiving After locating the exchange information sent by the terminal, the distance between the camera terminal and the smartphone 500 is calculated by the time between the exchange of the information from the smartphone 500 and the receipt of the camera terminal. The distance between the camera terminal and the smartphone 500 is equal to the time between the time the smartphone 500 is sent and the time it is received by the location terminal multiplied by the speed at which the information is transmitted.
  • the camera terminal pops up a prompt interface on the touch panel.
  • the prompt interface includes an allow button and a disallow button. If the user selects the permission button by clicking the touch panel, the camera terminal allows the request location to be sent to the location terminal. If the user selects the disallow button by clicking the touch panel, the camera terminal does not allow the location terminal to be requested.
  • the preset threshold value may be set according to actual needs according to actual needs, and the setting needs to ensure that the normal communication between the smart phone 500 and the photographing terminal and the position where the smart phone 500 is positioned as the position of the photographing terminal are not seriously deficient. Accept it.
  • the communication module 510 of the smart phone 500 may initiate a connection between the establishing and the camera terminal, or the camera terminal may initiate a connection with the communication module 510 of the smart phone 500.
  • the communication module 510 of the smart phone 500 and the camera terminal can maintain the communication connection after the power is turned on, and the connection between the communication module 510 of the smart phone 500 and the camera terminal can be established when the camera terminal needs to take a picture. It is even possible to establish a connection between the smartphone 500 and the photographing terminal, etc., when the photographing terminal needs to request positioning from the smartphone 500.
  • the photographing terminal passes The established communication connection sends a location request to the communication module 510 of the smartphone 500.
  • the timer is started to perform timing. After the time is up, the camera terminal sends a positioning request to the communication module 510 of the smart phone 500 through the established communication connection.
  • the location request may include at least one of an identifier of the photo or a time of photographing, and the location request may further include an identifier of the photographing terminal and the like.
  • the logo of the photo is usually The unique encoding of the photo that can be used to identify the photo.
  • the time of taking a photo is the time when the user takes a photo to obtain a photo.
  • the identification of the camera terminal is usually a unique code of the camera terminal and can be used to identify the camera terminal.
  • the processor 580 first determines whether the time difference between the receiving the positioning request and the receiving the previous positioning request by the communication module 510 is greater than a time threshold, and if the determination result is less than or equal to the time threshold. If the result of the determination is greater than the time threshold, the processor 580 further determines whether the displacement of the smart phone 500 is greater than the displacement threshold during the time period between the receiving of the positioning request by the communication module 510 and the receiving of the previous positioning request. If the result of the determination is less than or equal to the displacement threshold, it is determined that the positioning is not performed, and if the determination result is greater than the displacement threshold, it is determined to perform the positioning.
  • the time threshold can be set according to the needs of the user. When setting, it is only necessary to ensure that the time threshold is set small enough that the communication module 510 receives the current positioning request and receives the previous positioning request under normal conditions. Within the time difference, the displacement of the smartphone 500 and the camera terminal is negligible.
  • the displacement threshold can be set according to the needs of the user. When setting, the time interval between the smartphone 500 and the photographing terminal can be neglected only when the smartphone 500 receives the positioning request and receives the last positioning request, wherein the time is negligible.
  • the segment can be 10 seconds, 30 seconds or half an hour, and so on.
  • the smartphone 500 can calculate the displacement of the smartphone 500 by reading sensor data of one or more of an acceleration sensor, a gyro sensor, and the like.
  • the communication module 510 of the smartphone 500 reads sensor data of one or more of the acceleration sensor, the gyro sensor, and the like at the time of receiving the last positioning request, and reads the acceleration sensor and the gyro at the time of receiving the positioning request.
  • the sensor data of one or more of the sensors and the like thereby calculating the displacement of the smartphone 500 during the time period between the two positioning requests.
  • the communication module 510 of the smart phone 500 sends a notification that the positioning is not performed to the photographing terminal, and at least one of the identifier of the photo in the positioning request or the time of photographing; or, sends the photographing terminal to the photographing terminal.
  • Last location information, as well as the title of the photo in the targeting request At least one of the time of recognition or photographing.
  • the location information may be latitude and longitude information, or may be address information obtained after parsing the latitude and longitude.
  • the processor 580 of the smart phone 500 may directly determine the positioning manner according to the specified positioning manner, and call the positioning module 570 to perform positioning to obtain current location information, and the processor 580 may also be configured according to the smart phone 500.
  • the remaining power or the current environment of the smart phone 500 selects the positioning mode, and the positioning module 570 is called to obtain the current location information to improve the positioning efficiency and save power.
  • the specified positioning mode may be wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning A combination of any one or more of a mode, a broadcast signal positioning mode, an optical positioning mode, a computer vision positioning mode, and a GNSS positioning mode.
  • the processor 580 of the smartphone 500 selects a positioning mode based on the remaining power. Specifically, the processor 580 determines whether the remaining power of the smart phone 500 is greater than the power threshold; if the remaining power of the smart phone 500 is greater than the power threshold, determining the positioning mode according to the first scanning priority; if the remaining power of the smart phone 500 is less than the power threshold Then, the positioning mode is determined according to the second scanning priority.
  • the power threshold can be set as needed.
  • the first scan priority and the second scan priority are used to indicate the ordering of the priority levels of the positioning modes. When the positioning mode is determined according to the first scanning priority or the second scanning priority, the positioning mode with the highest priority is selected first.
  • the positioning mode with the highest priority cannot be used, the positioning mode with the second highest priority is used, and so on.
  • the first scanning priority is different from the second scanning priority, and the positioning manner in the first scanning priority may be different from the positioning manner in the second scanning priority, or may be the positioning manner in the first scanning priority.
  • the positioning manner in the second scanning priority is the same, but the priority of the positioning mode in the first scanning priority is different from the priority of the positioning mode in the second scanning priority.
  • the priority of the positioning mode in the first scanning priority is arranged in descending order of the accuracy of the positioning mode.
  • the priority of the positioning mode in the second scanning priority is sorted in ascending order according to the power consumption of the positioning mode.
  • the GNSS positioning method has the highest positioning accuracy, the largest power consumption, the lowest positioning accuracy of the cellular positioning mode, and the lowest power consumption, and the Wi-Fi positioning mode is centered. Therefore, the first scanning priority is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode.
  • the first power level threshold and the second power level threshold are used to divide the power into three areas, and the processor 580 determines which area the remaining power of the smart phone 500 falls into, if the remaining power of the smart phone 500 falls within the first or greater In the interval of the power threshold, the positioning mode is determined according to the first scanning priority.
  • the positioning mode is determined according to the second scanning priority level, if the smart phone 500 If the remaining power falls within a section that is smaller than the first power threshold and greater than the second power threshold, the positioning mode is determined according to the third scan priority level.
  • the first scanning priority positioning mode is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode
  • the second scanning priority positioning mode is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode
  • the third scanning priority positioning mode is Wi-Fi positioning mode->GNSS positioning mode->cellular positioning mode.
  • the processor 580 selects a positioning mode based on the current environment. Specifically, the processor 580 determines whether the current environment of the smartphone 500 is indoors or outdoors. The processor 580 can determine whether the current environment of the smart phone 500 is indoors or outdoors by reading and analyzing at least one of sensor data such as a light sensor, a barometer, and a temperature sensor. If the current environment of the smart phone 500 is indoor, the positioning mode suitable for indoor positioning is adopted, for example, Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, and radio frequency tag positioning.
  • the method acquire at least one of the current location information; if the current environment of the smart phone 500 is outdoor, the adoption is suitable
  • the positioning method for positioning in the outdoor for example, the GNSS positioning method or the like is used to obtain the current location information.
  • the processor 580 can enable the positioning module 570 to enable the power supply 590 to supply power to the positioning module 570.
  • the positioning module 570 After acquiring the current location information, the positioning module 570 is turned off. The power supply 590 is rendered incapable of supplying power to the positioning module 570.
  • the smart phone 500 sends at least one of the identifier of the photo in the location request or the time of photographing to the camera terminal through the communication module 510, and the location information acquired by the location module 570. .
  • the photographing terminal acquires the last saved location information before sending the positioning request, and according to the identifier of the photo returned by the communication module 510 and/or the shooting time of the photo. And the information that the photographing terminal has taken the photo, and the last saved location information is matched with the photographed photograph, wherein the photo information includes the logo of the photograph and/or the photographing time of the photograph, and the like. After the match is successful, the location tag is added to the corresponding photo according to the last saved location information.
  • the head file of the photo usually includes a plurality of different labels for recording shooting time, shutter speed, exposure compensation, focal length and position information, and the like.
  • a location tag is a tag in a header file of a photo that is specifically used to record location information.
  • a location tag is a tag specifically used to record global positioning data in an Exchangeable Image File (EXIF).
  • EXIF Exchangeable Image File
  • the processor 580 may not feed back any information to the camera terminal.
  • the camera terminal does not receive any information fed back by the positioning terminal for a period of time, and acquires the last saved location information before transmitting the positioning request, and according to the identifier of the photo returned by the communication module 510 and/or the shooting time of the photo. And the information that the photo terminal has taken the photo, matching the last saved location information with the photographed photo, and then adding a location tag to the corresponding photo according to the last saved location information.
  • the communication module 510 sends the last location information returned by the smart phone 500, or the acquired location information returned by the smart phone 500, according to the returned location information, And some or all of the information included in the positioning request, and the information that the photographing terminal has taken the photo, matching the location information with the photograph taken.
  • the matching may be performed according to the identifier of the photo returned by the communication module 510 and the identifier of the photograph taken. If the identifier of the photo returned by the communication module 510 is consistent with the identifier of the photograph taken, the matching is successful, or according to the communication module.
  • the photographing time of the photograph returned by 510 is matched with the photographing time of the photographed photograph, and if the photographing time of the photograph returned by the communication module 510 coincides with the photographing time of the photographed photograph, the matching is successful.
  • the photographing terminal can also send the photograph taken to the third party server.
  • the positioning terminal After acquiring the location information, the positioning terminal sends at least one of the identifier of the photo in the location request or the time of photographing, and the location information to the third-party server.
  • the third-party server matches the location information with the captured photo according to the location information sent by the positioning terminal, part or all of the information included in the positioning request, and the information that the camera terminal has taken the photo, and then adds the location to the corresponding photo according to the location information. label.
  • the photographing terminal sends the photographed photograph to the positioning terminal.
  • the photographing terminal sends the photographed photograph to the positioning request sent to the positioning terminal, or the photographing terminal separately sends the photographed photograph to the positioning terminal.
  • the positioning terminal After receiving the captured photo and acquiring the location information, the positioning terminal matches the location information with the captured photo, and then adds a location tag to the corresponding photo according to the location information.
  • Solution 1 After the photo terminal and the communication module 510 of the smart phone 500 establish a connection, the photographing terminal determines whether the time difference between the current shooting and the last shooting is greater than a time threshold. If the result of the determination by the photographing terminal is less than or equal to the time threshold, the photographing terminal determines not to perform the positioning. Therefore, the photographing terminal determines that it is not necessary to send a positioning request to the smartphone 500, but obtains the latest from the memory. The saved location information matches the captured photo, and the location tag is added to the corresponding photo based on the last saved location information.
  • the photographing terminal determines that it is necessary to send a positioning request to the smartphone 500 and transmits a positioning request to the smart phone 500.
  • the processor 580 determines whether the displacement of the smart phone 500 is greater than the displacement threshold within a time period between receiving the positioning request and receiving the last positioning request. If the result of the determination by the processor 580 of the smartphone 500 is less than or equal to the displacement threshold, the processor 580 determines not to perform the positioning.
  • the smart phone 500 transmits, by the communication module 510, the notification that no positioning is performed to the photographing terminal, and at least one of the identification of the photo in the positioning request or the time of photographing; or the smart phone 500 transmits the last time to the photographing terminal through the communication module 510.
  • Location information and at least one of an identification of a photo in the location request or a time of photographing. If the result of the processor 580 of the smartphone 500 determines that the result is greater than the displacement threshold, then it is determined to perform the positioning.
  • the positioning module 570 of the smart phone 500 can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information.
  • the positioning module 570 After acquiring the current location information, the positioning module 570 sends the current location information to the camera terminal for matching and adding a label through the communication module 510, or the positioning module 570 obtains the current location information, and then sends the current location information to the communication module 510.
  • the third-party server sends the current location information to the third-party server for matching and tagging. For details, refer to the foregoing embodiment, and the description is not repeated here.
  • the photographing terminal determines whether the time difference between the current shooting and the last shooting is greater than a time threshold. If the result of the photo terminal determination is less than or equal to the time threshold, the photographing terminal determines No positioning is required. The photographing terminal does not send a positioning request to the smart phone 500, but obtains the last saved position information from the memory to match the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the time threshold, the photographing terminal further judges the current entry. Whether the displacement of the photographing terminal is greater than the displacement threshold during the time between the line shooting and the last shooting.
  • the photographing terminal determines not to perform the positioning.
  • the photographing terminal determines that it is not necessary to send a positioning request to the smart phone 500, but obtains the last saved position information from the memory and matches the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the displacement threshold, the photographing terminal determines that the positioning needs to be performed, and sends a positioning request to the smart phone 500.
  • the camera terminal sends a location request to the smartphone 500.
  • the positioning module 570 can directly locate the current location information according to the specified positioning manner, or select the positioning according to the remaining power of the smart phone 500 or the current environment of the positioning terminal. The way to locate to get the current location information.
  • the location module 570 of the smart phone 500 obtains the current location information
  • the current location information is sent to the camera terminal through the communication module 510 for matching and tagging, or the positioning module 570 obtains the current location information and passes the
  • the communication module 510 sends the current location information to the third-party server and sends the information to the third-party server for matching and tagging. For details, refer to the foregoing embodiment, and the description is not repeated here.
  • Solution 3 After the photo terminal and the smart phone 500 establish a connection, the photographing terminal judges whether the displacement of the photographing terminal is greater than the displacement threshold in the time period during which the photographing terminal performs the photographing and the last photographing. If the result of the determination by the photographing terminal is less than or equal to the displacement threshold, the photographing terminal determines not to perform the positioning, so the photographing terminal determines that it is not necessary to send the positioning request to the smart phone 500, but obtains the last saved position information from the memory and has The captured photos match, and then add a location tag to the corresponding photo based on the last saved location information.
  • the photographing terminal determines that it is necessary to send a positioning request to the smart phone 500, and sends a positioning request to the smart phone 500.
  • the communication module of the smart phone 500 determines whether the time difference between receiving the positioning request and receiving the last positioning request is less than a time threshold by the processor 580. If the result of the processor 580 determination is less than or equal to the time threshold, then it is determined that no positioning is to be performed.
  • the Smartphone 500 Sending, by the communication module 510, a notification that no positioning is performed to the photographing terminal, and at least one of the identification of the photo in the positioning request or the time of photographing; or the smart phone 500 transmits the last position information to the photographing terminal through the communication module 510, And at least one of an identification of a photo in the location request or a time of photographing. If the result of the processor 580 determination is greater than the time threshold, then it is determined to perform the positioning.
  • the positioning module 570 can perform positioning according to the specified positioning manner to obtain the current location information, and can also perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information.
  • the positioning module 570 After acquiring the current location information, the positioning module 570 sends the current location information to the camera terminal for matching and adding a label through the communication module 510, or the positioning module 570 obtains the current location information, and then sends the current location information to the communication module 510.
  • the third-party server sends the current location information to the third-party server for matching and tagging. For details, refer to the foregoing embodiment, and the description is not repeated here.
  • the above-mentioned embodiment takes the smart phone of the positioning terminal as an example.
  • the positioning terminal is a navigator, a tablet computer, etc.
  • the hardware structure of the positioning terminal will be different, and details are not described herein again.
  • the smart phone receives the positioning request sent by the camera terminal, and the smart phone transmits the positioning request sent by the camera terminal.
  • the smart phone and/or the camera terminal determine that it is really necessary to perform positioning, the smart phone can obtain the current location information by positioning, thereby effectively reducing the power consumption of the smart phone.
  • FIG. 6 is a schematic structural diagram of a camera terminal provided by the present application.
  • the camera terminal is a terminal having a photographing and communication function, including but not limited to a digital camera, a smart phone, a tablet computer, and the like.
  • the photographing terminal 600 of the embodiment includes a photographing module 610, a processor 620, a memory 630, a display module 640, an audio module 650, an interface module 660, a communication module 670, a charging module 680, and a power management module 690.
  • the capture module 610 includes a sensor that can convert an optical signal into an electrical signal.
  • the photographing module 610 includes a charge-coupled device (CCD) sensor that senses light through a photodiode and induces a charge generation. Thereafter, the parallel signal accumulator temporarily stores the induced charge, in parallel.
  • the signal register transfers the charge temporarily stored in the parallel signal accumulator to the signal amplifier for amplification, and the analog-to-digital converter converts the electric signal composed of the amplified electric charge into a digital signal for processing by the photographing module 610.
  • the CCD sensor in the imaging module 610 may be replaced by a Complementary Metal Oxide Semiconductor (CMOS) sensor or the like.
  • CMOS Complementary Metal Oxide Semiconductor
  • the processor 620 is a control center of the photographing terminal 600, and connects various parts of the entire photographing terminal 600 by various interfaces and lines, by running or executing software programs and/or modules stored in the memory 630, and calling them in the memory 630.
  • the data performs various functions and processing data of the photographing terminal 600, thereby performing overall monitoring of the photographing terminal 600.
  • the processor 620 can be an integrated chip.
  • the processor 620 can be a general purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or the like. Programmable logic devices and more.
  • the processor 620 may include one or more processing units; preferably, the processor 180 may integrate a Moving Pictures Experts Group-4 (MPEG-4) processor, and the MPEG-4 processor is mainly Processing compression encoding of audio and video. It can be understood that the above MPEG-4 processor may not be integrated into the processor 620.
  • MPEG-4 Moving Pictures Experts Group-4
  • the memory 602 can be used to store software programs and modules, and the processor 620 executes various functional applications and data processing of the photographing terminal 600 by running software programs and modules stored in the memory 630.
  • the memory 630 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data (such as audio data, image data, etc.) created according to the use of the photographing terminal 600, and the like.
  • the memory 630 can include a high speed random access memory.
  • Non-volatile memory may also be included, such as at least one flash memory device, or other volatile solid state memory device.
  • the display module 640 can be used to display pictures, videos, and function menus of the photographing terminal 600 collected by the user through the photographing module 610.
  • the display module 640 may include a display panel.
  • the display panel may be an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the display module 640 may further include a touch panel, and the touch panel may cover the display panel. After the touch panel detects a touch operation on or near the touch panel, the touch panel transmits to the processor 620 to determine the type of the touch event, and then The processor 620 provides a corresponding visual output on the display panel depending on the type of touch event.
  • the input and display functions of the camera terminal 600 can be implemented by integrating the touch panel with the display panel.
  • the audio circuit 650 includes an audio processing circuit and a speaker, wherein the audio processing circuit can convert the audio data collected by the shooting module 610 into an electrical signal and then transmit it to a speaker, and the speaker 561 converts the electrical signal into a sound signal output.
  • the interface module 660 is generally a USB interface module.
  • the USB interface module includes a data differential line, and can transmit audio data and video data collected by the shooting module 610 to an external device such as a computer.
  • the communication module 670 may be any one of a wireless communication module that implements communication with the outside, such as a Wi-Fi module, a Bluetooth module, a GPRS module, or the like, or is a wired communication module such as a serial port module, a USB module, or the like.
  • a wireless communication module that implements communication with the outside
  • a Wi-Fi module such as a Wi-Fi module, a Bluetooth module, a GPRS module, or the like
  • a wired communication module such as a serial port module, a USB module, or the like.
  • the camera terminal 600 also includes a charging module 680 and a power management module 690.
  • An external power source can be charged to the power management module 690 via the charging module 680. After the power management module 690 is charged, power is supplied to each module inside the camera terminal.
  • the power management module 690 can be logically coupled to the processor 620 to implement functions such as managing charging, discharging, and power consumption through the power management module 690.
  • the photographing terminal 600 may further include an SD card or the like, which is not specifically limited herein.
  • the communication connection between the camera terminal 600 and the positioning terminal can be established by wireless or wired.
  • the positioning terminal and the camera terminal can be connected by wireless means such as Wi-Fi, Bluetooth, cellular, etc., or can be transmitted and received by universal asynchronous transmission.
  • a communication connection is established by a wired method such as a Universal Asynchronous Receiver/Transmitter (UART), a network port, or a Universal Serial Bus (USB).
  • UART Universal Asynchronous Receiver/Transmitter
  • USB Universal Serial Bus
  • the connection between the positioning terminal and the camera terminal is the same as that in the prior art, and details are not described herein again.
  • the distance between the positioning terminal and the photographing terminal 600 does not exceed a preset threshold.
  • the preset threshold may be set according to the actual needs according to the actual needs. The setting needs to ensure that the positioning between the positioning terminal and the photographing terminal 600 and the position where the positioning terminal is positioned as the position of the photographing terminal 600 are not seriously deficient. Accept it.
  • the processor 620 of the camera terminal 600 instructs the communication module 610 to establish a communication connection by using a wireless or wired manner.
  • the communication module 610 can establish a communication connection by wireless means such as Wi-Fi, Bluetooth, cellular, or the like.
  • a wired connection such as a Universal Asynchronous Receiver/Transmitter (UART), a network port, or a Universal Serial Bus (USB) establishes a communication connection.
  • UART Universal Asynchronous Receiver/Transmitter
  • USB Universal Serial Bus
  • the positioning terminal sends the exchange information to the communication module 610 of the photographing terminal 600, wherein the exchange information may be a character pre-agreed by the positioning terminal and the photographing terminal 600.
  • the communication module 610 sends the exchange information to the processor 620.
  • the processor 620 calculates the distance between the photographing terminal and the positioning terminal 600 by exchanging information from the positioning terminal to the time received by the communication module 610. The distance between the photographing terminal and the positioning terminal 600 is equal to the time between the issuance of the positioning terminal and the reception by the photographing terminal 600 multiplied by the speed at which the information is transmitted.
  • the processor 620 calculates that the distance between the positioning terminal and the photographing terminal 600 is less than a preset threshold, the processor 620 instructs the display module 640 to display the prompting interface.
  • the prompt interface includes an allow button and a disallow button. If used The user selects the allow button by clicking the touch panel, and the processor 620 allows the communication module 610 to send a request location to the location terminal. If the user selects the disallow button by clicking the touch panel, the processor 620 does not allow the communication module 610 to locate the location. The terminal sends a request for location.
  • the preset threshold can be set according to the actual needs according to the actual needs. The setting needs to ensure that the positioning between the positioning terminal and the communication module 610 of the photographing terminal 600 can be normally communicated, and the position where the positioning terminal is positioned as the position of the photographing terminal 600 is not seriously deficient. It can be unacceptable.
  • the positioning terminal initiates the connection between the establishing and the photographing terminal 600
  • the photographing terminal 600 initiates the connection between the establishing and the positioning terminal.
  • the connection between the positioning terminal 600 and the photographing terminal 600 can be maintained after the power is turned on, and the connection between the positioning terminal and the photographing terminal 600 can be established even when the photographing terminal 600 needs to take a photograph, even in the photographing terminal 600.
  • the connection between the positioning terminal and the photographing terminal 600 and the like are established.
  • the processor 620 detects that the photographing module 610 performs photographing, and instructs communication.
  • Module 670 sends a location request to the positioning terminal over the established communication connection.
  • the processor 620 detects that the shooting module 610 performs shooting of the photo, the timer is started to perform timing. After the timing time expires, the processor 620 instructs the communication module 670 to send a positioning request to the positioning terminal through the established communication connection.
  • the location request may include at least one of an identifier of the photo or a time of photographing, and the location request may further include an identifier of the photographing terminal and the like.
  • the photo's logo is usually the unique code for the photo and can be used to identify the photo.
  • the time of taking a photo is the time when the user takes a photo to obtain a photo.
  • the identification of the camera terminal is usually a unique code of the camera terminal and can be used to identify the camera terminal.
  • the communication module 670 After receiving the instruction of the processor 620, the communication module 670 sends a positioning request to the positioning terminal. Further, the processor 620 instructs the memory 630 to store a photograph obtained by photographing the photograph by the photographing module 610, a photographing time, a logo of the photograph, and the like.
  • the positioning terminal receives the positioning request sent by the camera terminal, determining the receiving location first Whether the time difference between the request and the previous positioning request is greater than the time threshold, if the judgment result is less than or equal to the time threshold, determining that the positioning is not performed, and if the determination result is greater than the time threshold, further determining the receiving positioning request and receiving the last positioning request If the result of the determination is greater than or equal to the displacement threshold, the positioning is determined not to be performed. If the determination result is greater than the displacement threshold, the positioning is determined.
  • the time threshold can be set according to the needs of the user. When setting, it is only necessary to ensure that the time threshold is set small enough to be within a normal situation, within a time difference between receiving the current positioning request and receiving the last positioning request.
  • the displacement of the positioning terminal and the photographing terminal 600 is negligible.
  • the displacement threshold can be set according to the needs of the user. When setting, the displacement between the positioning terminal and the photographing terminal 600 can be neglected during the time period between receiving the positioning request and receiving the last positioning request, wherein the time period is It can be 10 seconds, 30 seconds or half an hour, and so on.
  • the positioning terminal can calculate the displacement of the positioning terminal by reading sensor data of one or more of the acceleration sensor, the gyro sensor, and the like. For example, the positioning terminal reads sensor data of one or more of the acceleration sensor, the gyro sensor, and the like at the time of receiving the last positioning request, and reads the acceleration sensor, the gyro sensor, and the like at the time of receiving the positioning request. One or more sensor data to calculate the displacement of the positioning terminal during the time period between two positioning requests.
  • the positioning terminal sends a notification that the positioning is not performed to the photographing terminal 600, and at least one of the identification of the photo in the positioning request or the time of photographing; or sending the last position to the photographing terminal.
  • Information and at least one of the identification of the photo in the location request or the time of the photo.
  • the location information may be latitude and longitude information, or may be address information obtained after parsing the latitude and longitude.
  • the communication module 610 of the photographing terminal 600 receives the correspondingly.
  • the positioning terminal may directly determine the positioning manner according to the specified positioning manner, and obtain current location information.
  • the positioning terminal may also perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information, so as to High positioning efficiency and power savings.
  • the specified positioning mode may be wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning A combination of any one or more of a mode, a broadcast signal positioning mode, an optical positioning mode, a computer vision positioning mode, and a GNSS positioning mode.
  • the positioning terminal selects a positioning mode according to the remaining power. Specifically, the positioning terminal determines whether the remaining power is greater than the power threshold; if the remaining power of the positioning terminal is greater than the power threshold, determining the positioning mode according to the first scanning priority; if the remaining power of the positioning terminal is less than the power threshold, pressing the second scanning first
  • the level determines the positioning method.
  • the power threshold can be set as needed.
  • the first scan priority and the second scan priority are used to indicate the ordering of the priority levels of the positioning modes. When the positioning mode is determined according to the first scanning priority or the second scanning priority, the positioning mode with the highest priority is selected first. If the positioning mode with the highest priority cannot be used, the positioning mode with the second highest priority is used, and so on.
  • the first scanning priority is different from the second scanning priority, and the positioning manner in the first scanning priority may be different from the positioning manner in the second scanning priority, or may be the positioning manner in the first scanning priority.
  • the positioning manner in the second scanning priority is the same, but the priority of the positioning mode in the first scanning priority is different from the priority of the positioning mode in the second scanning priority.
  • the priority levels of the positioning modes in the first scanning priority are arranged in descending order of the accuracy of the positioning mode, and the priority levels of the positioning modes in the second scanning priority are arranged in ascending order according to the power consumption of the positioning mode.
  • the GNSS positioning method has the highest positioning accuracy, the largest power consumption, the lowest positioning accuracy of the cellular positioning mode, and the lowest power consumption, and the Wi-Fi positioning mode is centered. Therefore, the first scanning priority is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode.
  • the first power threshold and the second power threshold are used to divide the power into three regions, and the positioning terminal determines which region the remaining power falls into, if the remaining power of the positioning terminal falls within the first power. The interval of the threshold is determined according to the first scanning priority.
  • the positioning mode is determined according to the second scanning priority level, and the remaining power of the positioning terminal is determined. If the interval falls below the first power threshold and is greater than the second power threshold, the positioning mode is determined according to the third scan priority level.
  • the first scanning priority positioning mode is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode
  • the second scanning priority positioning mode is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode
  • the third scanning priority positioning mode is Wi-Fi positioning mode->GNSS positioning mode->cellular positioning mode.
  • the positioning terminal selects a positioning mode according to the current environment. Specifically, the positioning terminal determines whether the current environment is indoors or outdoors. The positioning terminal can determine whether the current environment of the positioning terminal is indoors or outdoors by reading and analyzing at least one of sensor data such as a light sensor, a barometer, and a temperature sensor. If the current environment of the positioning terminal is indoor, the positioning method suitable for indoor positioning is adopted, for example, Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, and radio frequency tag positioning mode.
  • At least one of Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode, optical positioning mode, computer vision positioning mode, and the like acquires current location information; if the current environment of the positioning terminal is outdoor, it is suitable for outdoor use.
  • the positioning method of positioning for example, using GNSS positioning method or the like to obtain current location information.
  • the positioning terminal opens the positioning module, so that the power supply supplies power to the positioning module. After obtaining the current location information, the positioning module is closed, so that the power supply cannot be located. The module is powered.
  • the positioning terminal sends at least one of the identifier of the photo in the location request or the time of the photographing to the photographing terminal 600, and the location information acquired by the positioning module.
  • the communication module 610 of the photographing terminal 600 receives the correspondingly.
  • the photo terminal 600 After receiving the notification that the positioning is not performed, the communication module 610 transmits a notification that the positioning is not performed to the processor 620.
  • the processor 620 acquires, from the memory 630, the location information that was saved last time before transmitting the location request, and according to the identifier of the photo returned by the communication module 610 and/or the shooting time of the photo, and the information that the photo terminal has taken the photo, the last time
  • the saved location information matches the captured photo, wherein the information of the photo includes the logo of the photo and/or the shooting time of the photo, and the like.
  • the processor 620 adds a location tag to the corresponding photo according to the last saved location information.
  • the head file of the photo usually includes a plurality of different labels for recording shooting time, shutter speed, exposure compensation, focal length and position information, and the like.
  • a location tag is a tag in a header file of a photo that is specifically used to record location information.
  • a location tag is a tag specifically used to record global positioning data in an Exchangeable Image File (EXIF).
  • EXIF Exchangeable Image File
  • the positioning terminal may also determine not to feed back any information to the camera terminal 600.
  • the communication module 610 of the camera terminal 600 does not receive any information fed back by the positioning terminal for a period of time, and notifies the processor 620 to obtain, from the memory 630, the last saved location information before transmitting the positioning request, and according to the communication module.
  • the photo of the photo returned by 610 and/or the shooting time of the photo, and the information of the photo taken by the photo terminal match the last saved location information with the photographed photo, and then add the corresponding photo according to the last saved location information. Location tag.
  • the communication module 610 will receive the last time.
  • the location information or the obtained location information is sent to the processor 620.
  • the processor 620 matches the location information with the captured photo according to the returned last location information or the acquired location information, and some or all of the information included in the location request, and the information that the camera terminal has taken the photo.
  • the processor 620 can match according to the identifier of the photo returned by the communication module 610 and the identifier of the photograph taken, if the logo of the photo returned by the communication module 610 and the photographed If the identification of the photo is consistent, the matching is successful, or, according to the shooting time of the photo returned by the communication module 610 and the shooting time of the taken photo, if the shooting time of the photo returned by the communication module 610 and the shooting time of the taken photo Consistent, the match is successful.
  • the processor 620 can also perform matching according to the identification of the photo and the shooting time of the photo at the same time. If the shooting time of the photo is the same as the shooting time of the photographed photo and the photographing time of the photo, the matching is successful. After the matching is successful, the processor 620 adds a location tag to the corresponding photo according to the location information.
  • the photographing terminal can also send the photograph taken to the third party server through the communication module 610.
  • the positioning terminal After acquiring the location information, the positioning terminal sends at least one of the identifier of the photo in the location request or the time of photographing, and the location information to the third-party server.
  • the third-party server matches the location information with the captured photo according to the location information sent by the positioning terminal, part or all of the information included in the positioning request, and the information that the camera terminal has taken the photo, and then adds the location to the corresponding photo according to the location information. label.
  • the photographing terminal sends the photographed photograph to the positioning terminal.
  • the photographing terminal sends the photographed photograph to the positioning request sent to the positioning terminal, or the photographing terminal separately sends the photographed photograph to the positioning terminal.
  • the positioning terminal After receiving the captured photo and acquiring the location information, the positioning terminal matches the location information with the captured photo, and then adds a location tag to the corresponding photo according to the location information.
  • Solution 1 After the communication module 610 and the positioning terminal of the photographing terminal 600 establish a connection, the processor 620 of the photographing terminal 600 determines whether the time difference between the current shooting and the last shooting is greater than a time threshold. If the result of the processor 620 of the camera terminal 600 determines that the result is less than or equal to the time threshold, the processor 620 determines not to perform positioning. Therefore, the processor 600 determines that it is not necessary to send a positioning request to the positioning terminal through the communication module 610, but obtains the last saved location information from the memory 630 to match the captured photo, and then correspondingly according to the last saved location information. Add a location tag to the photo.
  • the photographing terminal 600 determines whether the displacement of the positioning terminal is greater than the displacement threshold by determining the time period between receiving the positioning request and receiving the previous positioning request. If the judgment result obtained by the positioning terminal is less than or equal to the displacement threshold, it is determined that the positioning is not performed.
  • the positioning terminal sends the notification to the photographing terminal 600 that no positioning is performed, and at least one of the identification of the photo in the positioning request or the time of photographing; or the positioning terminal sends the last position information to the photographing terminal 600, and the positioning request At least one of the logo of the photo or the time of photographing. If the result of the positioning terminal judgment is greater than the displacement threshold, it is determined to perform positioning.
  • the locating terminal can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information.
  • the positioning module After obtaining the current location information, the positioning module sends the current location information to the camera terminal for matching and adding a label, or after the positioning module obtains the current location information, the positioning terminal sends the current location to the third-party server.
  • the information is sent to a third-party server for matching and labeling.
  • Solution 2 After the camera terminal 600 and the positioning terminal establish a connection, the processor 620 determines whether the time difference between the current shooting and the last shooting is greater than a time threshold, and if the result of the processor 620 is less than or equal to the time threshold, then determining No positioning is required. The processor 620 does not need to instruct the communication module 610 to send a positioning request to the positioning terminal, but obtains the last saved location information from the memory 630 to match the captured photo, and then adds a location to the corresponding photo according to the last saved location information. label. If the result of the determination by the processor 620 is greater than the time threshold, the processor 620 further determines whether the displacement of the photographing terminal 600 is greater than the displacement threshold during the time period between the current shooting and the last shooting.
  • the processor 620 determines not to perform the positioning.
  • the processor 620 determines that it is not necessary to send a positioning request to the positioning terminal, but obtains the last saved location information and the taken photo from the memory 630. The slice is matched, and then the location tag is added to the corresponding photo according to the last saved location information. If the result of the determination by the processor 620 is greater than the displacement threshold, the processor 620 determines that positioning is required and sends a positioning request to the positioning terminal via the communication module 610.
  • the photographing terminal 600 transmits a positioning request to the positioning terminal through the communication module 610.
  • the positioning module can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location. location information.
  • the positioning terminal After obtaining the current location information, the positioning terminal sends the current location information to the camera terminal 600 for matching and adding a label, or after the positioning module obtains the current location information, the positioning terminal sends the current location to the third-party server.
  • the location information is sent to a third-party server for matching and tagging. For details, refer to the foregoing embodiment, and the description is not repeated here.
  • Solution 3 After the photographing terminal 600 and the positioning terminal establish a connection, the processor 620 determines whether the displacement of the photographing terminal 600 is greater than the displacement threshold in the period during which the photographing is performed and the photographing is performed last time. If the result of the processor 620 determines that the result is less than or equal to the displacement threshold, the processor 620 determines not to perform the positioning, so the processor 620 determines that the positioning request does not need to be sent to the positioning terminal through the communication module 610, but instead obtains the latest from the memory 630. The saved location information matches the captured photo, and the location tag is added to the corresponding photo based on the last saved location information.
  • the processor 620 determines that a positioning request needs to be sent to the positioning terminal through the communication module 610, and transmits a positioning request to the positioning terminal through the communication module 610. After receiving the positioning request, the positioning terminal determines whether the time difference between receiving the positioning request and receiving the last positioning request is less than a time threshold. If the result of the judgment is less than or equal to the time threshold, it is determined that the positioning is not performed.
  • the positioning terminal transmits to the camera terminal 600 a notification that no positioning is performed, and at least one of the identification of the photo in the positioning request or the time of photographing; or the positioning terminal transmits the last location information to the photographing terminal 600, and the positioning request At least one of the identification of the photo or the time of photographing. If the result of the judgment is greater than the time threshold, it is determined to perform the positioning.
  • the positioning module can directly locate the current location information according to the specified positioning manner, or according to the positioning terminal. The remaining power or the current environment of the positioning terminal selects the positioning mode to locate the current location information. After acquiring the current location information, the positioning module sends the current location information to the camera terminal 600.
  • the camera terminal 600 After receiving the current location information through the communication module 610, the camera terminal 600 transmits the current location information to the processor 620.
  • the processor 620 performs matching and adding a label according to the current location information.
  • the positioning module After obtaining the current location information, the positioning module sends the current location information to the third-party server and sends the label to the third-party server for matching and adding labels. Referring to the above embodiments, the description will not be repeated here.
  • the positioning scheme is specifically for the camera terminal to perform the positioning to provide the location information.
  • the technical solution proposed by the present application is compared with the prior art, and only the positioning terminal receives the positioning request sent by the camera terminal. Moreover, when the positioning terminal and/or the photographing terminal determine that the positioning is really needed, the positioning terminal obtains the current location information by positioning, thereby effectively reducing the power consumption of the positioning terminal.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

This invention discloses a method, apparatus and equipment for providing and obtaining location information. The method comprises: a positioning terminal establishes a connection with a photographing terminal, wherein the positioning terminal establishes a connection with the photographing terminal, wherein the distance between the positioning terminal and the photographing terminal does not exceed a preset threshold. The positioning terminal receives a positioning request transmitted by the photographing terminal through the connection. The positioning terminal determines at least one of the following: whether the time difference between the positioning request received by the positioning terminal and the last positioning request is greater than a time threshold; whether the displacement amount of the positioning terminal is greater than a displacement threshold for the time period between the positioning request received by the positioning terminal and the previous request for positioning. The determination of whether or not to perform positioning is based on the result of the judgment. The current position information is acquired only when the determination is made, and the current position information, as well as part, or all of the information included in the positioning request, is transmitted to the photographing terminal through the connection. The above method can reduce the power consumption of the positioning terminal.

Description

提供、获取位置信息的方法、装置以及设备Method, device and device for providing and obtaining location information 技术领域Technical field
本发明涉及智能终端领域,尤其涉及一种提供、获取位置信息的方法、装置以及设备。The present invention relates to the field of intelligent terminals, and in particular, to a method, device and device for providing and acquiring location information.
背景技术Background technique
在照片中添加位置标签对于用户而言具有十分重要的意义,例如,用户可以根据照片的位置标签对照片进行分类整理,或者根据位置标签对照片进行分享,或者,根据照片的位置标签将照片与地图结合,以建立旅行足迹等等。Adding a location tag to a photo is very important to the user. For example, the user can sort the photo based on the location tag of the photo, or share the photo based on the location tag, or, based on the location tag of the photo, Maps are combined to build travel trails and more.
要为照片添加位置标签,则必须获取拍摄照片时的位置信息。在获取到拍摄照片时的位置信息后,再根据拍摄照片时的位置信息为拍摄的照片添加位置标签。但是,目前大多拍照终端并没有定位功能,无法获取拍摄照片时的位置信息。所以,拍照终端只能与用户携带的定位终端进行连接,并利用定位终端的定位功能来获取拍摄照片时的位置信息。具体地,拍照终端与定位终端建立连接后,令拍照终端和移动终端的时间一致,然后,拍照终端正常进行拍摄操作,其中,拍照终端在拍照时会记录拍照的时间,而移动终端则一直开启定位功能,并按照设定的时间间隔记录间隔点的时间以及间隔点的时间对应的位置信息,最后,将拍照终端拍摄照片时的时间与移动终端记录的间隔点的时间进行对比,以获得与拍照终端拍摄照片时的时间最接近的间隔点的时间对应的位置信息,并根据最接近的间隔点的时间对应的位置信息为拍摄的照片添加位置标签。To add a location tag to your photo, you must get the location information when you took the photo. After obtaining the position information at the time of taking the photo, the position label is added to the photographed photo according to the position information at the time of taking the photo. However, at present, most camera terminals do not have a positioning function, and it is impossible to obtain the location information when taking a photo. Therefore, the camera terminal can only connect with the positioning terminal carried by the user, and uses the positioning function of the positioning terminal to obtain the location information when the photo is taken. Specifically, after the photo terminal establishes a connection with the positioning terminal, the time of the photographing terminal and the mobile terminal are consistent, and then the photographing terminal performs the photographing operation normally, wherein the photographing terminal records the photographing time when photographing, and the mobile terminal is always turned on. Positioning function, and recording the time of the interval point and the position information corresponding to the time of the interval point according to the set time interval. Finally, comparing the time when the photographing terminal takes the photo with the time of the interval recorded by the mobile terminal to obtain The position information corresponding to the time of the closest interval when the photographing terminal takes the photograph, and the position label is added to the photographed photograph according to the position information corresponding to the time of the closest interval point.
在这种方式下,定位终端必须一直进行定位,从而导致消耗了定位终端的 较多的电量。In this way, the positioning terminal must always be positioned, resulting in the consumption of the positioning terminal. More electricity.
发明内容Summary of the invention
本申请所要解决的技术问题在于,提供一种提供、获取位置信息的方法、装置以及设备,能够减少定位终端的电量的消耗。The technical problem to be solved by the present application is to provide a method, device and device for providing and acquiring location information, which can reduce the consumption of power of the positioning terminal.
第一方面,提供了一种提供位置信息的方法,包括如下步骤:定位终端建立与拍照终端之间的连接,其中,所述定位终端与所述拍照终端之间的距离不超过预设阈值;所述定位终端接收所述拍照终端通过所述连接发送的定位请求,其中,所述定位请求包括所述拍照终端拍摄的照片的标识或者拍照的时间中的至少一个;所述定位终端判断以下至少一个:所述定位终端接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述定位终端接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值;根据判断的结果确定是否进行定位;仅当确定进行定位时,获取当前的位置信息,并通过所述连接向所述拍照终端发送所述当前的位置信息,和所述定位请求包括的部分或全部信息。A first aspect, a method for providing location information, including the following steps: a positioning terminal establishes a connection with a camera terminal, wherein a distance between the positioning terminal and the camera terminal does not exceed a preset threshold; The positioning terminal receives the positioning request sent by the photographing terminal through the connection, wherein the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing; the positioning terminal determines at least the following a: the time difference between the positioning terminal and the last positioning request is greater than a time threshold; and the displacement of the positioning terminal in the time period when the positioning terminal receives the positioning request and the last positioning request Whether it is greater than the displacement threshold; determining whether to perform positioning according to the result of the judgment; acquiring the current location information only when determining to perform positioning, and transmitting the current location information to the photographing terminal through the connection, and the positioning request Some or all of the information included.
针对于在拍照终端进行拍摄时,定位终端为拍照终端进行定位并提供位置信息的场景,本申请提出的技术方案与现有技术相比,只有在定位终端接收到拍照终端发送的定位请求,并且,定位终端和/或拍照终端经过判断确定确实需要进行定位时,定位终端才会通过定位获取当前的位置信息,有效减少了定位终端的电量的消耗。Compared with the prior art, only the positioning terminal receives the positioning request sent by the photographing terminal, and the positioning terminal receives the positioning request sent by the photographing terminal, and the photographing terminal performs the photographing of the photographing terminal. When the positioning terminal and/or the photographing terminal determine that the positioning is really needed, the positioning terminal obtains the current location information by positioning, thereby effectively reducing the power consumption of the positioning terminal.
结合第一方面,第一方面的第一种可能的实施方式中,所述定位终端获取当前的位置信息之前还包括:判断所述定位终端的剩余电量是否大于电量阈值;若所述定位终端的剩余电量大于电量阈值,则按第一扫描优先级确定定位方式;若所述定位终端的剩余电量小于电量阈值,则按第二扫描优先级确定定位方式,其中,所述第一扫描优先级不同于所述第二扫描优先级。 With reference to the first aspect, in a first possible implementation manner of the first aspect, before the acquiring, by the positioning terminal, the current location information, the method further includes: determining whether the remaining power of the positioning terminal is greater than a power threshold; If the remaining power is greater than the power threshold, the positioning mode is determined according to the first scanning priority; if the remaining power of the positioning terminal is less than the power threshold, the positioning mode is determined according to the second scanning priority, where the first scanning priority is different. The second scan priority.
第一方面的第一种可能的实施方式能够根据剩余的电量决定选择第一扫描优先级或者第二扫描优先级,从而使得所选择的定位方式更贴合剩余电量的现状。The first possible implementation manner of the first aspect is capable of determining the first scan priority or the second scan priority according to the remaining power amount, so that the selected positioning mode is more suitable for the current state of the remaining power.
结合第一方面,第一方面的第二种可能的实施方式中,所述定位终端获取当前的位置信息之前还包括:判断所述定位终端的当前环境是室内还是室外;若所述定位终端的当前环境为室内,采用无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式中的至少一种获取当前的位置信息;若所述定位终端的当前环境为室外,采用全球导航卫星系统GNSS定位方式获取当前的位置信息。With reference to the first aspect, in a second possible implementation manner of the first aspect, before the acquiring, by the positioning terminal, the current location information, the method further includes: determining whether the current environment of the positioning terminal is indoors or outdoors; The current environment is indoor, using wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, At least one of a broadcast signal positioning mode, an optical positioning mode, and a computer vision positioning mode acquires current location information; if the current environment of the positioning terminal is outdoor, the global navigation satellite system GNSS positioning mode is used to acquire current location information.
第一方面的第二种可能的实施方式能够根据当前的环境是室内还是室外,选择合适当前的定位方式,避免因为环境的影响而导致定位不成功,从而提高定位的可靠性。The second possible implementation manner of the first aspect can select an appropriate current positioning manner according to whether the current environment is indoors or outdoors, and avoid unsuccessful positioning due to environmental influences, thereby improving positioning reliability.
结合第一方面或第一方面的第一种可能的实施方式或第一方面的第二种可能的实施方式,第一方面的第三种可能的实施方式中,所述定位终端判断以下至少一个:所述定位终端接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述定位终端接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值,根据判断的结果确定是否进行定位具体为:所述定位终端判断所述定位终端接收所述定位请求和接收上一次定位请求的时间差是否大于时间阈值;若所述定位终端接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,则判断所述定位终端接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移是否大于位移阈值;若所述定位终端的位移大于位移阈值,则确定进行定位。With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect, the positioning terminal determines at least one of the following Whether the time difference between the positioning request and the last positioning request is greater than a time threshold; whether the displacement of the positioning terminal is within a time period during which the positioning terminal receives the positioning request and the last positioning request And determining, by the positioning terminal, whether the positioning is performed according to the result of the determining is: the positioning terminal determines whether the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request is greater than a time threshold; if the positioning terminal receives the If the time difference between the positioning request and the last positioning request is greater than the time threshold, determining whether the displacement of the positioning terminal is greater than the displacement threshold in the time period between the positioning request and the receiving the previous positioning request; If the displacement of the positioning terminal is greater than the displacement threshold, it is determined to perform positioning.
第一方面的第三种可能的实施方式,通过先判断较容易判断的定位终端接 收定位请求和上一次定位请求的时间差是否大于时间阈值,后判断在定位终端接收定位请求和上一次定位请求的时间段内,定位终端的位移量是否大于位移阈值,如果定位终端接收定位请求和上一次定位请求的时间差大于时间阈值,则无需再判断在定位终端接收定位请求和上一次定位请求的时间段内,定位终端的位移量是否大于位移阈值,从而减少判断的复杂度。The third possible implementation manner of the first aspect is to determine the positioning terminal that is easier to judge by first judging Whether the time difference between the location request and the previous location request is greater than a time threshold, and then determining whether the displacement of the positioning terminal is greater than a displacement threshold during the time period in which the positioning terminal receives the positioning request and the last positioning request, if the positioning terminal receives the positioning request and If the time difference of the last positioning request is greater than the time threshold, it is not necessary to determine whether the displacement of the positioning terminal is greater than the displacement threshold during the time period in which the positioning terminal receives the positioning request and the last positioning request, thereby reducing the complexity of the judgment.
结合第一方面的第三种可能的实施方式,第一方面的第四种可能的实施方式中,所述方法还包括:若所述定位终端接收所述定位请求和接收上一次定位请求的时间差小于或等于时间阈值,则确定不进行定位;或,若所述定位终端接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,且,所述定位终端接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移小于或者等于位移阈值,则确定不进行定位。With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes: if the positioning terminal receives the positioning request and receives a time difference of a previous positioning request If the time threshold is less than or equal to the time threshold, it is determined that the positioning is not performed; or if the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request is greater than a time threshold, and the positioning terminal receives the positioning request and receiving If the displacement of the positioning terminal is less than or equal to the displacement threshold during the time period between the positioning requests, it is determined that the positioning is not performed.
结合第一方面或第一方面的第一种至第四种可能的实施方式中的任一种,第一方面的第五种可能的实施方式中,所述方法还包括:若确定不进行定位,向所述拍照终端发送没有进行定位的通知,以及所述定位请求中的照片的标识或者拍照的时间中的至少一个;或,向所述拍照终端发送上一次的位置信息,以及所述定位请求中的照片的标识或者拍照的时间中的至少一个。With reference to the first aspect, or any one of the first to fourth possible embodiments of the first aspect, in a fifth possible implementation manner of the first aspect, the method further includes: if it is determined not to perform the positioning Sending, to the photographing terminal, a notification that no positioning is performed, and at least one of an identification of a photo in the positioning request or a time of photographing; or sending the last position information to the photographing terminal, and the positioning At least one of the identification of the photo in the request or the time of photographing.
结合第一方面或第一方面的第一种至第五种可能的实施方式中的任一种,第一方面的第六种可能的实施方式中,所述定位终端获取当前的位置信息之前,包括开启所述定位模块;所述定位终端获取当前的位置信息之后,包括关闭所述定位模块。With reference to the first aspect, or any one of the first to fifth possible implementation manners of the first aspect, in the sixth possible implementation manner of the first aspect, before the positioning terminal acquires the current location information, The method includes: enabling the positioning module; after acquiring the current location information, the positioning terminal includes: closing the positioning module.
第一方面的第六种可能的实施方式,能够在定位终端获取当前的位置信息之前开启定位模块,在定位终端获取当前的位置信息之后关闭定位模块,能够有效地减少定位终端的耗电量。The sixth possible implementation manner of the first aspect, the positioning module can be enabled before the positioning terminal acquires the current location information, and the positioning module is closed after the positioning terminal acquires the current location information, which can effectively reduce the power consumption of the positioning terminal.
结合第一方面或第一方面的第一种至第六种可能的实施方式中的任一种,第一方面的第七种可能的实施方式中,所述定位终端获取当前的位置信 息之后还包括:向第三服务器发送所述位置信息,和所述定位请求包括的部分或全部信息,以供所述第三服务器根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述位置信息与所述已拍摄的照片匹配,并根据所述位置信息为对应的照片添加位置标签。With reference to the first aspect, or any one of the first to sixth possible implementation manners of the first aspect, in the seventh possible implementation manner of the first aspect, the positioning terminal acquires a current location information After the information, the method further includes: sending the location information to the third server, and part or all of the information included in the positioning request, for some or all information included by the third server according to the positioning request, and the photographing The terminal has taken the information of the photo, matches the location information with the photographed photo, and adds a location tag to the corresponding photo according to the location information.
第二方面,提供了一种获取位置信息的方法,所述方法包括:拍照终端与定位终端建立连接,所述定位终端与所述拍照终端相距不超过预设距离;确定是否需要发送定位请求;仅当确定需要发送定位请求时,所述拍照终端通过所述连接向所述定位终端发送定位请求,所述定位请求包括照片的标识和照片的拍照时间中的至少一个;若所述拍照终端接收到所述定位终端根据所述定位请求返回的位置信息,和所述定位请求包括的部分或全部信息,根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述位置信息与所述已拍摄的照片匹配;根据所述位置信息为对应的照片添加位置标签。The second aspect provides a method for obtaining location information, where the method includes: establishing a connection between the camera terminal and the positioning terminal, the positioning terminal is not more than a preset distance from the camera terminal; and determining whether a positioning request needs to be sent; The photographing terminal sends a positioning request to the positioning terminal through the connection, the positioning request includes at least one of an identifier of a photo and a photographing time of a photo, if the photographing terminal receives And the location information returned by the positioning terminal according to the positioning request, and part or all of the information included in the positioning request, according to part or all of the information included in the positioning request, and information that the photographing terminal has taken a photo, Matching the location information with the photographed photo; adding a location tag to the corresponding photo based on the location information.
本申请提出的技术方案与现有技术相比,拍照终端只有在判断需要向定位终端发送定位请求时,才会向定位终端发送定位请求,从而减少了拍照终端的通信模块的工作量,减少了拍照终端的电量的损耗。而且,定位终端的通信模块也同样减少了工作量,也减少了定位终端的电量的损耗。Compared with the prior art, the camera terminal only sends a positioning request to the positioning terminal when it is determined that the positioning request needs to be sent to the positioning terminal, thereby reducing the workload of the communication module of the camera terminal and reducing the workload. Loss of power of the camera terminal. Moreover, the communication module of the positioning terminal also reduces the workload and reduces the loss of the power of the positioning terminal.
结合第二方面,第二方面的第一种可能的实施方式中,确定是否需要发送定位请求包括:所述拍照终端判断所述拍照终端本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,若所述拍照终端本次进行拍摄和上一次进行拍摄的时间差大于时间阈值,确定需要发送定位请求,若所述拍照终端本次进行拍摄和上一次进行拍摄的时间差小于或者等于时间阈值,确定不需要发送定位请求;或者,所述拍照终端判断在所述拍照终端本次进行拍摄和上一次进行拍摄的时间段内,所述拍照终端的位移量是否大于位移阈值,若拍照终端的位移 量大于位移阈值,确定需要发送定位请求,若拍照终端的位移量小于或者等于位移阈值,确定不需要发送定位请求。With reference to the second aspect, in a first possible implementation manner of the second aspect, determining whether the location request needs to be sent includes: determining, by the photographing terminal, whether the time difference between the photographing terminal and the last shooting is greater than a time threshold. If the time difference between the photographing terminal and the last shooting is greater than the time threshold, it is determined that the positioning request needs to be sent. If the time difference between the photographing terminal and the last shooting is less than or equal to the time threshold, it is determined. The photographing terminal does not need to send a positioning request; or the photographing terminal determines whether the displacement of the photographing terminal is greater than a displacement threshold in a time period during which the photographing terminal performs the photographing and the last photographing, if the displacement of the photographing terminal The quantity is greater than the displacement threshold, and it is determined that the positioning request needs to be sent. If the displacement of the photographing terminal is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
结合第二方面以及第二方面的第一种可能的实施方式,第二方面的第二种可能的实施方式中,所述方法还包括,若收到所述定位终端没有进行定位的通知,获取发送所述定位请求之前,最近一次保存的位置信息,根据所述定位终端返回照片的标识和/或照片的拍摄时间,以及所述拍照终端已拍摄照片的信息,将所述最近一次保存的位置信息与所述已拍摄的照片匹配;根据所述最近一次保存的位置信息为对应的照片添加位置标签。With reference to the second aspect, and the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the method further includes: if receiving the notification that the positioning terminal does not perform positioning, acquiring Before the positioning request is sent, the last saved location information, according to the identifier of the photo returned by the positioning terminal and/or the shooting time of the photo, and the information that the photo terminal has taken the photo, the last saved location The information matches the photographed photograph; the location label is added to the corresponding photo based on the last saved location information.
第三方面,提供了一种提供位置信息的装置,包括:连接建立模块、接收模块、第一判断模块、确定模块以及获取发送模块,所述连接建立模块用于建立与拍照终端之间的连接,其中,所述定位终端与所述拍照终端之间的距离不超过预设阈值;所述接收模块用于接收所述拍照终端通过所述连接发送的定位请求,其中,所述定位请求包括所述拍照终端拍摄的照片的标识或者拍照的时间中的至少一个;所述第一判断模块用于判断以下至少一个:所述接收模块接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述接收模块接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值;所述确定模块用于根据判断的结果确定是否进行定位;所述获取发送模块用于仅当确定进行定位时,获取当前的位置信息,并通过所述连接向所述拍照终端发送所述当前的位置信息,和所述定位请求包括的部分或全部信息。A third aspect provides an apparatus for providing location information, including: a connection establishment module, a receiving module, a first determining module, a determining module, and an obtaining sending module, where the connection establishing module is configured to establish a connection with the photographing terminal. The receiving module is configured to receive a positioning request that is sent by the camera terminal by using the connection, where the positioning request includes the location request, where the distance between the positioning terminal and the camera terminal does not exceed a preset threshold. At least one of the identifier of the photograph taken by the photographing terminal or the photographing time; the first judging module is configured to determine at least one of the following: whether the time difference between the receiving module and the last positioning request is greater than a time threshold The determining module is configured to determine whether to perform positioning according to the result of the determining, in the time period when the receiving module receives the positioning request and the last positioning request, whether the displacement amount of the positioning terminal is greater than a displacement threshold; The acquisition sending module is configured to obtain current location information only when determining to perform positioning, and Through the transmitting terminal connected to the photographing information of the current location, the location request and information included in some or all.
针对于在拍照终端进行拍摄时,定位终端为拍照终端进行定位并提供位置信息的场景,本申请提出的技术方案与现有技术相比,只有在定位终端接收到拍照终端发送的定位请求,并且,定位终端和/或拍照终端经过判断确定确实需要进行定位时,定位终端才会通过定位获取当前的位置信息,有效减少了定 位终端的电量的消耗。Compared with the prior art, only the positioning terminal receives the positioning request sent by the photographing terminal, and the positioning terminal receives the positioning request sent by the photographing terminal, and the photographing terminal performs the photographing of the photographing terminal. When the positioning terminal and/or the photographing terminal determine that it is really necessary to perform positioning, the positioning terminal obtains the current position information by positioning, thereby effectively reducing the setting. The power consumption of the bit terminal.
结合第三方面,第三方面的第一种可能的实施方式中,所述装置还包括第二判断模块以及优先级确定模块,所述第二判断模块用于判断所述定位终端的剩余电量是否大于电量阈值;所述优先级确定模块用于在所述定位终端的剩余电量大于电量阈值时,按第一扫描优先级确定定位方式;在所述定位终端的剩余电量小于电量阈值时,按第二扫描优先级确定定位方式,其中,所述第一扫描优先级不同于所述第二扫描优先级。With reference to the third aspect, in a first possible implementation manner of the third aspect, the device further includes a second determining module and a priority determining module, where the second determining module is configured to determine whether the remaining power of the positioning terminal is When the remaining power of the positioning terminal is greater than the power threshold, the priority determining module is configured to determine the positioning mode according to the first scanning priority; when the remaining power of the positioning terminal is less than the power threshold, press the first The second scan priority determines a positioning mode, wherein the first scan priority is different from the second scan priority.
第三方面的第一种可能的实施方式能够根据剩余的电量决定选择第一扫描优先级或者第二扫描优先级,从而使得所选择的定位方式更贴合剩余电量的现状。The first possible implementation manner of the third aspect is capable of determining the first scan priority or the second scan priority according to the remaining power amount, so that the selected positioning mode is more suitable for the current state of the remaining power.
结合第三方面,第三方面的第二种可能的实施方式中,所述装置还包括第三判断模块,所述第三判断模块用于判断所述定位终端的当前环境是室内还是室外;所述获取发送模块用于在所述定位终端的当前环境为室内时,采用无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式中的至少一种获取当前的位置信息;在所述定位终端的当前环境为室外时,采用全球导航卫星系统GNSS定位方式获取当前的位置信息。With reference to the third aspect, in a second possible implementation manner of the third aspect, the device further includes a third determining module, where the third determining module is configured to determine whether the current environment of the positioning terminal is indoor or outdoor; The obtaining and sending module is configured to use a wireless fidelity Wi-Fi positioning mode, a Bluetooth positioning mode, a cellular positioning mode, a geomagnetic positioning mode, an ultrasonic positioning mode, an infrared positioning mode, and a radio frequency tag when the current environment of the positioning terminal is indoors. At least one of positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode, optical positioning mode, and computer vision positioning mode acquires current location information; when the current environment of the positioning terminal is outdoor, the current location is adopted The GNSS positioning method of the global navigation satellite system acquires current location information.
第三方面的第二种可能的实施方式能够根据当前的环境是室内还是室外,选择合适当前的定位方式,避免因为环境的影响而导致定位不成功,从而提高定位的可靠性。The second possible implementation manner of the third aspect can select an appropriate current positioning manner according to whether the current environment is indoor or outdoor, and avoid unsuccessful positioning due to the influence of the environment, thereby improving the reliability of the positioning.
结合第三方面或第三方面的第一种可能的实施方式或第三方面的第二种可能的实施方式,第三方面的第三种可能的实施方式中,所述第一判断模块用于判断所述接收模块接收所述定位请求和接收上一次定位请求的时间差是否 大于时间阈值,在所述接收模块接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,判断所述接收模块接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移是否大于位移阈值;所述确定模块用于在所述定位终端的位移大于位移阈值时,确定进行定位。With reference to the third aspect or the first possible implementation manner of the third aspect, or the second possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the first determining module is used Determining whether the time difference between the receiving module receiving the positioning request and receiving the last positioning request is If the time difference between the receiving module receiving the positioning request and receiving the last positioning request is greater than a time threshold, determining that the receiving module receives the positioning request and receiving the last positioning request, the time period is greater than a time threshold. Whether the displacement of the positioning terminal is greater than a displacement threshold; the determining module is configured to determine to perform positioning when the displacement of the positioning terminal is greater than a displacement threshold.
第三方面的第三种可能的实施方式,通过先判断较容易判断的定位终端接收定位请求和上一次定位请求的时间差是否大于时间阈值,后判断在定位终端接收定位请求和上一次定位请求的时间段内,定位终端的位移量是否大于位移阈值,如果定位终端接收定位请求和上一次定位请求的时间差大于时间阈值,则无需再判断在定位终端接收定位请求和上一次定位请求的时间段内,定位终端的位移量是否大于位移阈值,从而减少判断的复杂度。The third possible implementation manner of the third aspect, after determining whether the time difference between the positioning request and the last positioning request by the positioning terminal that is relatively easy to determine is greater than a time threshold, and then determining that the positioning terminal receives the positioning request and the last positioning request. During the time period, whether the displacement of the positioning terminal is greater than the displacement threshold, if the time difference between the positioning terminal receiving the positioning request and the last positioning request is greater than the time threshold, it is not necessary to determine that the positioning terminal receives the positioning request and the last positioning request within the time period. Whether the displacement amount of the positioning terminal is greater than the displacement threshold, thereby reducing the complexity of the judgment.
结合第三方面的第三种可能的实施方式,第三方面的第四种可能的实施方式中,所述确定模块用于在所述定位终端接收所述定位请求和接收上一次定位请求的时间差小于或等于时间阈值时,确定不进行定位;或,在所述定位终端接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,且,所述定位终端接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移小于或者等于位移阈值时,确定不进行定位。With reference to the third possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the determining module is configured to: when the positioning terminal receives the positioning request and receives a time difference of a previous positioning request When the time threshold is less than or equal to the time threshold, it is determined that the positioning is not performed; or, the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request is greater than a time threshold, and the positioning terminal receives the positioning request and receiving When the displacement of the positioning terminal is less than or equal to the displacement threshold during the time period between the positioning requests, it is determined that the positioning is not performed.
结合第三方面或第三方面的第一种至第四种可能的实施方式中的任一种,第三方面的第五种可能的实施方式中,所述获取发送模块用于在确定不进行定位时,向所述拍照终端发送没有进行定位的通知和所述定位请求中的照片的标识或者拍照的时间中的至少一个;或,向所述拍照终端发送上一次的位置信息所述定位请求中的照片的标识或者拍照的时间中的至少一个。In conjunction with the third aspect, or any one of the first to fourth possible implementation manners of the third aspect, in the fifth possible implementation manner of the third aspect, the acquiring and transmitting module is configured to determine not to perform During positioning, at least one of a notification of not performing positioning and a photo of the photo in the positioning request or a time of photographing is sent to the photographing terminal; or the positioning request of the last position information is sent to the photographing terminal. At least one of the identification of the photo in the photo or the time of photographing.
结合第三方面或第三方面的第一种至第五种可能的实施方式中的任一种,第三方面的第六种可能的实施方式中,所述装置还包括开启模块以及关闭模块,所述开启模块用于开启所述定位模块;所述关闭模块用于关闭所述定位模 块。With reference to the third aspect, or any one of the first to fifth possible implementation manners of the third aspect, in a sixth possible implementation manner of the third aspect, the device further includes an opening module and a closing module, The opening module is configured to open the positioning module; the closing module is configured to close the positioning module Piece.
结合第三方面或第三方面的第一种至第六种可能的实施方式中的任一种,第三方面的第七种可能的实施方式中,所述获取发送模块用于向第三服务器发送所述位置信息,和所述定位请求包括的部分或全部信息,以供所述第三服务器根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述位置信息与所述已拍摄的照片匹配,并根据所述位置信息为对应的照片添加位置标签。With reference to the third aspect, or any one of the first to sixth possible implementation manners of the third aspect, in the seventh possible implementation manner of the third aspect, the acquiring the sending module is used to the third server Sending the location information, and part or all of the information included in the positioning request, for the third server to include part or all of the information according to the positioning request, and information that the photographing terminal has taken a photo, The location information matches the captured photo, and a location tag is added to the corresponding photo based on the location information.
第四方面,提供了一种获取位置信息的装置,包括:连接模块、确定模块、发送模块、接收模块、匹配模块以及添加模块,所述连接模块用于与定位终端建立连接,所述定位终端与所述拍照终端相距不超过预设距离;所述确定模块用于确定是否需要发送定位请求;所述发送模块用于仅当确定需要发送定位请求时,通过所述连接向所述定位终端发送定位请求,所述定位请求包括照片的标识和照片的拍照时间中的至少一个;所述接收模块用于接收所述定位终端根据所述定位请求返回的位置信息,和所述定位请求包括的部分或全部信息;所述匹配模块用于根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述位置信息与所述已拍摄的照片匹配;所述添加模块用于根据所述位置信息为对应的照片添加位置标签。The fourth aspect provides an apparatus for acquiring location information, including: a connection module, a determining module, a sending module, a receiving module, a matching module, and an adding module, where the connecting module is configured to establish a connection with the positioning terminal, where the positioning terminal The determining module is configured to determine whether a positioning request needs to be sent, and the sending module is configured to send, by using the connection, the positioning terminal, when the location request needs to be sent. a positioning request, the positioning request includes at least one of an identifier of a photo and a photographing time of a photo; the receiving module is configured to receive location information returned by the positioning terminal according to the positioning request, and a part included in the positioning request Or all the information; the matching module is configured to match the location information with the photographed photo according to part or all of the information included in the positioning request, and information that the photographing terminal has taken a photo; the adding The module is configured to add a location tag to the corresponding photo according to the location information.
本申请提出的技术方案与现有技术相比,拍照终端只有在判断需要向定位终端发送定位请求时,才会向定位终端发送定位请求,从而减少了拍照终端的通信模块的工作量,减少了拍照终端的电量的损耗。而且,定位终端的通信模块也同样减少了工作量,也减少了定位终端的电量的损耗。Compared with the prior art, the camera terminal only sends a positioning request to the positioning terminal when it is determined that the positioning request needs to be sent to the positioning terminal, thereby reducing the workload of the communication module of the camera terminal and reducing the workload. Loss of power of the camera terminal. Moreover, the communication module of the positioning terminal also reduces the workload and reduces the loss of the power of the positioning terminal.
结合第四方面,第四方面的第一种可能的实施方式中,所述确定模块用于判断所述拍照终端本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,在所述拍照终端本次进行拍摄和上一次进行拍摄的时间差大于时间阈值 时,确定需要发送定位请求,在所述拍照终端本次进行拍摄和上一次进行拍摄的时间差小于或者等于时间阈值时,确定不需要发送定位请求;或者,所述确定模块用于判断在所述拍照终端本次进行拍摄和上一次进行拍摄的时间段内,所述拍照终端的位移量是否大于位移阈值,在拍照终端的位移量大于位移阈值时,确定需要发送定位请求,在拍照终端的位移量小于或者等于位移阈值时,确定不需要发送定位请求。With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the determining module is configured to determine whether a time difference between the photographing terminal and the last shooting is greater than a time threshold, where the photographing terminal is The time difference between this shooting and the last shooting is greater than the time threshold Determining that a positioning request needs to be sent, and determining that the positioning request does not need to be sent when the time difference between the current shooting and the last shooting is less than or equal to the time threshold; or the determining module is configured to determine Whether the displacement of the photographing terminal is greater than the displacement threshold during the time period when the photographing terminal performs the photographing and the last photographing, and when the displacement of the photographing terminal is greater than the displacement threshold, it is determined that the positioning request needs to be sent, and the displacement of the photographing terminal When the amount is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
结合第四方面或第四方面的第一种可能的实施方式,第四方面的第二种可能的实施方式中,所述装置还包括获取模块,所述获取模块用于在收到所述定位终端没有进行定位的通知时,获取发送所述定位请求之前,最近一次保存的位置信息;所述匹配模块用于根据所述定位终端返回照片的标识和/或照片的拍摄时间,以及所述拍照终端已拍摄照片的信息,将所述最近一次保存的位置信息与所述已拍摄的照片匹配;所述添加模块用于根据所述最近一次保存的位置信息为对应的照片添加位置标签。With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the device further includes an acquiring module, where the acquiring module is configured to receive the positioning When the terminal does not perform the notification of the positioning, obtain the last saved location information before sending the positioning request; the matching module is configured to return the photo of the photo and the photo shooting time according to the positioning terminal, and the photo taking The terminal has taken the information of the photo, and matches the last saved location information with the captured photo; the adding module is configured to add a location tag to the corresponding photo according to the last saved location information.
第五方面,提供了一种定位终端,包括处理器、通信模块以及定位模块;所述定位模块,用于获取当前的位置信息;所述通信模块,用于与拍照终端之间进行通信;所述处理器,用于指令所述通信模块建立与拍照终端之间的连接以及接收所述拍照终端通过所述连接发送的定位请求,其中,所述定位终端与所述拍照终端之间的距离不超过预设阈值,所述定位请求包括所述拍照终端拍摄的照片的标识或者拍照的时间中的至少一个,所述处理器还用于根据所述定位请求判断以下至少一个:所述通信模块接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述通信模块接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值,根据判断的结果确定是否进行定位,仅当确定进行定位时,指令所述定位模块获取当前的位置信息并指令所述通信模块通过所述连接向所述拍照终端发送所述定位请求中 的照片的标识或者拍照的时间中的至少一个,和所述位置信息。A fifth aspect provides a positioning terminal, including a processor, a communication module, and a positioning module; the positioning module is configured to acquire current location information; and the communication module is configured to communicate with the camera terminal; a processor, configured to instruct the communication module to establish a connection with the photographing terminal, and receive a positioning request sent by the photographing terminal through the connection, wherein a distance between the positioning terminal and the photographing terminal is not Exceeding a preset threshold, the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing, and the processor is further configured to determine at least one of the following according to the positioning request: the communication module receives Whether the time difference between the positioning request and the last positioning request is greater than a time threshold; whether the displacement of the positioning terminal is greater than a displacement threshold during a period in which the communication module receives the positioning request and the last positioning request, according to the judgment The result of determining whether to perform positioning, and only when determining to perform positioning, instructing the positioning module to acquire The location information before and instructs the communication module photographing through the connection terminal that sent the location request At least one of the identification of the photo or the time of photographing, and the location information.
针对于在拍照终端进行拍摄时,定位终端为拍照终端进行定位并提供位置信息的场景,本申请提出的技术方案与现有技术相比,只有在定位终端接收到拍照终端发送的定位请求,并且,定位终端和/或拍照终端经过判断确定确实需要进行定位时,定位终端才会通过定位获取当前的位置信息,有效减少了定位终端的电量的消耗。Compared with the prior art, only the positioning terminal receives the positioning request sent by the photographing terminal, and the positioning terminal receives the positioning request sent by the photographing terminal, and the photographing terminal performs the photographing of the photographing terminal. When the positioning terminal and/or the photographing terminal determine that the positioning is really needed, the positioning terminal obtains the current location information by positioning, thereby effectively reducing the power consumption of the positioning terminal.
结合第五方面,第五方面的第一种可能的实施方式中,所述处理器还用于判断所述定位终端的剩余电量是否大于电量阈值,在若所述定位终端的剩余电量大于电量阈值时,按第一扫描优先级确定定位方式;在所述定位终端的剩余电量小于电量阈值时,按第二扫描优先级确定定位方式,其中,所述第一扫描优先级不同于所述第二扫描优先级。With reference to the fifth aspect, in a first possible implementation manner of the fifth aspect, the processor is further configured to determine whether the remaining power of the positioning terminal is greater than a power threshold, if the remaining power of the positioning terminal is greater than a power threshold Determining the positioning mode according to the first scanning priority; determining the positioning mode according to the second scanning priority when the remaining power of the positioning terminal is less than the power threshold, wherein the first scanning priority is different from the second Scan priority.
第五方面的第一种可能的实施方式能够根据剩余的电量决定选择第一扫描优先级或者第二扫描优先级,从而使得所选择的定位方式更贴合剩余电量的现状。The first possible implementation manner of the fifth aspect is capable of determining the first scan priority or the second scan priority according to the remaining power amount, so that the selected positioning mode is more suitable for the current state of the remaining power.
结合第五方面,第五方面的第二种可能的实施方式中,所述处理器还用于判断所述定位终端的当前环境是室内还是室外,在所述定位终端的当前环境为室内时,确定采用无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式中的至少一种获取当前的位置信息,在所述定位终端的当前环境为室外时,确定采用全球导航卫星系统GNSS定位方式获取当前的位置信息。With reference to the fifth aspect, in a second possible implementation manner of the fifth aspect, the processor is further configured to determine whether the current environment of the positioning terminal is indoors or outdoors, and when the current environment of the positioning terminal is indoors, Determine wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode At least one of the optical positioning mode and the computer vision positioning mode acquires the current location information. When the current environment of the positioning terminal is outdoor, it is determined that the global navigation satellite system GNSS positioning mode is used to obtain the current location information.
第五方面的第二种可能的实施方式能够根据当前的环境是室内还是室外,选择合适当前的定位方式,避免因为环境的影响而导致定位不成功,从而提高定位的可靠性。 The second possible implementation manner of the fifth aspect can select a suitable current positioning manner according to whether the current environment is indoor or outdoor, and avoid unsuccessful positioning due to environmental influence, thereby improving the reliability of the positioning.
结合第五方面或第五方面的第一种可能的实施方式或第五方面的第二种可能的实施方式,第五方面的第三种可能的实施方式中,所述处理器具体用于判断所述通信模块接收所述定位请求和接收上一次定位请求的时间差是否小于时间阈值,在判断结果为不小于时间阈值时,判断所述通信模块接收所述定位请求和接收上一次定位请求之间的时间段,所述定位终端的位移是否小于位移阈值;在判断结果为不小于位移阈值时,获取当前的位置信息。With reference to the fifth aspect or the first possible implementation manner of the fifth aspect, or the second possible implementation manner of the fifth aspect, in a third possible implementation manner of the fifth aspect, the processor is specifically configured to determine And determining, by the communication module, whether the time difference between the positioning request and the last positioning request is less than a time threshold, and determining that the communication module receives the positioning request and receiving the previous positioning request when the determination result is not less than a time threshold The time period, whether the displacement of the positioning terminal is smaller than the displacement threshold; when the judgment result is not less than the displacement threshold, the current position information is acquired.
第五方面的第三种可能的实施方式,通过先判断较容易判断的定位终端接收定位请求和上一次定位请求的时间差是否大于时间阈值,后判断在定位终端接收定位请求和上一次定位请求的时间段内,定位终端的位移量是否大于位移阈值,如果定位终端接收定位请求和上一次定位请求的时间差大于时间阈值,则无需再判断在定位终端接收定位请求和上一次定位请求的时间段内,定位终端的位移量是否大于位移阈值,从而减少判断的复杂度。The third possible implementation manner of the fifth aspect, after determining whether the time difference between the positioning request and the last positioning request by the positioning terminal that is relatively easy to determine is greater than a time threshold, and then determining that the positioning terminal receives the positioning request and the last positioning request. During the time period, whether the displacement of the positioning terminal is greater than the displacement threshold, if the time difference between the positioning terminal receiving the positioning request and the last positioning request is greater than the time threshold, it is not necessary to determine that the positioning terminal receives the positioning request and the last positioning request within the time period. Whether the displacement amount of the positioning terminal is greater than the displacement threshold, thereby reducing the complexity of the judgment.
结合第五方面的第三种可能的实施方式,第五方面的第四种可能的实施方式中,所述处理器具体用于判断所述通信模块接收所述定位请求和接收上一次定位请求的时间差是否大于时间阈值,在所述通信模块接收所述定位请求和接收上一次定位请求的时间差大于时间阈值时,判断所述通信模块接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移是否大于位移阈值,在所述定位终端的位移大于位移阈值时,确定进行定位。With reference to the third possible implementation manner of the fifth aspect, in a fourth possible implementation manner of the fifth aspect, the processor is specifically configured to determine that the communications module receives the positioning request and receives a previous positioning request Whether the time difference is greater than a time threshold, and determining a time period between the receiving the positioning request and receiving the last positioning request when the time difference between the receiving the positioning request and the receiving the last positioning request is greater than a time threshold The displacement of the positioning terminal is greater than a displacement threshold, and when the displacement of the positioning terminal is greater than the displacement threshold, determining to perform positioning.
结合第五方面或第五方面的第一种至第四种可能的实施方式中的任一种,第五方面的第五种可能的实施方式中,所述处理器还用于:在确定不进行定位时,指令所述通信模块发送没有进行定位的通知和所述定位请求中的照片的标识或者拍照的时间中的至少一个,或,发送上一次的位置信息以及所述定位请求中的照片的标识或者拍照的时间中的至少一个。With reference to the fifth aspect, or any one of the first to fourth possible implementation manners of the fifth aspect, in a fifth possible implementation manner of the fifth aspect, the processor is further configured to: When performing positioning, instructing the communication module to transmit at least one of a notification of not performing positioning and a photo of the photo in the positioning request or a time of photographing, or transmitting the last location information and a photo in the positioning request At least one of the logo or the time of the photo.
结合第五方面或第五方面的第一种至第五种可能的实施方式中的任一种, 第五方面的第六种可能的实施方式中,所述处理器还用于在获取当前的位置信息之前,开启所述定位模块,在获取当前的位置信息之后,关闭所述定位模块。In combination with any of the first to fifth possible embodiments of the fifth aspect or the fifth aspect, In a sixth possible implementation manner of the fifth aspect, the processor is further configured to: after acquiring the current location information, enable the positioning module, and after acquiring the current location information, close the positioning module.
第五方面的第六种可能的实施方式,能够在定位终端获取当前的位置信息之前开启定位模块,在定位终端获取当前的位置信息之后关闭定位模块,能够有效地减少定位终端的耗电量。The sixth possible implementation manner of the fifth aspect, the positioning module can be enabled before the positioning terminal acquires the current location information, and the positioning module is closed after the positioning terminal acquires the current location information, which can effectively reduce the power consumption of the positioning terminal.
结合第五方面或第五方面的第一种至第六种可能的实施方式中的任一种,第五方面的第七种可能的实施方式中,所述通信模块用于向第三服务器发送所述位置信息,和所述定位请求包括的部分或全部信息,以供所述第三服务器根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述位置信息与所述已拍摄的照片匹配,并根据所述位置信息为对应的照片添加位置标签。With reference to the fifth aspect, or any one of the first to sixth possible implementation manners of the fifth aspect, in a seventh possible implementation manner of the fifth aspect, the communication module is configured to send to a third server The location information, and part or all of the information included in the positioning request, for the third server to include some or all of the information according to the positioning request, and information that the photographing terminal has taken a photo, The location information matches the photographed photo, and a location tag is added to the corresponding photo based on the location information.
第六方面,提供了一种拍照终端,包括:通信模块、拍摄模块以及处理器,所述拍摄模块用于进行拍照;所述通信模块用于与定位终端进行通信;所述处理器用于指令所述通信模块建立连接,其中,所述定位终端与所述拍照终端相距不超过预设距离;所述处理器还用于确定是否需要发送定位请求,并在确定需要发送定位请求时,指令所述通信模块通过所述连接向所述定位终端发送定位请求,其中,所述定位请求包括照片的标识和照片的拍照时间中的至少一个;所述处理器还用于根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述通信模块返回的位置信息与所述已拍摄的照片匹配,并根据所述位置信息为对应的照片添加位置标签。According to a sixth aspect, a camera terminal includes: a communication module, a photographing module, and a processor, wherein the photographing module is configured to perform photographing; the communication module is configured to communicate with a positioning terminal; The communication module establishes a connection, wherein the positioning terminal is not more than a preset distance from the camera terminal; the processor is further configured to determine whether a positioning request needs to be sent, and when determining that a positioning request needs to be sent, instructing the The communication module sends a positioning request to the positioning terminal through the connection, wherein the positioning request includes at least one of an identifier of a photo and a photographing time of a photo; the processor is further configured to: according to the part included in the positioning request Or all the information, and the information that the photographing terminal has taken the photo, matching the position information returned by the communication module with the photographed photograph, and adding a position label to the corresponding photo according to the position information.
结合第六方面,在第六方面的第一种可能的实施方式中,所述处理器还用于判断所述拍摄模块本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,在所述拍摄模块本次进行拍摄和上一次进行拍摄的时间差大于时间阈值时,确定需要发送定位请求,在所述拍摄模块本次进行拍摄和上一次进行拍摄 的时间差小于或者等于时间阈值时,确定不需要发送定位请求;或者,所述处理器还用于判断在所述拍摄模块本次进行拍摄和上一次进行拍摄的时间段内,所述拍照终端的位移量是否大于位移阈值,在拍照终端的位移量大于位移阈值时,确定需要发送定位请求,在拍照终端的位移量小于或者等于位移阈值时,确定不需要发送定位请求。In conjunction with the sixth aspect, in a first possible implementation manner of the sixth aspect, the processor is further configured to determine whether a time difference between the current shooting of the shooting module and the last shooting is greater than a time threshold, When the time difference between the shooting module and the last shooting is greater than the time threshold, it is determined that the positioning request needs to be sent, and the shooting module performs the shooting and the last shooting. When the time difference is less than or equal to the time threshold, it is determined that the positioning request does not need to be sent; or the processor is further configured to determine that the photographing terminal is in a time period during which the shooting module performs the shooting and the last shooting. Whether the displacement amount is greater than the displacement threshold, when the displacement of the photographing terminal is greater than the displacement threshold, it is determined that the positioning request needs to be sent, and when the displacement of the photographing terminal is less than or equal to the displacement threshold, it is determined that the positioning request is not required to be sent.
本申请提出的技术方案与现有技术相比,拍照终端只有在判断需要向定位终端发送定位请求时,才会向定位终端发送定位请求,从而减少了拍照终端的通信模块的工作量,减少了拍照终端的电量的损耗。而且,定位终端的通信模块也同样减少了工作量,也减少了定位终端的电量的损耗。Compared with the prior art, the camera terminal only sends a positioning request to the positioning terminal when it is determined that the positioning request needs to be sent to the positioning terminal, thereby reducing the workload of the communication module of the camera terminal and reducing the workload. Loss of power of the camera terminal. Moreover, the communication module of the positioning terminal also reduces the workload and reduces the loss of the power of the positioning terminal.
结合第六方面或第六方面的第一种可能的实施方式,在第六方面的第二种可能的实施方式中,所述处理器还用于在收到所述定位终端没有进行定位的通知时,获取发送所述定位请求之前,最近一次保存的位置信息,根据所述定位终端返回照片的标识和/或照片的拍摄时间,以及所述拍照终端已拍摄照片的信息,将所述最近一次保存的位置信息与所述已拍摄的照片匹配,并根据所述最近一次保存的位置信息为对应的照片添加位置标签。With reference to the sixth aspect, or the first possible implementation manner of the sixth aspect, in a second possible implementation manner of the sixth aspect, the processor is further configured to: after receiving the notification that the positioning terminal does not perform positioning And acquiring the last saved location information before sending the positioning request, according to the identifier of the photo returned by the positioning terminal and/or the shooting time of the photo, and the information that the photo terminal has taken the photo, the last time The saved location information matches the taken photo, and a location tag is added to the corresponding photo based on the last saved location information.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1是本发明提供的一种拍照终端根据定位终端提供的位置信息添加标签的交互图;1 is an interaction diagram of a camera terminal according to the location information provided by a positioning terminal according to the present invention;
图2是本申请提供的一种提供位置信息的装置的结构示意图; 2 is a schematic structural diagram of an apparatus for providing location information provided by the present application;
图3是本申请提供的一种提供位置信息的装置的结构示意图;3 is a schematic structural diagram of an apparatus for providing location information provided by the present application;
图4是本申请提供的一种获取位置信息的装置的结构示意图;4 is a schematic structural diagram of an apparatus for acquiring location information provided by the present application;
图5是本申请提供的一种智能手机的结构示意图;FIG. 5 is a schematic structural diagram of a smart phone provided by the present application; FIG.
图6是本申请提供的一种拍照终端的结构示意图。FIG. 6 is a schematic structural diagram of a camera terminal provided by the present application.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
需要说明的是,在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”指两者中的至少一种,例如“A和/或B”包括单独A、单独B、A和B三种情况。如无特别声明,“A、B和/或C”包括单独A、单独B、单独C,以及以上A、B、C的任意组合。It is to be understood that the terminology used in the embodiments of the present invention is for the purpose of describing the particular embodiments, and is not intended to limit the invention. The singular forms "a", "the" and "the" It should also be understood that the term "and/or" as used herein refers to at least one of the two, such as "A and/or B" includes the individual A, the individual B, A, and B. Unless otherwise stated, "A, B, and/or C" includes individual A, individual B, individual C, and any combination of the above A, B, and C.
请参阅图1,图1是本发明提供的一种拍照终端根据定位终端提供的位置信息添加标签的交互图。本实施方式包括如下步骤:Please refer to FIG. 1. FIG. 1 is an interaction diagram of a camera terminal according to the location information provided by the positioning terminal according to the present invention. This embodiment includes the following steps:
S101:定位终端与拍照终端之间建立连接。S101: Establish a connection between the positioning terminal and the photographing terminal.
可选的,定位终端具有通信、定位、计时等功能的终端,定位终端还可以具有检测位移等功能。例如,定位终端为智能手机、平板电脑、笔记本电脑和导航仪等等中的任意一种。定位终端定位的方式包括但不限于无线保真 (Wi-Fi)定位方式,蓝牙(Bluetooth)定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式以及全球导航卫星系统(Global Navigation Satellite System,GNSS)定位方式等等。拍照终端为具有拍摄、通信、计时等功能的终端,拍照终端还可以包括检测位移等功能。拍照终端包括但不限于数码相机、智能手机、平板电脑等等。Optionally, the positioning terminal has a terminal for communication, positioning, timing, and the like, and the positioning terminal may further have a function of detecting displacement. For example, the positioning terminal is any one of a smartphone, a tablet, a notebook, a navigator, and the like. Positioning terminal positioning methods include but are not limited to wireless fidelity (Wi-Fi) positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode , optical positioning, computer vision positioning and Global Navigation Satellite System (GNSS) positioning methods. The camera terminal is a terminal having functions of photographing, communication, timing, etc., and the photographing terminal may further include functions such as detecting displacement. Camera terminals include, but are not limited to, digital cameras, smart phones, tablets, and the like.
可选的,定位终端与拍照终端之间可以通过无线或者有线的方式建立通信连接,例如,定位终端与拍照终端之间可以通过Wi-Fi、Bluetooth、蜂窝等无线方式进行通信连接,也可以通过通用异步收发传输器(Universal Asynchronous Receiver/Transmitter,UART)、网口、通用串行总线(Universal Serial Bus,USB)等有线方式建立通信连接。其中,定位终端与拍照终端之间连接方式与现有技术相同,此处不再展开赘述。Optionally, a communication connection can be established between the positioning terminal and the camera terminal through a wireless or wired manner. For example, the positioning terminal and the camera terminal can be connected by wireless means such as Wi-Fi, Bluetooth, cellular, or the like. A universal asynchronous communication transceiver (Universal Asynchronous Receiver/Transmitter, UART), a network port, and a universal serial bus (USB) are used to establish a communication connection. The connection between the positioning terminal and the camera terminal is the same as that in the prior art, and details are not described herein again.
可选的,在建立连接后,定位终端向拍照终端发送交换信息,其中,交换信息可以是定位终端和拍照终端预先约定的字符。拍照终端在接收到定位终端发送的交换信息后,通过交换信息从定位终端发出至被拍照终端接收之间的时间计算出拍照终端和定位终端之间的距离。拍照终端和定位终端之间的距离等于交换信息从定位终端发出至被拍照终端接收之间的时间乘以交换信息传输的速度。如果定位终端与拍照终端之间的距离小于预设阈值,则拍照终端向定位终端发送允许请求位置的请求。其中,预设阈值可以根据实际需要人为根据经验进行设置,设置时需保证定位终端和拍照终端之间能够正常通信以及将定位终端定位的位置作为拍照终端的位置不会严重失实而导致不可接受即可。Optionally, after the connection is established, the positioning terminal sends the exchange information to the camera terminal, where the exchange information may be a pre-agreed character of the positioning terminal and the photographing terminal. After receiving the exchange information sent by the positioning terminal, the photographing terminal calculates the distance between the photographing terminal and the positioning terminal by exchanging information from the positioning terminal to the time received by the photographing terminal. The distance between the photographing terminal and the positioning terminal is equal to the time between the exchange of the information from the positioning terminal and the reception of the photographed terminal multiplied by the speed at which the information is exchanged. If the distance between the positioning terminal and the photographing terminal is less than a preset threshold, the photographing terminal sends a request for allowing the requested location to the positioning terminal. The preset threshold can be set according to the actual needs according to the actual needs. The setting needs to ensure that the normal communication between the positioning terminal and the photographing terminal and the position where the positioning terminal is positioned as the position of the photographing terminal are not seriously unrealistic, resulting in unacceptable can.
可选的,定位终端在接收到允许请求位置的请求后,弹出提示界面。其中,提示界面包括允许按钮和不允许按钮。如果用户选择了允许按钮,则定位终端允许拍照终端向定位终端请求定位,如果用户选择了不允许按钮,则定位终端 不允许拍照终端向定位终端请求定位。Optionally, after receiving the request for allowing the request location, the positioning terminal pops up the prompt interface. The prompt interface includes an allow button and a disallow button. If the user selects the permission button, the positioning terminal allows the camera terminal to request positioning from the positioning terminal, and if the user selects the disallow button, the positioning terminal The camera terminal is not allowed to request positioning from the positioning terminal.
可以理解的是,可以是定位终端发起建立与拍照终端之间的连接,也可以是拍照终端发起建立与定位终端之间的连接。定位终端与拍照终端之间可以在开启电源后,一直保持通信连接,也可以在拍照终端需要进行拍照时,才建立定位终端与拍照终端之间的连接,甚至可以在拍照终端需要向定位终端请求定位时,才建立定位终端与拍照终端之间的连接等等。It can be understood that the positioning terminal initiates the connection between the establishing and the photographing terminal, or the photographing terminal initiates the connection between the establishing and the positioning terminal. Between the positioning terminal and the camera terminal, the communication connection can be maintained after the power is turned on, and the connection between the positioning terminal and the camera terminal can be established only when the camera terminal needs to take a picture, and even the camera terminal needs to request the positioning terminal. When positioning, the connection between the positioning terminal and the camera terminal is established.
S102:拍照终端通过连接向定位终端发送定位请求。S102: The photographing terminal sends a positioning request to the positioning terminal by using a connection.
可选的,如果用户在拍照终端的界面上选择了允许按钮或者通过其他方式开启了拍照终端发送定位请求的功能,则当用户使用拍照终端进行一张照片的拍摄时,拍照终端通过已经建立的通信连接向定位终端发送定位请求。或者用户通过拍照终端进行拍照时,启动定时器进行定时,定时时间到后,拍照终端通过已经建立的通信连接向定位终端发送定位请求。其中,定位请求可以包括照片的标识或者拍照的时间中的至少一个,定位请求还可以包括拍照终端的标识等等。照片的标识通常为照片的唯一的编码,可用于识别照片。拍照的时间为用户进行拍照操作以获得照片的时间。拍照终端的标识通常为拍照终端的唯一的编码,可用于识别拍照终端。Optionally, if the user selects an allow button on the interface of the photographing terminal or activates the function of the photographing terminal to send a positioning request by using other methods, when the user uses the photographing terminal to perform photographing of a photo, the photographing terminal passes the established photo. The communication connection sends a positioning request to the positioning terminal. Or when the user takes a picture through the camera terminal, the timer is started to perform timing. After the time is up, the camera terminal sends a positioning request to the positioning terminal through the established communication connection. The location request may include at least one of an identifier of the photo or a time of photographing, and the location request may further include an identifier of the photographing terminal and the like. The photo's logo is usually the unique code for the photo and can be used to identify the photo. The time of taking a photo is the time when the user takes a photo to obtain a photo. The identification of the camera terminal is usually a unique code of the camera terminal and can be used to identify the camera terminal.
S103:定位终端判断是否进行定位。S103: The positioning terminal determines whether to perform positioning.
可选的,当定位终端接收到拍照终端发送的定位请求后,定位终端先判断定位终端接收定位请求和接收上一次定位请求的时间差是否大于时间阈值,如果判断结果小于或者等于时间阈值,则确定不进行定位,如果判断结果为大于时间阈值,则进一步判断定位终端接收定位请求和接收上一次定位请求之间的时间段内,定位终端的位移是否大于位移阈值,如果判断结果为小于或者等于位移阈值,则确定不进行定位,如果判断结果为大于位移阈值,则确定进行定位。其中,时间阈值可以根据用户的需要进行设置,设置时,只需保证时间阈 值设置得足够的小以至于在通常的状况下,定位终端接收本次定位请求和接收上一次定位请求之间的时间差内,定位终端和拍照终端的位移可以忽略不计。位移阈值可以根据用户的需要进行设置,设置时,只需保证定位终端接收定位请求和接收上一次定位请求之间的时间段内,定位终端和拍照终端的位移可以忽略不计,其中,时间段可以是10秒,30秒或半小时等等。定位终端可以通过读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据进而计算出定位终端的位移。例如,定位终端在接收上一次定位请求的时间读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据,在本次接收定位请求的时间读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据,从而计算出两次定位请求之间的时间段内,定位终端的位移。Optionally, after the positioning terminal receives the positioning request sent by the camera terminal, the positioning terminal first determines whether the time difference between the positioning terminal receiving the positioning request and the receiving the previous positioning request is greater than a time threshold, and if the determination result is less than or equal to the time threshold, determining If the result of the determination is greater than the time threshold, it is further determined whether the displacement of the positioning terminal is greater than the displacement threshold in the time period between the positioning of the positioning request and the reception of the previous positioning request, and if the determination result is less than or equal to the displacement The threshold is determined not to perform positioning, and if the result of the determination is greater than the displacement threshold, it is determined to perform positioning. The time threshold can be set according to the needs of the user. When setting, only the time threshold is guaranteed. The value is set to be small enough that in a normal situation, the displacement between the positioning terminal and the photographing terminal is negligible within the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request. The displacement threshold can be set according to the needs of the user. When setting, the displacement between the positioning terminal and the camera terminal can be neglected during the time period between receiving the positioning request and receiving the previous positioning request. The time period can be It is 10 seconds, 30 seconds or half an hour and so on. The positioning terminal can calculate the displacement of the positioning terminal by reading sensor data of one or more of the acceleration sensor, the gyro sensor, and the like. For example, the positioning terminal reads sensor data of one or more of the acceleration sensor, the gyro sensor, and the like at the time of receiving the last positioning request, and reads the acceleration sensor, the gyro sensor, and the like at the time of receiving the positioning request. One or more sensor data to calculate the displacement of the positioning terminal during the time period between two positioning requests.
如果确定不进行定位,进入步骤S104,如果确定进行定位,进入步骤S105。If it is determined that the positioning is not performed, the process proceeds to step S104, and if it is determined that the positioning is performed, the process proceeds to step S105.
S104:定位终端向拍照终端反馈。S104: The positioning terminal feeds back to the camera terminal.
可选的,如果确定不进行定位,定位终端向拍照终端发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,向拍照终端发送上一次的位置信息,以及定位请求中的照片的标识或者拍照的时间中的至少一个。其中,位置信息可以为经纬度信息,也可以是解析经纬度后得到的地址信息。在本步骤结束后,进入步骤S107。Optionally, if it is determined that the positioning is not performed, the positioning terminal sends a notification that the positioning is not performed to the photographing terminal, and at least one of the identifier of the photo in the positioning request or the time of photographing; or sending the last location information to the photographing terminal. And at least one of an identification of a photo in the location request or a time of photographing. The location information may be latitude and longitude information, or may be address information obtained after parsing the latitude and longitude. After the end of this step, the process proceeds to step S107.
S105:定位终端获取当前的位置信息。S105: The positioning terminal acquires current location information.
可选的,如果确定进行定位,定位终端可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息以提高定位的效率和节省电量。其中,指定的定位方式可以是无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式, 光定位方式,计算机视觉定位方式,GNSS定位方式中的任意一种或多种的组合。Optionally, if the positioning is determined, the positioning terminal may directly locate the current location information according to the specified positioning manner, or may perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location. Location information to improve positioning efficiency and save power. The specified positioning mode may be wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning Mode, broadcast signal positioning method, A combination of any one or more of optical positioning mode, computer vision positioning mode, and GNSS positioning mode.
在一实施例中,定位终端根据剩余电量选择定位方式。具体地,定位终端判断定位终端的剩余电量是否大于电量阈值;若定位终端的剩余电量大于电量阈值,则按第一扫描优先级确定定位方式;若所述定位终端的剩余电量小于电量阈值,则按第二扫描优先级确定定位方式。其中,电量阈值可以根据需要进行设置。第一扫描优先级与第二扫描优先级用于表示定位方式的优先级别的排序。按照第一扫描优先级或第二扫描优先级确定定位方式时,首先选择优先级别最高的定位方式,如果优先级别最高的定位方式不能被使用,则采用优先级别次高的定位方式,依次类推,直到优先级别最低的定位方式。第一扫描优先级不同于第二扫描优先级,可以是第一扫描优先级中的定位方式可与第二扫描优先级中的定位方式不同,也可以是第一扫描优先级中的定位方式与第二扫描优先级中的定位方式相同,但是第一扫描优先级中的定位方式的优先级别不同于第二扫描优先级中的定位方式的优先级别。通常,第一扫描优先级中定位方式的优先级别按照定位方式的准确度降序进行排列,第二扫描优先级中的定位方式的优先级别按照定位方式的耗电量的大小升序进行排列。例如,GNSS定位方式的定位精度最高,功耗最大,蜂窝定位方式的定位精度最低,功耗也最低,Wi-Fi定位方式居中。所以,第一扫描优先级为GNSS定位方式->Wi-Fi定位方式->蜂窝定位方式,第二扫描优先级为蜂窝定位方式->Wi-Fi定位方式->GNSS定位方式。或者,通过第一电量阈值和第二电量阈值将电量划分为三个区域,定位终端判断定位终端的剩余电量落入哪一个区域,如果定位终端的剩余电量落入大于或等于第一电量阈值的区间,则按第一扫描优先级确定定位方式,如果定位终端剩余电量落入小于或等于第二电量阈值的区间,则按第二扫描优先级别确定定位方式,如果定位终端的剩余电量落入小于第一电量阈值而大于第二电量阈值的区间,则按第三扫描优先级别确定定位方式。例如,第 一扫描优先级定位方式为GNSS定位方式->Wi-Fi定位方式->蜂窝定位方式,第二扫描优先级定位方式为蜂窝定位方式->Wi-Fi定位方式->GNSS定位方式,第三扫描优先级定位方式为Wi-Fi定位方式->GNSS定位方式->蜂窝定位方式。In an embodiment, the positioning terminal selects a positioning mode according to the remaining power. Specifically, the positioning terminal determines whether the remaining power of the positioning terminal is greater than the power threshold; if the remaining power of the positioning terminal is greater than the power threshold, determining the positioning mode according to the first scanning priority; if the remaining power of the positioning terminal is less than the power threshold, The positioning mode is determined according to the second scanning priority. Among them, the power threshold can be set as needed. The first scan priority and the second scan priority are used to indicate the ordering of the priority levels of the positioning modes. When the positioning mode is determined according to the first scanning priority or the second scanning priority, the positioning mode with the highest priority is selected first. If the positioning mode with the highest priority cannot be used, the positioning mode with the second highest priority is used, and so on. Until the lowest priority positioning method. The first scanning priority is different from the second scanning priority, and the positioning manner in the first scanning priority may be different from the positioning manner in the second scanning priority, or may be the positioning manner in the first scanning priority. The positioning manner in the second scanning priority is the same, but the priority of the positioning mode in the first scanning priority is different from the priority of the positioning mode in the second scanning priority. Generally, the priority levels of the positioning modes in the first scanning priority are arranged in descending order of the accuracy of the positioning mode, and the priority levels of the positioning modes in the second scanning priority are arranged in ascending order according to the power consumption of the positioning mode. For example, the GNSS positioning method has the highest positioning accuracy, the largest power consumption, the lowest positioning accuracy of the cellular positioning mode, and the lowest power consumption, and the Wi-Fi positioning mode is centered. Therefore, the first scanning priority is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode. Or, the first power threshold and the second power threshold are used to divide the power into three regions, and the positioning terminal determines, in which region the remaining power of the positioning terminal falls, if the remaining power of the positioning terminal falls within a threshold greater than or equal to the first power threshold. In the interval, the positioning mode is determined according to the first scanning priority. If the remaining power of the positioning terminal falls within the interval less than or equal to the second power threshold, the positioning mode is determined according to the second scanning priority level, and if the remaining power of the positioning terminal falls below The first power threshold is greater than the second power threshold, and the positioning mode is determined according to the third scan priority level. For example, The scanning priority positioning mode is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority positioning mode is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode, third scanning The priority positioning mode is Wi-Fi positioning mode->GNSS positioning mode->cellular positioning mode.
在另一实施例中,定位终端根据当前环境选择定位方式。具体地,定位终端判断定位终端的当前环境是室内还是室外。其中,定位终端可以通过读取和分析光传感器、气压计、温度传感器等传感器数据中的至少一个判断定位终端的当前环境是在室内还是室外。若定位终端的当前环境为室内,采用适合室内进行定位的定位方式,例如采用Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式等等中的至少一种获取当前的位置信息;若定位终端的当前环境为室外,采用适合室外进行定位的定位方式,例如,采用GNSS定位方式等等获取当前的位置信息。In another embodiment, the positioning terminal selects a positioning mode according to the current environment. Specifically, the positioning terminal determines whether the current environment of the positioning terminal is indoors or outdoors. The positioning terminal can determine whether the current environment of the positioning terminal is indoors or outdoors by reading and analyzing at least one of sensor data such as a light sensor, a barometer, and a temperature sensor. If the current environment of the positioning terminal is indoor, the positioning method suitable for indoor positioning is adopted, for example, Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, and radio frequency tag positioning mode. At least one of Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode, optical positioning mode, computer vision positioning mode, and the like acquires current location information; if the current environment of the positioning terminal is outdoor, it is suitable for outdoor use. The positioning method of positioning, for example, using GNSS positioning method or the like to obtain current location information.
可选的,为了能够减少耗电,可以在获取当前的位置信息之前,开启定位模块,使得电源向定位模块进行供电,在获取当前的位置信息之后,关闭定位模块,使得电源不能向定位模块进行供电。其中,定位模块可以是Wi-Fi模块,蓝牙模块,蜂窝模块,地磁模块,超声波模块,红外模块,射频标签模块,Zigbee模块,超宽带无线电模块光模块,摄像模块中的任意一种或者多种的组合。例如,当定位终端采用GNSS定位方式进行定位时,定位模块是GNSS模块,当定位终端采用Wi-Fi定位方式进行定位时,定位模块是Wi-Fi模块等等。Optionally, in order to reduce the power consumption, before the current location information is obtained, the positioning module is enabled to enable the power supply to supply power to the positioning module. After obtaining the current location information, the positioning module is closed, so that the power supply cannot be performed to the positioning module. powered by. The positioning module may be any one or more of a Wi-Fi module, a Bluetooth module, a cellular module, a geomagnetic module, an ultrasonic module, an infrared module, a radio frequency tag module, a Zigbee module, an ultra-wideband radio module optical module, and a camera module. The combination. For example, when the positioning terminal is positioned by using the GNSS positioning mode, the positioning module is a GNSS module. When the positioning terminal uses the Wi-Fi positioning mode for positioning, the positioning module is a Wi-Fi module or the like.
S106:定位终端向拍照终端进行反馈。S106: The positioning terminal feeds back to the camera terminal.
可选的,在获取到位置信息后,定位终端通过定位终端与拍照终端之间的连接向拍照终端发送定位请求中的照片的标识或者拍照的时间中的至少一个,和定位终端获取到的位置信息。Optionally, after obtaining the location information, the positioning terminal sends at least one of the identifier of the photo in the positioning request or the time of photographing to the photographing terminal by using the connection between the positioning terminal and the photographing terminal, and the location acquired by the positioning terminal. information.
S107:拍照终端根据定位终端的反馈进行匹配以及添加位置标签。其中, 照片的头文件中通常包括多个不同的标签,分别用于记录拍摄时间、快门速度、曝光补偿、焦距以及位置信息等等。位置标签是照片的头文件中专门用于记载位置信息的标签,例如,位置标签为可交换图像文件(Exchangeable Image File,EXIF)中专门用于记载全球定位数据的标签。S107: The photographing terminal performs matching according to the feedback of the positioning terminal and adds a position label. among them, The header file of the photo usually includes a plurality of different labels for recording shooting time, shutter speed, exposure compensation, focal length, position information, and the like. A location tag is a tag in a header file of a photo that is specifically used to record location information. For example, a location tag is a tag specifically used to record global positioning data in an Exchangeable Image File (EXIF).
可选的,如果拍照终端接收到的是没有进行定位的通知,则拍照终端获取发送步骤102中所述的定位请求之前,最近一次保存的位置信息,并根据定位终端返回的照片的标识和/或照片的拍摄时间,以及拍照终端已拍摄照片的信息,将最近一次保存的位置信息与已拍摄的照片匹配,其中,照片的信息包括照片的标识和/或照片的拍摄时间等等。匹配成功后,再根据最近一次保存的位置信息为对应的照片添加位置标签。Optionally, if the photographing terminal receives the notification that the positioning is not performed, the photographing terminal acquires the last saved location information before sending the positioning request in step 102, and according to the identifier of the photo returned by the positioning terminal and/or Or the shooting time of the photo, and the information of the photo taken by the photographing terminal, matching the last saved location information with the photographed photograph, wherein the photo information includes the logo of the photo and/or the photographing time of the photo, and the like. After the match is successful, the location tag is added to the corresponding photo according to the last saved location information.
可选的,定位终端在确定不进行定位时,也可以不向拍照终端反馈任何信息。拍照终端在一段时间内没有接收到定位终端反馈的任何信息,就获取发送步骤102中所述的定位请求之前,最近一次保存的位置信息,并根据定位终端返回的照片的标识和/或照片的拍摄时间,以及拍照终端已拍摄照片的信息,将最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。Optionally, the positioning terminal may not feed back any information to the camera terminal when determining that the positioning is not performed. The camera terminal does not receive any information fed back by the positioning terminal for a period of time, and acquires the last saved location information before transmitting the positioning request described in step 102, and according to the identifier and/or photo of the photo returned by the positioning terminal. The shooting time, as well as the information that the camera terminal has taken the photo, matches the last saved location information with the captured photo, and then adds a location tag to the corresponding photo based on the last saved location information.
可选的,如果拍照终端接收到的是定位终端返回的上一次的位置信息,或者,定位终端返回的获取到的位置信息,则根据返回的位置信息,和定位请求包括的部分或全部信息,以及拍照终端已拍摄照片的信息,将位置信息与已拍摄的照片匹配。匹配时,可以根据定位终端返回的照片的标识和已拍摄的照片的标识进行匹配,如果定位终端返回的照片的标识和已拍摄的照片的标识一致,则匹配成功,或,根据定位终端返回的照片的拍摄时间和已拍摄的照片的拍摄时间进行匹配,如果定位终端返回的照片的拍摄时间和已拍摄的照片的拍摄时间一致,则匹配成功。此外,也可以同时根据照片的标识和照片的拍摄时 间进行匹配,如果照片的拍摄时间均与已拍摄的照片的标识和照片的拍摄时间相同,则匹配成功。匹配成功后,再根据位置信息为对应的照片添加位置标签。Optionally, if the photographing terminal receives the last location information returned by the positioning terminal, or the obtained location information returned by the positioning terminal, according to the returned location information, and part or all of the information included in the positioning request, And the information that the photo terminal has taken the photo, and the location information is matched with the photograph taken. When matching, the matching may be performed according to the identifier of the photo returned by the positioning terminal and the identifier of the photograph taken. If the identifier of the photo returned by the positioning terminal is consistent with the identifier of the photograph taken, the matching is successful, or according to the return of the positioning terminal. The shooting time of the photo is matched with the shooting time of the taken photo. If the shooting time of the photo returned by the positioning terminal coincides with the shooting time of the taken photo, the matching is successful. In addition, you can also take photos according to the photos and photos at the same time. Matching is performed, and if the photographing time is the same as the photographing time of the photographed photo and the photographing time of the photograph, the matching is successful. After the match is successful, add a location tag to the corresponding photo based on the location information.
可以理解的是,拍照终端还可以将已拍摄的照片发送给第三方服务器。而定位终端在获取到位置信息后,将定位请求中的照片的标识或者拍照的时间中的至少一个,以及位置信息发送给第三方服务器。第三方服务器根据定位终端发送的位置信息,和定位请求包括的部分或全部信息,以及拍照终端已拍摄照片的信息,将位置信息与已拍摄的照片匹配,再根据位置信息为对应的照片添加位置标签。或者,拍照终端将已拍摄的照片发送给定位终端,例如,拍照终端在向定位终端发送的定位请求包含已拍摄的照片,或者,拍照终端单独向定位终端发送已拍摄的照片。定位终端在接收到已拍摄的照片以及获取到位置信息后,将位置信息与已拍摄的照片匹配,再根据位置信息为对应的照片添加位置标签。It can be understood that the photographing terminal can also send the photograph taken to the third party server. After acquiring the location information, the positioning terminal sends at least one of the identifier of the photo in the location request or the time of photographing, and the location information to the third-party server. The third-party server matches the location information with the captured photo according to the location information sent by the positioning terminal, part or all of the information included in the positioning request, and the information that the camera terminal has taken the photo, and then adds the location to the corresponding photo according to the location information. label. Alternatively, the photographing terminal sends the photographed photograph to the positioning terminal. For example, the photographing terminal sends the photographed photograph to the positioning request sent to the positioning terminal, or the photographing terminal separately sends the photographed photograph to the positioning terminal. After receiving the captured photo and acquiring the location information, the positioning terminal matches the location information with the captured photo, and then adds a location tag to the corresponding photo according to the location information.
可以理解,上述方案还可以由以下中的任意一种方案进行代替。具体如下:It can be understood that the above scheme can also be replaced by any one of the following schemes. details as follows:
方案一:拍照终端和定位终端在建立连接后,拍照终端判断本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值。如果拍照终端判断的结果为小于或者等于时间阈值,则拍照终端确定不进行定位。所以,拍照终端确定不需要向定位终端发送定位请求,而是从存储器中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端判断的结果为大于时间阈值,则拍照终端确定需要向定位终端发送定位请求,并向定位终端发送定位请求。定位终端接收到定位请求后,判断接收定位请求和接收上一次定位请求之间的时间段内,定位终端的位移是否大于位移阈值。如果定位终端进行判断得到的判断结果为小于或者等于位移阈值,则定位终端确定不进行定位。定位终端向拍照终端发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,定位 终端向拍照终端发送上一次的位置信息,以及定位请求中的照片的标识或者拍照的时间中的至少一个。如果定位终端判断的结果为大于位移阈值,则确定进行定位。定位终端可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。定位终端在获取得到当前的位置信息后,将当前的位置信息发送给拍照终端进行匹配、添加标签,或者,定位终端在获取得到当前的位置信息后,向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 1: After the camera terminal and the positioning terminal establish a connection, the camera terminal determines whether the time difference between the current shooting and the previous shooting is greater than a time threshold. If the result of the determination by the photographing terminal is less than or equal to the time threshold, the photographing terminal determines not to perform the positioning. Therefore, the photographing terminal determines that it is not necessary to send a positioning request to the positioning terminal, but obtains the last saved position information from the memory to match the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the time threshold, the photographing terminal determines that the positioning request needs to be sent to the positioning terminal, and sends a positioning request to the positioning terminal. After receiving the positioning request, the positioning terminal determines whether the displacement of the positioning terminal is greater than the displacement threshold within a time period between receiving the positioning request and receiving the previous positioning request. If the judgment result obtained by the positioning terminal is less than or equal to the displacement threshold, the positioning terminal determines not to perform positioning. The positioning terminal sends, to the photographing terminal, a notification that no positioning is performed, and at least one of the identification of the photo in the positioning request or the time of photographing; or, positioning The terminal transmits the last location information to the camera terminal, and at least one of the identification of the photo in the location request or the time of photographing. If the result of the positioning terminal judgment is greater than the displacement threshold, it is determined to perform positioning. The locating terminal can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information. After obtaining the current location information, the positioning terminal sends the current location information to the camera terminal for matching and adding a label, or after acquiring the current location information, the positioning terminal sends the current location information to the third-party server and sends the current location information to the third-party server. The third-party server performs matching and labeling. For details, refer to the foregoing embodiment. The description is not repeated here.
方案二:拍照终端和定位终端在建立连接后,拍照终端判断本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,如果拍照终端判断的结果为小于或者等于时间阈值,则拍照终端确定不进行定位。拍照终端确定不需要向定位终端发送定位请求,而是从存储器中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端判断的结果为大于时间阈值,则拍照终端进一步判断本次进行拍摄和上一次进行拍摄之间的时间段内,拍照终端的位移是否大于位移阈值。如果拍照终端判断的结果为小于或者等于位移阈值,则拍照终端确定不进行定位。拍照终端确定不需要向定位终端发送定位请求,而是从存储器中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端判断的结果为大于位移阈值,则拍照终端确定进行定位。拍照终端确定需要向定位终端发送定位请求,并向定位终端发送定位请求。定位终端在接收到定位请求后,可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。定位终端在获取得到当前的位置信息后,将当前的位置信息发送给拍照终端进行匹配、添加标签, 或者,定位终端在获取得到当前的位置信息后,向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 2: After the camera terminal and the positioning terminal establish a connection, the camera terminal determines whether the time difference between the current shooting and the previous shooting is greater than a time threshold. If the result of the camera terminal determination is less than or equal to the time threshold, the camera terminal determines not to Positioning. The photographing terminal determines that it is not necessary to send a positioning request to the positioning terminal, but obtains the last saved position information from the memory to match the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the time threshold, the photographing terminal further determines whether the displacement of the photographing terminal is greater than the displacement threshold in the period between the current photographing and the last photographing. If the result of the determination by the photographing terminal is less than or equal to the displacement threshold, the photographing terminal determines not to perform the positioning. The photographing terminal determines that it is not necessary to send a positioning request to the positioning terminal, but obtains the last saved position information from the memory to match the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the displacement threshold, the photographing terminal determines to perform the positioning. The photographing terminal determines that a positioning request needs to be sent to the positioning terminal, and sends a positioning request to the positioning terminal. After receiving the positioning request, the positioning terminal can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information. . After obtaining the current location information, the positioning terminal sends the current location information to the camera terminal for matching and adding tags. Or, after obtaining the current location information, the locating terminal sends the current location information to the third-party server to be sent to the third-party server for matching and labeling. For details, refer to the foregoing embodiment, and the description is not further described herein.
方案三:拍照终端和定位终端在建立连接后,拍照终端判断本次进行拍摄和上一次进行拍摄的时间段内,拍摄终端的位移是否大于位移阈值。如果拍照终端判断的结果为小于或者等于位移阈值,则拍照终端确定不进行定位,所以,拍照终端确定不需要向定位终端发送定位请求,而是从存储器中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端判断的结果为大于位移阈值,则拍照终端确定需要向定位终端发送定位请求,并向定位终端发送定位请求。定位终端接收定位请求后,判断接收定位请求和接收上一次定位请求之间的时间差是否小于时间阈值。如果定位终端判断的结果为小于或者等于时间阈值,则确定不进行定位。定位终端向拍照终端发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,定位终端向拍照终端发送上一次的位置信息,以及定位请求中的照片的标识或者拍照的时间中的至少一个。如果定位终端判断的结果为大于时间阈值,则定位终端确定进行定位。定位终端可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。定位终端在获取得到当前的位置信息后,将当前的位置信息发送给拍照终端进行匹配、添加标签,或者,定位终端在获取得到当前的位置信息后,向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 3: After the photo terminal and the positioning terminal establish a connection, the photographing terminal determines whether the displacement of the photographing terminal is greater than the displacement threshold in the time period during which the photographing terminal performs the photographing and the last photographing. If the result of the determination by the photographing terminal is less than or equal to the displacement threshold, the photographing terminal determines not to perform the positioning. Therefore, the photographing terminal determines that it is not necessary to send the positioning request to the positioning terminal, but obtains the last saved position information from the memory and has taken the photograph. The photos match, and then add a location tag to the corresponding photo based on the last saved location information. If the result of the determination by the photographing terminal is greater than the displacement threshold, the photographing terminal determines that the positioning request needs to be sent to the positioning terminal, and sends a positioning request to the positioning terminal. After receiving the positioning request, the positioning terminal determines whether the time difference between receiving the positioning request and receiving the last positioning request is less than a time threshold. If the result of the determination by the positioning terminal is less than or equal to the time threshold, it is determined that the positioning is not performed. The positioning terminal sends at least one of a notification that no positioning is performed to the photographing terminal, and an identifier of the photo in the positioning request or a time of photographing; or the positioning terminal transmits the last location information to the photographing terminal, and locates the photo in the request At least one of the time of identification or photographing. If the result of the positioning terminal determination is greater than the time threshold, the positioning terminal determines to perform positioning. The locating terminal can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information. After obtaining the current location information, the positioning terminal sends the current location information to the camera terminal for matching and adding a label, or after acquiring the current location information, the positioning terminal sends the current location information to the third-party server and sends the current location information to the third-party server. The third-party server performs matching and labeling. For details, refer to the foregoing embodiment. The description is not repeated here.
针对于在拍照终端进行拍摄时,定位终端为拍照终端进行定位并向拍照终端提供位置信息的场景,本申请提出的技术方案与现有技术相比,只有在定位 终端接收到拍照终端发送的定位请求,并且,定位终端和/或拍照终端经过判断确定确实需要进行定位时,定位终端才会通过定位获取当前的位置信息,有效减少了定位终端的电量的消耗。For the scenario in which the positioning terminal performs positioning for the camera terminal and provides the location information to the camera terminal, the technical solution proposed by the present application is only positioned in comparison with the prior art. The terminal receives the location request sent by the camera terminal, and when the location terminal and/or the camera terminal determine that the location needs to be determined, the location terminal obtains the current location information by using the location, thereby effectively reducing the power consumption of the location terminal.
请参阅图2,图2是本申请提供的一种提供位置信息的装置的结构示意图。本实施例的提供位置信息的装置包括:连接建立模块201、接收模块202、第一判断模块203、确定模块204以及获取发送模块205。Please refer to FIG. 2. FIG. 2 is a schematic structural diagram of an apparatus for providing location information provided by the present application. The apparatus for providing location information in this embodiment includes: a connection establishment module 201, a receiving module 202, a first judging module 203, a determining module 204, and an obtaining and transmitting module 205.
所述连接建立模块201用于建立与拍照终端之间的连接,其中,所述定位终端与所述拍照终端之间的距离不超过预设阈值。The connection establishing module 201 is configured to establish a connection with the photographing terminal, wherein a distance between the positioning terminal and the photographing terminal does not exceed a preset threshold.
所述接收模块202用于接收所述拍照终端通过所述连接发送的定位请求,其中,所述定位请求包括所述拍照终端拍摄的照片的标识或者拍照的时间中的至少一个。The receiving module 202 is configured to receive a positioning request that is sent by the photographing terminal through the connection, where the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing.
所述第一判断模块203用于判断以下至少一个:所述接收模块202接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述接收模块202接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值。The first determining module 203 is configured to determine at least one of the following: the receiving module 202 receives the time difference between the positioning request and the last positioning request is greater than a time threshold; and the receiving module 202 receives the positioning request and the last time Whether the displacement amount of the positioning terminal is greater than the displacement threshold during the time period of the positioning request.
所述确定模块204用于根据判断的结果确定是否进行定位;The determining module 204 is configured to determine whether to perform positioning according to the result of the determining;
所述获取发送模块205用于仅当确定进行定位时,获取当前的位置信息,并通过所述连接向所述拍照终端发送所述当前的位置信息,和所述定位请求包括的部分或全部信息。The obtaining and sending module 205 is configured to: when determining to perform positioning, acquire current location information, and send the current location information to the camera terminal through the connection, and some or all information included in the positioning request. .
请参阅图3,图3是本申请提供的一种提供位置信息的装置的结构示意图。本实施例的提供位置信息的装置包括:连接建立模块301、接收模块302、第一判断模块303、确定模块304以及获取发送模块306。 Please refer to FIG. 3. FIG. 3 is a schematic structural diagram of an apparatus for providing location information provided by the present application. The device for providing location information in this embodiment includes: a connection establishing module 301, a receiving module 302, a first determining module 303, a determining module 304, and an obtaining transmitting module 306.
所述连接建立模块301用于建立与拍照终端之间的连接,其中,所述定位终端与所述拍照终端之间的距离不超过预设阈值。The connection establishing module 301 is configured to establish a connection with the photographing terminal, wherein a distance between the positioning terminal and the photographing terminal does not exceed a preset threshold.
所述接收模块302用于接收所述拍照终端通过所述连接发送的定位请求,其中,所述定位请求包括所述拍照终端拍摄的照片的标识或者拍照的时间中的至少一个。The receiving module 302 is configured to receive a positioning request that is sent by the photographing terminal through the connection, where the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing.
所述第一判断模块303用于判断以下至少一个:所述接收模块302接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述接收模块302接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值。The first determining module 303 is configured to determine at least one of the following: the receiving module 302 receives the time difference between the positioning request and the last positioning request is greater than a time threshold; and the receiving module 302 receives the positioning request and the last time Whether the displacement amount of the positioning terminal is greater than the displacement threshold during the time period of the positioning request.
所述确定模块304用于根据判断的结果确定是否进行定位;The determining module 304 is configured to determine whether to perform positioning according to the result of the determining;
所述获取发送模块306用于仅当确定进行定位时,获取当前的位置信息,并通过所述连接向所述拍照终端发送所述当前的位置信息,和所述定位请求包括的部分或全部信息。The obtaining and sending module 306 is configured to: when determining to perform positioning, acquire current location information, and send the current location information to the camera terminal through the connection, and some or all information included in the positioning request. .
可选的,所述装置还包括第二判断模块308以及优先级确定模块309,所述第二判断模块308用于判断所述定位终端的剩余电量是否大于电量阈值;所述优先级确定模块309用于在所述定位终端的剩余电量大于电量阈值时,按第一扫描优先级确定定位方式;在所述定位终端的剩余电量小于电量阈值时,按第二扫描优先级确定定位方式,其中,所述第一扫描优先级不同于所述第二扫描优先级。Optionally, the device further includes a second determining module 308 and a priority determining module 309, where the second determining module 308 is configured to determine whether the remaining power of the positioning terminal is greater than a power threshold; the priority determining module 309 When the remaining power of the positioning terminal is greater than the power threshold, the positioning mode is determined according to the first scanning priority; when the remaining power of the positioning terminal is less than the power threshold, the positioning mode is determined according to the second scanning priority, where The first scan priority is different from the second scan priority.
可选的,所述装置还包括第三判断模块310,所述第三判断模块310用于判断所述定位终端的当前环境是室内还是室外;所述获取发送模块306用于在所述定位终端的当前环境为室内时,采用无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式中的至少一种获取当前的位置信息;在所述 定位终端的当前环境为室外时,采用全球导航卫星系统GNSS定位方式获取当前的位置信息。Optionally, the device further includes a third determining module 310, where the third determining module 310 is configured to determine whether the current environment of the positioning terminal is indoors or outdoors; and the obtaining sending module 306 is configured to be in the positioning terminal. When the current environment is indoor, wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning Obtaining current location information by at least one of a mode, a broadcast signal positioning mode, an optical positioning mode, and a computer vision positioning mode; When the current environment of the positioning terminal is outdoor, the GNSS positioning method of the global navigation satellite system is used to obtain the current location information.
可选的,所述第一判断模块303用于判断所述接收模块302接收所述定位请求和接收上一次定位请求的时间差是否大于时间阈值,在所述接收模块302接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,判断所述接收模块接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移是否大于位移阈值;所述确定模块304用于在所述定位终端的位移大于位移阈值时,确定进行定位。Optionally, the first determining module 303 is configured to determine whether the time difference between the receiving the positioning request and the receiving the last positioning request is greater than a time threshold, and receiving, by the receiving module 302, the positioning request and receiving The time difference of the last positioning request is greater than the time threshold, and the time interval between the receiving of the positioning request and the receiving of the previous positioning request is determined, whether the displacement of the positioning terminal is greater than a displacement threshold; When the displacement of the positioning terminal is greater than the displacement threshold, it is determined to perform positioning.
可选的,所述确定模块304用于在所述定位终端接收所述定位请求和接收上一次定位请求的时间差小于或等于时间阈值时,确定不进行定位;或,在所述定位终端接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,且,所述定位终端接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移小于或者等于位移阈值时,确定不进行定位。Optionally, the determining module 304 is configured to determine, when the positioning terminal receives the positioning request and the time difference between receiving the last positioning request is less than or equal to a time threshold, determining that the positioning is not performed; or receiving, at the positioning terminal, The time difference between the positioning request and the receiving the last positioning request is greater than a time threshold, and the displacement of the positioning terminal is less than or equal to the displacement threshold in a time period between the positioning terminal receiving the positioning request and receiving the last positioning request. When it is determined, no positioning is performed.
可选的,所述获取发送模块306用于在确定不进行定位时,向所述拍照终端发送没有进行定位的通知和所述定位请求中的照片的标识或者拍照的时间中的至少一个;或,向所述拍照终端发送上一次的位置信息所述定位请求中的照片的标识或者拍照的时间中的至少一个。Optionally, the acquiring and sending module 306 is configured to, when determining that no positioning is performed, send, to the photographing terminal, at least one of a notification of not performing positioning and a time of identifying or photographing a photo in the positioning request; or And transmitting, to the photographing terminal, at least one of an identification of a photo in the positioning request of the last position information or a time of photographing.
可选的,所述装置还包括开启模块305以及关闭模块307,所述开启模块305用于开启所述定位模块;所述关闭模块307用于关闭所述定位模块。Optionally, the device further includes an opening module 305 and a closing module 307, the opening module 305 is configured to open the positioning module, and the closing module 307 is configured to close the positioning module.
参阅图4,图4是本申请提供的一种获取位置信息的装置的结构示意图。本实施例的获取位置信息的装置包括:连接模块401、确定模块402、发送模块403、接收模块404、匹配模块405以及添加模块406。Referring to FIG. 4, FIG. 4 is a schematic structural diagram of an apparatus for acquiring location information provided by the present application. The device for acquiring location information in this embodiment includes: a connection module 401, a determining module 402, a sending module 403, a receiving module 404, a matching module 405, and an adding module 406.
所述连接模块401用于与定位终端建立连接,所述定位终端与所述拍照终端相距不超过预设距离; The connection module 401 is configured to establish a connection with the positioning terminal, where the positioning terminal is not more than a preset distance from the camera terminal;
所述确定模块402用于确定是否需要发送定位请求;The determining module 402 is configured to determine whether a positioning request needs to be sent;
所述发送模块403用于仅当确定需要发送定位请求时,通过所述连接向所述定位终端发送定位请求,所述定位请求包括照片的标识和照片的拍照时间中的至少一个;The sending module 403 is configured to send a positioning request to the positioning terminal by using the connection, where the positioning request includes at least one of an identifier of a photo and a photographing time of a photo, when determining that a positioning request needs to be sent;
所述接收模块404用于接收所述定位终端根据所述定位请求返回的位置信息,和所述定位请求包括的部分或全部信息;The receiving module 404 is configured to receive location information returned by the positioning terminal according to the positioning request, and part or all of information included in the positioning request;
所述匹配模块405用于根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述位置信息与所述已拍摄的照片匹配;The matching module 405 is configured to match the location information with the captured photo according to part or all of the information included in the positioning request and information that the camera terminal has taken a photo;
所述添加模块406用于根据所述位置信息为对应的照片添加位置标签。The adding module 406 is configured to add a location tag to the corresponding photo according to the location information.
可选的,所述确定模块402用于判断所述拍照终端本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,在所述拍照终端本次进行拍摄和上一次进行拍摄的时间差大于时间阈值时,确定需要发送定位请求,在所述拍照终端本次进行拍摄和上一次进行拍摄的时间差小于或者等于时间阈值时,确定不需要发送定位请求;或者,所述确定模块402用于判断在所述拍照终端本次进行拍摄和上一次进行拍摄的时间段内,所述拍照终端的位移量是否大于位移阈值,在拍照终端的位移量大于位移阈值时,确定需要发送定位请求,在拍照终端的位移量小于或者等于位移阈值时,确定不需要发送定位请求。Optionally, the determining module 402 is configured to determine whether the time difference between the photographing terminal and the last shooting is greater than a time threshold, and the time difference between the photographing terminal and the last shooting is greater than the time. When the threshold is determined, it is determined that the positioning request needs to be sent, and when the time difference between the current shooting and the last shooting is less than or equal to the time threshold, it is determined that the positioning request does not need to be sent; or the determining module 402 is configured to determine Whether the displacement amount of the photographing terminal is greater than a displacement threshold during the time when the photographing terminal performs the photographing and the last photographing, and when the displacement of the photographing terminal is greater than the displacement threshold, it is determined that the positioning request needs to be sent, and the photographing terminal is required. When the displacement amount is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
可选的,所述装置还包括获取模块407,所述获取模块407用于在收到所述定位终端没有进行定位的通知时,获取发送所述定位请求之前,最近一次保存的位置信息;所述匹配模块405用于根据所述定位终端返回照片的标识和/或照片的拍摄时间,以及所述拍照终端已拍摄照片的信息,将所述最近一次保存的位置信息与所述已拍摄的照片匹配;所述添加模块406用于根据所述最近一次保存的位置信息为对应的照片添加位置标签。 Optionally, the device further includes an obtaining module 407, configured to acquire, after receiving the notification that the positioning terminal does not perform positioning, location information that is saved last time before the positioning request is sent; The matching module 405 is configured to display the last saved location information and the taken photo according to the identifier of the photo returned by the positioning terminal and/or the shooting time of the photo, and the information that the camera terminal has taken the photo. Matching; the adding module 406 is configured to add a location tag to the corresponding photo according to the last saved location information.
本发明实施例涉及一种定位终端,所述定位终端为具有定位、通信等功能的终端,例如,定位终端可以是智能手机、平板电脑、笔记本电脑和导航仪等等中的任意一种。定位终端定位的方式包括但不限于无线保真(Wi-Fi)定位方式,蓝牙(Bluetooth)定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式以及全球导航卫星系统(Global Navigation Satellite System,GNSS)定位方式等等。The embodiment of the invention relates to a positioning terminal, which is a terminal having functions of positioning, communication, etc., for example, the positioning terminal may be any one of a smart phone, a tablet computer, a notebook computer, a navigator and the like. Positioning terminal positioning methods include, but are not limited to, wireless fidelity (Wi-Fi) positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning Mode, ultra-wideband radio positioning, broadcast signal positioning, optical positioning, computer vision positioning, and Global Navigation Satellite System (GNSS) positioning methods.
以移动终端为手机为例,图5示出的是与本发明实施例相关的智能手机500的部分结构的框图。参考图5,智能手机500包括、通信模块510、存储器520、输入单元530、显示单元540、位移传感器550、音频电路560、定位模块570、处理器580、以及电源590等部件。本领域技术人员可以理解,图5中示出的智能手机结构并不构成对智能手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Taking the mobile terminal as a mobile phone as an example, FIG. 5 is a block diagram showing a part of the structure of the smartphone 500 related to the embodiment of the present invention. Referring to FIG. 5, the smart phone 500 includes components such as a communication module 510, a memory 520, an input unit 530, a display unit 540, a displacement sensor 550, an audio circuit 560, a positioning module 570, a processor 580, and a power source 590. Those skilled in the art will appreciate that the smartphone structure illustrated in FIG. 5 does not constitute a limitation to a smartphone, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements.
下面结合图5对智能手机500的各个构成部件进行具体的介绍:The components of the smartphone 500 will be specifically described below with reference to FIG. 5:
通信模块510用于与拍照终端进行通信。通信模块510可以是Wi-Fi模块、蓝牙模块、蜂窝通信模块等等无线通信模块中的任意一种,也可以是串口模块、USB模块等等有线通信模块中的任意一种。本实施例中以蓝牙模块为例,蓝牙模块包括芯片以及外围器件,能够实现短距离的无线通信。The communication module 510 is configured to communicate with the camera terminal. The communication module 510 may be any one of a wireless communication module such as a Wi-Fi module, a Bluetooth module, a cellular communication module, or the like, or may be any one of a serial communication module, a USB module, and the like. In this embodiment, a Bluetooth module is taken as an example. The Bluetooth module includes a chip and peripheral devices, and can implement short-range wireless communication.
存储器520可用于存储软件程序以及模块,处理器580通过运行存储在存储器520的软件程序以及模块,从而执行智能手机500的各种功能应用以及数据处理。存储器520可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图象播放功能等)等;存储数据区可存储根据智能手机500的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器520可以包括高速随机存取存储器,还 可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 520 can be used to store software programs and modules, and the processor 580 executes various functional applications and data processing of the smartphone 500 by running software programs and modules stored in the memory 520. The memory 520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data (such as audio data, phone book, etc.) created according to the use of the smartphone 500. In addition, the memory 520 may include a high speed random access memory, Non-volatile memory may be included, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元530可用于接收输入的数字或字符信息,以及产生与智能手机500的用户设置以及功能控制有关的键信号输入。具体地,输入单元530可包括触控面板531以及其他输入设备532。触控面板531,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板531附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板531可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器580,并能接收处理器580发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板531。除了触控面板531,输入单元530还可以包括其他输入设备532。具体地,其他输入设备532可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 530 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the smartphone 500. Specifically, the input unit 530 may include a touch panel 531 and other input devices 532. The touch panel 531, also referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 131 or near the touch panel 531. Operation), and drive the corresponding connecting device according to a preset program. Optionally, the touch panel 531 can include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 580 is provided and can receive commands from the processor 580 and execute them. In addition, the touch panel 531 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 531, the input unit 530 may also include other input devices 532. Specifically, other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
显示单元540可用于显示由用户输入的信息或提供给用户的信息以及智能手机500的各种菜单。显示单元540可包括显示面板541,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板541。进一步的,触控面板531可覆盖显示面板541,当触控面板531检测到在其上或附近的触摸操作后,传送给处理器580以确定触摸事件的类型,随后处理器580根据触摸事件的类型在显示面板541上提供相应的视觉输出。虽然在图5中,触控面板531与显示面板541是作为两个独立的部件来实现智能手机500的输入和输入功能,但是在某些实施例中,可以将触控面板531与显示面板541集成而实现智能手机500的输入和输出功 能。The display unit 540 can be used to display information input by the user or information provided to the user and various menus of the smartphone 500. The display unit 540 can include a display panel 541. Alternatively, the display panel 541 can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch panel 531 can cover the display panel 541. When the touch panel 531 detects a touch operation on or near it, the touch panel 531 transmits to the processor 580 to determine the type of the touch event, and then the processor 580 according to the touch event. The type provides a corresponding visual output on display panel 541. Although in FIG. 5, the touch panel 531 and the display panel 541 are two independent components to implement the input and input functions of the smartphone 500, in some embodiments, the touch panel 531 and the display panel 541 may be Integrate and realize the input and output functions of the smartphone 500 can.
传感器550包括加速度传感器、陀螺仪传感器等可以测量智能手机500的位移的传感器中的任意一种或者多种的组合。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,所以,还可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等。传感器550还可以选择性包括光传感器、气压计、温度传感器、接近传感器等等。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可结合、气压计、温度传感器等等判断智能手机500的位置,例如,判断智能手机位于室内还是室外等等。接近传感器可在智能手机500移动到耳边时,关闭显示面板541和/或背光。智能手机500其他传感器,在此不再赘述。The sensor 550 includes a combination of any one or more of an acceleration sensor, a gyro sensor, and the like that can measure the displacement of the smartphone 500. As a kind of motion sensor, the accelerometer sensor can detect the acceleration of each direction (usually three axes), and the magnitude and direction of gravity can be detected at rest. Therefore, it can also be used to identify the posture of the mobile phone (such as horizontal and vertical screen). Switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping). Sensor 550 can also optionally include a light sensor, a barometer, a temperature sensor, a proximity sensor, and the like. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may determine the location of the smart phone 500 in combination with a barometer, a temperature sensor, or the like, for example, determining whether the smart phone is indoors or outdoors. The proximity sensor can turn off the display panel 541 and/or the backlight when the smartphone 500 moves to the ear. Other sensors of the smart phone 500 will not be described here.
音频电路560、扬声器561,麦克风562可提供用户与智能手机500之间的音频接口。音频电路560可将接收到的音频数据转换后的电信号,传输到扬声器561,由扬声器561转换为声音信号输出;另一方面,麦克风562将收集的声音信号转换为电信号,由音频电路560接收后转换为音频数据,再将音频数据输出至通信模块510以发送给比如另一手机,或者将音频数据输出至存储器520以便进一步处理。 Audio circuit 560, speaker 561, microphone 562 can provide an audio interface between the user and smartphone 500. The audio circuit 560 can transmit the converted electrical data of the received audio data to the speaker 561 for conversion to the sound signal output by the speaker 561; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal by the audio circuit 560. After receiving, it is converted into audio data, and the audio data is output to the communication module 510 for transmission to, for example, another mobile phone, or the audio data is output to the memory 520 for further processing.
定位模块570可以是Wi-Fi模块,蓝牙模块,蜂窝模块,地磁模块,超声波模块,红外模块,射频标签模块,Zigbee模块,超宽带无线电模块光模块,摄像模块中的任意一种或者多种的组合。例如,当定位终端采用GNSS定位方式进行定位时,定位模块是GNSS模块,当定位终端采用Wi-Fi定位方式进行定位时,定位模块是Wi-Fi模块等等。可以理解的是,当定位模块570是Wi-Fi模块,蓝牙模块,蜂窝模块中的任意一种时,定位模块570和通信模块510也可以是同一模块。 The positioning module 570 can be any one or more of a Wi-Fi module, a Bluetooth module, a cellular module, a geomagnetic module, an ultrasonic module, an infrared module, a radio frequency tag module, a Zigbee module, an ultra-wideband radio module optical module, and a camera module. combination. For example, when the positioning terminal is positioned by using the GNSS positioning mode, the positioning module is a GNSS module. When the positioning terminal uses the Wi-Fi positioning mode for positioning, the positioning module is a Wi-Fi module or the like. It can be understood that when the positioning module 570 is any one of a Wi-Fi module, a Bluetooth module, and a cellular module, the positioning module 570 and the communication module 510 may also be the same module.
处理器580是智能手机500的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器520内的软件程序和/或模块,以及调用存储在存储器520内的数据,执行智能手机500的各种功能和处理数据,从而对智能手机500进行整体监控。可选的,处理器580可包括一个或多个处理单元;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器580中。 Processor 580 is the control center of smartphone 500, which connects various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in memory 520, and recalling data stored in memory 520. The smartphone 500 is monitored as a whole by performing various functions and processing data of the smartphone 500. Optionally, the processor 580 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 580.
智能手机500还包括给各个部件供电的电源590(比如电池),优选的,电源可以通过电源管理系统与处理器580逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗等功能。The smart phone 500 also includes a power source 590 (such as a battery) that supplies power to various components. Preferably, the power source can be logically coupled to the processor 580 through a power management system to manage functions such as charging, discharging, and power consumption through the power management system.
尽管未示出,智能手机500还可以包括摄像头等,在此不再赘述。Although not shown, the smartphone 500 may further include a camera or the like, which will not be described herein.
智能手机500与拍照终端的距离不超过预设阈值。其中,拍照终端为具有拍摄功能的终端,包括但不限于数码相机、另一台智能手机、平板电脑等等。预设阈值可以根据实际需要人为根据经验进行设置,设置时需保证智能手机500和拍照终端之间能够正常通信以及将智能手机500定位的位置作为拍照终端的位置不会严重失实而导致不可接受即可。The distance between the smartphone 500 and the camera terminal does not exceed a preset threshold. The camera terminal is a terminal having a shooting function, including but not limited to a digital camera, another smart phone, a tablet computer, and the like. The preset threshold can be set according to the actual needs according to the actual needs. The setting needs to ensure that the normal communication between the smart phone 500 and the photographing terminal and the position where the smart phone 500 is positioned as the position of the photographing terminal are not seriously unrealistic, resulting in unacceptable can.
可选的,智能手机500与拍照终端之间可以通过无线或者有线的方式建立通信连接,例如,智能手机500与拍照终端之间可以通过Wi-Fi、Bluetooth、蜂窝等无线方式进行通信连接,也可以通过通用异步收发传输器(Universal Asynchronous Receiver/Transmitter,UART)、网口、通用串行总线(Universal Serial Bus,USB)等有线方式建立通信连接。其中,智能手机500与拍照终端之间连接方式与现有技术相同,此处不再展开赘述。Optionally, a communication connection can be established between the smart phone 500 and the camera terminal through a wireless or wired manner. For example, the smart phone 500 and the camera terminal can be connected by wireless means such as Wi-Fi, Bluetooth, and cellular. The communication connection can be established by a wired method such as a Universal Asynchronous Receiver/Transmitter (UART), a network port, or a Universal Serial Bus (USB). The connection between the smart phone 500 and the camera terminal is the same as the prior art, and details are not described herein again.
可选的,在建立连接后,智能手机500向拍照终端发送交换信息,其中,交换信息可以是智能手机500和拍照终端预先约定的字符。拍照终端在接收到 定位终端发送的交换信息后,通过交换信息从智能手机500发出至被拍照终端接收之间的时间计算出拍照终端和智能手机500之间的距离。拍照终端和智能手机500之间的距离等于从智能手机500发出至被定位终端接收之间的时间时间乘以交换信息传输的速度。Optionally, after the connection is established, the smart phone 500 sends the exchange information to the photographing terminal, wherein the exchange information may be a character pre-agreed by the smart phone 500 and the photographing terminal. The camera terminal is receiving After locating the exchange information sent by the terminal, the distance between the camera terminal and the smartphone 500 is calculated by the time between the exchange of the information from the smartphone 500 and the receipt of the camera terminal. The distance between the camera terminal and the smartphone 500 is equal to the time between the time the smartphone 500 is sent and the time it is received by the location terminal multiplied by the speed at which the information is transmitted.
如果智能手机500与拍照终端之间的距离小于预设阈值,则拍照终端在触控面板上弹出提示界面。其中,提示界面包括允许按钮和不允许按钮。如果用户通过点击触控面板选择了允许按钮,则拍照终端允许向定位终端发送请求定位,如果用户通过点击触控面板选择了不允许按钮,则拍照终端不允许向定位终端请求定位。其中,预设阈值可以根据实际需要人为根据经验进行设置,设置时需保证智能手机500和拍照终端之间能够正常通信以及将智能手机500定位的位置作为拍照终端的位置不会严重失实而导致不可接受即可。If the distance between the smart phone 500 and the camera terminal is less than a preset threshold, the camera terminal pops up a prompt interface on the touch panel. The prompt interface includes an allow button and a disallow button. If the user selects the permission button by clicking the touch panel, the camera terminal allows the request location to be sent to the location terminal. If the user selects the disallow button by clicking the touch panel, the camera terminal does not allow the location terminal to be requested. The preset threshold value may be set according to actual needs according to actual needs, and the setting needs to ensure that the normal communication between the smart phone 500 and the photographing terminal and the position where the smart phone 500 is positioned as the position of the photographing terminal are not seriously deficient. Accept it.
可以理解的是,可以是智能手机500的通信模块510发起建立与拍照终端之间的连接,也可以是拍照终端发起建立与智能手机500的通信模块510之间的连接。智能手机500的通信模块510与拍照终端之间可以在开启电源后,一直保持通信连接,也可以在拍照终端需要进行拍照时,才建立智能手机500的通信模块510与拍照终端之间的连接,甚至可以在拍照终端需要向智能手机500请求定位时,才建立智能手机500与拍照终端之间的连接等等。It can be understood that the communication module 510 of the smart phone 500 may initiate a connection between the establishing and the camera terminal, or the camera terminal may initiate a connection with the communication module 510 of the smart phone 500. The communication module 510 of the smart phone 500 and the camera terminal can maintain the communication connection after the power is turned on, and the connection between the communication module 510 of the smart phone 500 and the camera terminal can be established when the camera terminal needs to take a picture. It is even possible to establish a connection between the smartphone 500 and the photographing terminal, etc., when the photographing terminal needs to request positioning from the smartphone 500.
可选的,如果用户通过点击拍照终端的触控面板选择了允许按钮或者通过其他方式开启了拍照终端发送定位请求的功能,则当用户使用拍照终端进行一张照片的拍摄时,拍照终端通过已经建立的通信连接向智能手机500的通信模块510发送定位请求。或者用户通过拍照终端进行拍照时,启动定时器进行定时,定时时间到后,拍照终端通过已经建立的通信连接向智能手机500的通信模块510发送定位请求。其中,定位请求可以包括照片的标识或者拍照的时间中的至少一个,定位请求还可以包括拍照终端的标识等等。照片的标识通常为 照片的唯一的编码,可用于识别照片。拍照的时间为用户进行拍照操作以获得照片的时间。拍照终端的标识通常为拍照终端的唯一的编码,可用于识别拍照终端。Optionally, if the user selects the allow button by clicking the touch panel of the photographing terminal or enables the photographing terminal to send a positioning request by using other methods, when the user uses the photographing terminal to take a photo, the photographing terminal passes The established communication connection sends a location request to the communication module 510 of the smartphone 500. Or when the user takes a picture through the camera terminal, the timer is started to perform timing. After the time is up, the camera terminal sends a positioning request to the communication module 510 of the smart phone 500 through the established communication connection. The location request may include at least one of an identifier of the photo or a time of photographing, and the location request may further include an identifier of the photographing terminal and the like. The logo of the photo is usually The unique encoding of the photo that can be used to identify the photo. The time of taking a photo is the time when the user takes a photo to obtain a photo. The identification of the camera terminal is usually a unique code of the camera terminal and can be used to identify the camera terminal.
可选的,当智能手机500接收到拍照终端发送的定位请求后,处理器580先判断通信模块510接收定位请求和接收上一次定位请求的时间差是否大于时间阈值,如果判断结果小于或者等于时间阈值,则确定不进行定位,如果判断结果为大于时间阈值,则处理器580进一步判断通信模块510接收定位请求和接收上一次定位请求之间的时间段内,智能手机500的位移是否大于位移阈值,如果判断结果为小于或者等于位移阈值,则确定不进行定位,如果判断结果为大于位移阈值,则确定进行定位。其中,时间阈值可以根据用户的需要进行设置,设置时,只需保证时间阈值设置得足够的小以至于在通常的状况下,通信模块510接收本次定位请求和接收上一次定位请求之间的时间差内,智能手机500和拍照终端的位移可以忽略不计。位移阈值可以根据用户的需要进行设置,设置时,只需保证智能手机500接收定位请求和接收上一次定位请求之间的时间段内,智能手机500和拍照终端的位移可以忽略不计,其中,时间段可以是10秒,30秒或半小时等等。智能手机500可以通过读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据进而计算出智能手机500的位移。例如,智能手机500的通信模块510在接收上一次定位请求的时间读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据,在本次接收定位请求的时间读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据,从而计算出两次定位请求之间的时间段内,智能手机500的位移。Optionally, after the smart phone 500 receives the positioning request sent by the camera terminal, the processor 580 first determines whether the time difference between the receiving the positioning request and the receiving the previous positioning request by the communication module 510 is greater than a time threshold, and if the determination result is less than or equal to the time threshold. If the result of the determination is greater than the time threshold, the processor 580 further determines whether the displacement of the smart phone 500 is greater than the displacement threshold during the time period between the receiving of the positioning request by the communication module 510 and the receiving of the previous positioning request. If the result of the determination is less than or equal to the displacement threshold, it is determined that the positioning is not performed, and if the determination result is greater than the displacement threshold, it is determined to perform the positioning. The time threshold can be set according to the needs of the user. When setting, it is only necessary to ensure that the time threshold is set small enough that the communication module 510 receives the current positioning request and receives the previous positioning request under normal conditions. Within the time difference, the displacement of the smartphone 500 and the camera terminal is negligible. The displacement threshold can be set according to the needs of the user. When setting, the time interval between the smartphone 500 and the photographing terminal can be neglected only when the smartphone 500 receives the positioning request and receives the last positioning request, wherein the time is negligible. The segment can be 10 seconds, 30 seconds or half an hour, and so on. The smartphone 500 can calculate the displacement of the smartphone 500 by reading sensor data of one or more of an acceleration sensor, a gyro sensor, and the like. For example, the communication module 510 of the smartphone 500 reads sensor data of one or more of the acceleration sensor, the gyro sensor, and the like at the time of receiving the last positioning request, and reads the acceleration sensor and the gyro at the time of receiving the positioning request. The sensor data of one or more of the sensors and the like, thereby calculating the displacement of the smartphone 500 during the time period between the two positioning requests.
可选的,如果确定不进行定位,智能手机500的通信模块510向拍照终端发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,向拍照终端发送上一次的位置信息,以及定位请求中的照片的标 识或者拍照的时间中的至少一个。其中,位置信息可以为经纬度信息,也可以是解析经纬度后得到的地址信息。Optionally, if it is determined that the positioning is not performed, the communication module 510 of the smart phone 500 sends a notification that the positioning is not performed to the photographing terminal, and at least one of the identifier of the photo in the positioning request or the time of photographing; or, sends the photographing terminal to the photographing terminal. Last location information, as well as the title of the photo in the targeting request At least one of the time of recognition or photographing. The location information may be latitude and longitude information, or may be address information obtained after parsing the latitude and longitude.
可选的,如果确定进行定位,智能手机500的处理器580可以直接根据指定的定位方式确定定位方式,并调用定位模块570进行定位以获取当前的位置信息,处理器580也可以根据智能手机500的剩余电量或者智能手机500的当前环境选择定位方式,调用定位模块570进行定位以获取当前的位置信息,以提高定位的效率和节省电量。其中,指定的定位方式可以是无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式,GNSS定位方式中的任意一种或多种的组合。Optionally, if it is determined that the positioning is performed, the processor 580 of the smart phone 500 may directly determine the positioning manner according to the specified positioning manner, and call the positioning module 570 to perform positioning to obtain current location information, and the processor 580 may also be configured according to the smart phone 500. The remaining power or the current environment of the smart phone 500 selects the positioning mode, and the positioning module 570 is called to obtain the current location information to improve the positioning efficiency and save power. The specified positioning mode may be wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning A combination of any one or more of a mode, a broadcast signal positioning mode, an optical positioning mode, a computer vision positioning mode, and a GNSS positioning mode.
在一实施例中,智能手机500的处理器580根据剩余电量选择定位方式。具体地,处理器580判断智能手机500的剩余电量是否大于电量阈值;若智能手机500的剩余电量大于电量阈值,则按第一扫描优先级确定定位方式;若智能手机500的剩余电量小于电量阈值,则按第二扫描优先级确定定位方式。其中,电量阈值可以根据需要进行设置。第一扫描优先级与第二扫描优先级用于表示定位方式的优先级别的排序。按照第一扫描优先级或第二扫描优先级确定定位方式时,首先选择优先级别最高的定位方式,如果优先级别最高的定位方式不能被使用,则采用优先级别次高的定位方式,依次类推,直到优先级别最低的定位方式。第一扫描优先级不同于第二扫描优先级,可以是第一扫描优先级中的定位方式可与第二扫描优先级中的定位方式不同,也可以是第一扫描优先级中的定位方式与第二扫描优先级中的定位方式相同,但是第一扫描优先级中的定位方式的优先级别不同于第二扫描优先级中的定位方式的优先级别。通常,第一扫描优先级中定位方式的优先级别按照定位方式的准确度降序进行排列, 第二扫描优先级中的定位方式的优先级别按照定位方式的耗电量的大小升序进行排列。例如,GNSS定位方式的定位精度最高,功耗最大,蜂窝定位方式的定位精度最低,功耗也最低,Wi-Fi定位方式居中。所以,第一扫描优先级为GNSS定位方式->Wi-Fi定位方式->蜂窝定位方式,第二扫描优先级为蜂窝定位方式->Wi-Fi定位方式->GNSS定位方式。或者,通过第一电量阈值和第二电量阈值将电量划分为三个区域,处理器580判断智能手机500的剩余电量落入哪一个区域,如果智能手机500的剩余电量落入大于或等于第一电量阈值的区间,则按第一扫描优先级确定定位方式,如果智能手机500剩余电量落入小于或等于第二电量阈值的区间,则按第二扫描优先级别确定定位方式,如果智能手机500的剩余电量落入小于第一电量阈值而大于第二电量阈值的区间,则按第三扫描优先级别确定定位方式。例如,第一扫描优先级定位方式为GNSS定位方式->Wi-Fi定位方式->蜂窝定位方式,第二扫描优先级定位方式为蜂窝定位方式->Wi-Fi定位方式->GNSS定位方式,第三扫描优先级定位方式为Wi-Fi定位方式->GNSS定位方式->蜂窝定位方式。In an embodiment, the processor 580 of the smartphone 500 selects a positioning mode based on the remaining power. Specifically, the processor 580 determines whether the remaining power of the smart phone 500 is greater than the power threshold; if the remaining power of the smart phone 500 is greater than the power threshold, determining the positioning mode according to the first scanning priority; if the remaining power of the smart phone 500 is less than the power threshold Then, the positioning mode is determined according to the second scanning priority. Among them, the power threshold can be set as needed. The first scan priority and the second scan priority are used to indicate the ordering of the priority levels of the positioning modes. When the positioning mode is determined according to the first scanning priority or the second scanning priority, the positioning mode with the highest priority is selected first. If the positioning mode with the highest priority cannot be used, the positioning mode with the second highest priority is used, and so on. Until the lowest priority positioning method. The first scanning priority is different from the second scanning priority, and the positioning manner in the first scanning priority may be different from the positioning manner in the second scanning priority, or may be the positioning manner in the first scanning priority. The positioning manner in the second scanning priority is the same, but the priority of the positioning mode in the first scanning priority is different from the priority of the positioning mode in the second scanning priority. Generally, the priority of the positioning mode in the first scanning priority is arranged in descending order of the accuracy of the positioning mode. The priority of the positioning mode in the second scanning priority is sorted in ascending order according to the power consumption of the positioning mode. For example, the GNSS positioning method has the highest positioning accuracy, the largest power consumption, the lowest positioning accuracy of the cellular positioning mode, and the lowest power consumption, and the Wi-Fi positioning mode is centered. Therefore, the first scanning priority is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode. Alternatively, the first power level threshold and the second power level threshold are used to divide the power into three areas, and the processor 580 determines which area the remaining power of the smart phone 500 falls into, if the remaining power of the smart phone 500 falls within the first or greater In the interval of the power threshold, the positioning mode is determined according to the first scanning priority. If the remaining power of the smart phone 500 falls within the interval less than or equal to the second power threshold, the positioning mode is determined according to the second scanning priority level, if the smart phone 500 If the remaining power falls within a section that is smaller than the first power threshold and greater than the second power threshold, the positioning mode is determined according to the third scan priority level. For example, the first scanning priority positioning mode is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority positioning mode is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode. The third scanning priority positioning mode is Wi-Fi positioning mode->GNSS positioning mode->cellular positioning mode.
在另一实施例中,处理器580根据当前环境选择定位方式。具体地,处理器580判断智能手机500的当前环境是室内还是室外。其中,处理器580可以通过读取和分析光传感器、气压计、温度传感器等传感器数据中的至少一个判断智能手机500的当前环境是在室内还是室外。若智能手机500的当前环境为室内,采用适合室内进行定位的定位方式,例如采用Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式等等中的至少一种获取当前的位置信息;若智能手机500的当前环境为室外,采用适合室外进行定位的定位方式,例如,采用GNSS定位方式等等获取当前的位置信息。 In another embodiment, the processor 580 selects a positioning mode based on the current environment. Specifically, the processor 580 determines whether the current environment of the smartphone 500 is indoors or outdoors. The processor 580 can determine whether the current environment of the smart phone 500 is indoors or outdoors by reading and analyzing at least one of sensor data such as a light sensor, a barometer, and a temperature sensor. If the current environment of the smart phone 500 is indoor, the positioning mode suitable for indoor positioning is adopted, for example, Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, and radio frequency tag positioning. The method, the Zigbee positioning mode, the ultra-wideband radio positioning mode, the broadcast signal positioning mode, the optical positioning mode, the computer vision positioning mode, and the like acquire at least one of the current location information; if the current environment of the smart phone 500 is outdoor, the adoption is suitable The positioning method for positioning in the outdoor, for example, the GNSS positioning method or the like is used to obtain the current location information.
可选的,为了能够减少耗电,可以在获取当前的位置信息之前,处理器580开启定位模块570,使得电源590向定位模块570进行供电,在获取当前的位置信息之后,关闭定位模块570,使得电源590不能向定位模块570进行供电。Optionally, in order to reduce the power consumption, the processor 580 can enable the positioning module 570 to enable the power supply 590 to supply power to the positioning module 570. After acquiring the current location information, the positioning module 570 is turned off. The power supply 590 is rendered incapable of supplying power to the positioning module 570.
可选的,在定位模块570获取到位置信息后,智能手机500通过通信模块510向拍照终端发送定位请求中的照片的标识或者拍照的时间中的至少一个,和定位模块570获取到的位置信息。Optionally, after the location module 570 obtains the location information, the smart phone 500 sends at least one of the identifier of the photo in the location request or the time of photographing to the camera terminal through the communication module 510, and the location information acquired by the location module 570. .
可选的,如果通信模块510发送的是没有进行定位的通知,则拍照终端获取发送定位请求之前,最近一次保存的位置信息,并根据通信模块510返回的照片的标识和/或照片的拍摄时间,以及拍照终端已拍摄照片的信息,将最近一次保存的位置信息与已拍摄的照片匹配,其中,照片的信息包括照片的标识和/或照片的拍摄时间等等。匹配成功后,再根据最近一次保存的位置信息为对应的照片添加位置标签。其中,照片的头文件中通常包括多个不同的标签,分别用于记录拍摄时间、快门速度、曝光补偿、焦距以及位置信息等等。位置标签是照片的头文件中专门用于记载位置信息的标签,例如,位置标签为可交换图像文件(Exchangeable Image File,EXIF)中专门用于记载全球定位数据的标签。Optionally, if the communication module 510 sends the notification that the positioning is not performed, the photographing terminal acquires the last saved location information before sending the positioning request, and according to the identifier of the photo returned by the communication module 510 and/or the shooting time of the photo. And the information that the photographing terminal has taken the photo, and the last saved location information is matched with the photographed photograph, wherein the photo information includes the logo of the photograph and/or the photographing time of the photograph, and the like. After the match is successful, the location tag is added to the corresponding photo according to the last saved location information. Among them, the head file of the photo usually includes a plurality of different labels for recording shooting time, shutter speed, exposure compensation, focal length and position information, and the like. A location tag is a tag in a header file of a photo that is specifically used to record location information. For example, a location tag is a tag specifically used to record global positioning data in an Exchangeable Image File (EXIF).
可选的,处理器580在确定不进行定位时,也可以不向拍照终端反馈任何信息。拍照终端在一段时间内没有接收到定位终端反馈的任何信息,就获取发送所述的定位请求之前,最近一次保存的位置信息,并根据通信模块510返回的照片的标识和/或照片的拍摄时间,以及拍照终端已拍摄照片的信息,将最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。Optionally, when determining that the positioning is not performed, the processor 580 may not feed back any information to the camera terminal. The camera terminal does not receive any information fed back by the positioning terminal for a period of time, and acquires the last saved location information before transmitting the positioning request, and according to the identifier of the photo returned by the communication module 510 and/or the shooting time of the photo. And the information that the photo terminal has taken the photo, matching the last saved location information with the photographed photo, and then adding a location tag to the corresponding photo according to the last saved location information.
可选的,如果通信模块510发送的的是智能手机500返回的上一次的位置信息,或者,智能手机500返回的获取到的位置信息,则根据返回的位置信息, 和定位请求包括的部分或全部信息,以及拍照终端已拍摄照片的信息,将位置信息与已拍摄的照片匹配。匹配时,可以根据通信模块510返回的照片的标识和已拍摄的照片的标识进行匹配,如果通信模块510返回的照片的标识和已拍摄的照片的标识一致,则匹配成功,或,根据通信模块510返回的照片的拍摄时间和已拍摄的照片的拍摄时间进行匹配,如果通信模块510返回的照片的拍摄时间和已拍摄的照片的拍摄时间一致,则匹配成功。此外,也可以同时根据照片的标识和照片的拍摄时间进行匹配,如果照片的拍摄时间均与已拍摄的照片的标识和照片的拍摄时间相同,则匹配成功。匹配成功后,再根据位置信息为对应的照片添加位置标签。Optionally, if the communication module 510 sends the last location information returned by the smart phone 500, or the acquired location information returned by the smart phone 500, according to the returned location information, And some or all of the information included in the positioning request, and the information that the photographing terminal has taken the photo, matching the location information with the photograph taken. When matching, the matching may be performed according to the identifier of the photo returned by the communication module 510 and the identifier of the photograph taken. If the identifier of the photo returned by the communication module 510 is consistent with the identifier of the photograph taken, the matching is successful, or according to the communication module. The photographing time of the photograph returned by 510 is matched with the photographing time of the photographed photograph, and if the photographing time of the photograph returned by the communication module 510 coincides with the photographing time of the photographed photograph, the matching is successful. In addition, it is also possible to match at the same time according to the logo of the photo and the photographing time of the photograph. If the photographing time of the photograph is the same as the photographing time of the photographed photograph and the photographing time of the photograph, the matching is successful. After the match is successful, add a location tag to the corresponding photo based on the location information.
可以理解的是,拍照终端还可以将已拍摄的照片发送给第三方服务器。而定位终端在获取到位置信息后,将定位请求中的照片的标识或者拍照的时间中的至少一个,以及位置信息发送给第三方服务器。第三方服务器根据定位终端发送的位置信息,和定位请求包括的部分或全部信息,以及拍照终端已拍摄照片的信息,将位置信息与已拍摄的照片匹配,再根据位置信息为对应的照片添加位置标签。或者,拍照终端将已拍摄的照片发送给定位终端,例如,拍照终端在向定位终端发送的定位请求包含已拍摄的照片,或者,拍照终端单独向定位终端发送已拍摄的照片。定位终端在接收到已拍摄的照片以及获取到位置信息后,将位置信息与已拍摄的照片匹配,再根据位置信息为对应的照片添加位置标签。It can be understood that the photographing terminal can also send the photograph taken to the third party server. After acquiring the location information, the positioning terminal sends at least one of the identifier of the photo in the location request or the time of photographing, and the location information to the third-party server. The third-party server matches the location information with the captured photo according to the location information sent by the positioning terminal, part or all of the information included in the positioning request, and the information that the camera terminal has taken the photo, and then adds the location to the corresponding photo according to the location information. label. Alternatively, the photographing terminal sends the photographed photograph to the positioning terminal. For example, the photographing terminal sends the photographed photograph to the positioning request sent to the positioning terminal, or the photographing terminal separately sends the photographed photograph to the positioning terminal. After receiving the captured photo and acquiring the location information, the positioning terminal matches the location information with the captured photo, and then adds a location tag to the corresponding photo according to the location information.
可以理解,上述方案还可以由以下中的任意一种方案进行代替。具体如下:It can be understood that the above scheme can also be replaced by any one of the following schemes. details as follows:
方案一:拍照终端和智能手机500的通信模块510在建立连接后,拍照终端判断本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值。如果拍照终端判断的结果为小于或者等于时间阈值,则拍照终端确定不进行定位。所以,拍照终端确定不需要向智能手机500发送定位请求,而是从存储器中获取最近 一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端判断的结果为大于时间阈值,则拍照终端确定需要向智能手机500发送定位请求,并向智能手机500发送定位请求。智能手机500的通信模块510接收到定位请求后,通过处理器580判断接收定位请求和接收上一次定位请求之间的时间段内,智能手机500的位移是否大于位移阈值。如果智能手机500的处理器580进行判断得到的判断结果为小于或者等于位移阈值,则处理器580确定不进行定位。智能手机500通过通信模块510向拍照终端发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,智能手机500通过通信模块510向拍照终端发送上一次的位置信息,以及定位请求中的照片的标识或者拍照的时间中的至少一个。如果智能手机500的处理器580判断的结果为大于位移阈值,则确定进行定位。智能手机500的定位模块570可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。定位模块570在获取得到当前的位置信息后,通过通信模块510将当前的位置信息发送给拍照终端进行匹配、添加标签,或者,定位模块570在获取得到当前的位置信息后,通过通信模块510向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 1: After the photo terminal and the communication module 510 of the smart phone 500 establish a connection, the photographing terminal determines whether the time difference between the current shooting and the last shooting is greater than a time threshold. If the result of the determination by the photographing terminal is less than or equal to the time threshold, the photographing terminal determines not to perform the positioning. Therefore, the photographing terminal determines that it is not necessary to send a positioning request to the smartphone 500, but obtains the latest from the memory. The saved location information matches the captured photo, and the location tag is added to the corresponding photo based on the last saved location information. If the result of the determination by the photographing terminal is greater than the time threshold, the photographing terminal determines that it is necessary to send a positioning request to the smartphone 500 and transmits a positioning request to the smart phone 500. After the communication module 510 of the smart phone 500 receives the positioning request, the processor 580 determines whether the displacement of the smart phone 500 is greater than the displacement threshold within a time period between receiving the positioning request and receiving the last positioning request. If the result of the determination by the processor 580 of the smartphone 500 is less than or equal to the displacement threshold, the processor 580 determines not to perform the positioning. The smart phone 500 transmits, by the communication module 510, the notification that no positioning is performed to the photographing terminal, and at least one of the identification of the photo in the positioning request or the time of photographing; or the smart phone 500 transmits the last time to the photographing terminal through the communication module 510. Location information, and at least one of an identification of a photo in the location request or a time of photographing. If the result of the processor 580 of the smartphone 500 determines that the result is greater than the displacement threshold, then it is determined to perform the positioning. The positioning module 570 of the smart phone 500 can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information. After acquiring the current location information, the positioning module 570 sends the current location information to the camera terminal for matching and adding a label through the communication module 510, or the positioning module 570 obtains the current location information, and then sends the current location information to the communication module 510. The third-party server sends the current location information to the third-party server for matching and tagging. For details, refer to the foregoing embodiment, and the description is not repeated here.
方案二:拍照终端和智能手机500在建立连接后,拍照终端判断本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,如果拍照终端判断的结果为小于或者等于时间阈值,则拍照终端确定不需要进行定位。拍照终端不向智能手机500发送定位请求,而是从存储器中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端判断的结果为大于时间阈值,则拍照终端进一步判断本次进 行拍摄和上一次进行拍摄之间的时间段内,拍照终端的位移是否大于位移阈值。如果拍照终端判断的结果为小于或者等于位移阈值,则拍照终端确定不进行定位。拍照终端确定不需要向智能手机500发送定位请求,而是从存储器中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端判断的结果为大于位移阈值,则拍照终端确定需要进行定位,并向智能手机500发送定位请求。拍照终端向智能手机500发送定位请求。智能手机500的通信模块510在接收到定位请求后,定位模块570可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据智能手机500的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。智能手机500的定位模块570在获取得到当前的位置信息后,通过通信模块510将当前的位置信息发送给拍照终端进行匹配、添加标签,或者,定位模块570在获取得到当前的位置信息后,通过通信模块510向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 2: After the photo terminal and the smart phone 500 establish a connection, the photographing terminal determines whether the time difference between the current shooting and the last shooting is greater than a time threshold. If the result of the photo terminal determination is less than or equal to the time threshold, the photographing terminal determines No positioning is required. The photographing terminal does not send a positioning request to the smart phone 500, but obtains the last saved position information from the memory to match the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the time threshold, the photographing terminal further judges the current entry. Whether the displacement of the photographing terminal is greater than the displacement threshold during the time between the line shooting and the last shooting. If the result of the determination by the photographing terminal is less than or equal to the displacement threshold, the photographing terminal determines not to perform the positioning. The photographing terminal determines that it is not necessary to send a positioning request to the smart phone 500, but obtains the last saved position information from the memory and matches the photographed photograph, and then adds a position label to the corresponding photo according to the last saved position information. If the result of the determination by the photographing terminal is greater than the displacement threshold, the photographing terminal determines that the positioning needs to be performed, and sends a positioning request to the smart phone 500. The camera terminal sends a location request to the smartphone 500. After the communication module 510 of the smart phone 500 receives the positioning request, the positioning module 570 can directly locate the current location information according to the specified positioning manner, or select the positioning according to the remaining power of the smart phone 500 or the current environment of the positioning terminal. The way to locate to get the current location information. After the location module 570 of the smart phone 500 obtains the current location information, the current location information is sent to the camera terminal through the communication module 510 for matching and tagging, or the positioning module 570 obtains the current location information and passes the The communication module 510 sends the current location information to the third-party server and sends the information to the third-party server for matching and tagging. For details, refer to the foregoing embodiment, and the description is not repeated here.
方案三:拍照终端和智能手机500在建立连接后,拍照终端判断本次进行拍摄和上一次进行拍摄的时间段内,拍摄终端的位移是否大于位移阈值。如果拍照终端判断的结果为小于或者等于位移阈值,则拍照终端确定不进行定位,所以,拍照终端确定不需要向智能手机500发送定位请求,而是从存储器中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端判断的结果为大于位移阈值,则拍照终端确定需要向智能手机500发送定位请求,并向智能手机500发送定位请求。智能手机500的通信模块在接收定位请求后,通过处理器580判断接收定位请求和接收上一次定位请求之间的时间差是否小于时间阈值。如果处理器580判断的结果为小于或者等于时间阈值,则确定不进行定位。智能手机500 通过通信模块510向拍照终端发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,智能手机500通过通信模块510向拍照终端发送上一次的位置信息,以及定位请求中的照片的标识或者拍照的时间中的至少一个。如果处理器580判断的结果为大于时间阈值,则确定进行定位。定位模块570可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。定位模块570在获取得到当前的位置信息后,通过通信模块510将当前的位置信息发送给拍照终端进行匹配、添加标签,或者,定位模块570在获取得到当前的位置信息后,通过通信模块510向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 3: After the photo terminal and the smart phone 500 establish a connection, the photographing terminal judges whether the displacement of the photographing terminal is greater than the displacement threshold in the time period during which the photographing terminal performs the photographing and the last photographing. If the result of the determination by the photographing terminal is less than or equal to the displacement threshold, the photographing terminal determines not to perform the positioning, so the photographing terminal determines that it is not necessary to send the positioning request to the smart phone 500, but obtains the last saved position information from the memory and has The captured photos match, and then add a location tag to the corresponding photo based on the last saved location information. If the result of the determination by the photographing terminal is greater than the displacement threshold, the photographing terminal determines that it is necessary to send a positioning request to the smart phone 500, and sends a positioning request to the smart phone 500. After receiving the positioning request, the communication module of the smart phone 500 determines whether the time difference between receiving the positioning request and receiving the last positioning request is less than a time threshold by the processor 580. If the result of the processor 580 determination is less than or equal to the time threshold, then it is determined that no positioning is to be performed. Smartphone 500 Sending, by the communication module 510, a notification that no positioning is performed to the photographing terminal, and at least one of the identification of the photo in the positioning request or the time of photographing; or the smart phone 500 transmits the last position information to the photographing terminal through the communication module 510, And at least one of an identification of a photo in the location request or a time of photographing. If the result of the processor 580 determination is greater than the time threshold, then it is determined to perform the positioning. The positioning module 570 can perform positioning according to the specified positioning manner to obtain the current location information, and can also perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information. After acquiring the current location information, the positioning module 570 sends the current location information to the camera terminal for matching and adding a label through the communication module 510, or the positioning module 570 obtains the current location information, and then sends the current location information to the communication module 510. The third-party server sends the current location information to the third-party server for matching and tagging. For details, refer to the foregoing embodiment, and the description is not repeated here.
上述的实施例以定位终端的智能手机为例,当定位终端是导航仪、平板电脑等时,定位终端的硬件结构将有所不同,此处不再展开赘述。The above-mentioned embodiment takes the smart phone of the positioning terminal as an example. When the positioning terminal is a navigator, a tablet computer, etc., the hardware structure of the positioning terminal will be different, and details are not described herein again.
针对于在拍照终端进行拍摄时,智能手机为拍照终端进行定位并提供位置信息的场景,本申请提出的技术方案与现有技术相比,只有在智能手机接收到拍照终端发送的定位请求,并且,智能手机和/或拍照终端经过判断确定确实需要进行定位时,智能手机才会通过定位获取当前的位置信息,有效减少了智能手机的电量的消耗。Compared with the prior art, only the smart phone receives the positioning request sent by the camera terminal, and the smart phone transmits the positioning request sent by the camera terminal. When the smart phone and/or the camera terminal determine that it is really necessary to perform positioning, the smart phone can obtain the current location information by positioning, thereby effectively reducing the power consumption of the smart phone.
参阅图6,图6是本申请提供的一种拍照终端的结构示意图。拍照终端为具有拍摄、通信功能的终端,包括但不限于数码相机、智能手机、平板电脑等等。本实施例的拍照终端600包括:拍摄模块610、处理器620、存储器630、显示模块640、音频模块650、接口模块660、通信模块670、充电模块680以及电源管理模块690。 Referring to FIG. 6, FIG. 6 is a schematic structural diagram of a camera terminal provided by the present application. The camera terminal is a terminal having a photographing and communication function, including but not limited to a digital camera, a smart phone, a tablet computer, and the like. The photographing terminal 600 of the embodiment includes a photographing module 610, a processor 620, a memory 630, a display module 640, an audio module 650, an interface module 660, a communication module 670, a charging module 680, and a power management module 690.
拍摄模块610包括可以将光信号转变为电信号的传感器。例如,拍摄模块610包括可以包括电荷耦合元件(Charge-coupled Device,CCD)传感器,CCD传感器通过感光二极管感应光线,并感应产生电荷,此后,并行信号积存器将感应产生的电荷进行暂时存储,并行信号寄存器将暂存在并行信号积存器中的电荷进行转移到信号放大器中进行放大,模数转换器再将放大后的电荷构成的电信号转变为数字信号以供拍摄模块610进行处理。此外,拍摄模块610中的CCD传感器也可以由互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)传感器等代替。The capture module 610 includes a sensor that can convert an optical signal into an electrical signal. For example, the photographing module 610 includes a charge-coupled device (CCD) sensor that senses light through a photodiode and induces a charge generation. Thereafter, the parallel signal accumulator temporarily stores the induced charge, in parallel. The signal register transfers the charge temporarily stored in the parallel signal accumulator to the signal amplifier for amplification, and the analog-to-digital converter converts the electric signal composed of the amplified electric charge into a digital signal for processing by the photographing module 610. In addition, the CCD sensor in the imaging module 610 may be replaced by a Complementary Metal Oxide Semiconductor (CMOS) sensor or the like.
处理器620是拍照终端600的控制中心,利用各种接口和线路连接整个拍照终端600的各个部分,通过运行或执行存储在存储器630内的软件程序和/或模块,以及调用存储在存储器630内的数据,执行拍照终端600的各种功能和处理数据,从而对拍照终端600进行整体监控。处理器620可以是一种集成芯片,例如,处理器620可以是通用处理器、数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件等等。可选的,处理器620可包括一个或多个处理单元;优选的,处理器180可集成动态图象专家组(Moving Pictures Experts Group-4,MPEG-4)处理器,MPEG-4处理器主要处理音视频的压缩编码。可以理解的是,上述MPEG-4处理器也可以不集成到处理器620中。The processor 620 is a control center of the photographing terminal 600, and connects various parts of the entire photographing terminal 600 by various interfaces and lines, by running or executing software programs and/or modules stored in the memory 630, and calling them in the memory 630. The data performs various functions and processing data of the photographing terminal 600, thereby performing overall monitoring of the photographing terminal 600. The processor 620 can be an integrated chip. For example, the processor 620 can be a general purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or the like. Programmable logic devices and more. Optionally, the processor 620 may include one or more processing units; preferably, the processor 180 may integrate a Moving Pictures Experts Group-4 (MPEG-4) processor, and the MPEG-4 processor is mainly Processing compression encoding of audio and video. It can be understood that the above MPEG-4 processor may not be integrated into the processor 620.
存储器602可用于存储软件程序以及模块,处理器620通过运行存储在存储器630的软件程序以及模块,从而执行拍照终端600的各种功能应用以及数据处理。存储器630可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图象播放功能等)等;存储数据区可存储根据拍照终端600的使用所创建的数据(比如音频数据、图像数据等)等。此外,存储器630可以包括高速随机存取存储器, 还可以包括非易失性存储器,例如至少一个闪存器件、或其他易失性固态存储器件。The memory 602 can be used to store software programs and modules, and the processor 620 executes various functional applications and data processing of the photographing terminal 600 by running software programs and modules stored in the memory 630. The memory 630 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data (such as audio data, image data, etc.) created according to the use of the photographing terminal 600, and the like. In addition, the memory 630 can include a high speed random access memory. Non-volatile memory may also be included, such as at least one flash memory device, or other volatile solid state memory device.
显示模块640可用于显示用户通过拍摄模块610采集得到的图片、视频和拍摄终端600的功能菜单。显示模块640可包括显示面板,可选的,显示面板可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等。进一步的,显示模块640还可以包括触控面板,触控面板可覆盖显示面板,当触控面板检测到在其上或附近的触摸操作后,传送给处理器620以确定触摸事件的类型,随后处理器620根据触摸事件的类型在显示面板上提供相应的视觉输出。在某些实施例中,可以将触控面板与显示面板集成而实现拍照终端600的输入和显示功能。The display module 640 can be used to display pictures, videos, and function menus of the photographing terminal 600 collected by the user through the photographing module 610. The display module 640 may include a display panel. Alternatively, the display panel may be an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the display module 640 may further include a touch panel, and the touch panel may cover the display panel. After the touch panel detects a touch operation on or near the touch panel, the touch panel transmits to the processor 620 to determine the type of the touch event, and then The processor 620 provides a corresponding visual output on the display panel depending on the type of touch event. In some embodiments, the input and display functions of the camera terminal 600 can be implemented by integrating the touch panel with the display panel.
音频电路650包括音频处理电路以及扬声器,其中,音频处理电路可将拍摄模块610采集到的音频数据转换成电信号,再传输到扬声器,由扬声器561将电信号转换为声音信号输出。The audio circuit 650 includes an audio processing circuit and a speaker, wherein the audio processing circuit can convert the audio data collected by the shooting module 610 into an electrical signal and then transmit it to a speaker, and the speaker 561 converts the electrical signal into a sound signal output.
接口模块660通常为USB接口模块,USB接口模块包括数据差分线,能够将拍摄模块610采集到的音频数据和视频数据传输到例如电脑等外部的装置中。The interface module 660 is generally a USB interface module. The USB interface module includes a data differential line, and can transmit audio data and video data collected by the shooting module 610 to an external device such as a computer.
通信模块670可以是实现与外部进行通信,例如Wi-Fi模块、蓝牙模块、GPRS模块等等无线通信模块中的任意一种,或着,是串口模块、USB模块等等有线通信模块中的任意一种。The communication module 670 may be any one of a wireless communication module that implements communication with the outside, such as a Wi-Fi module, a Bluetooth module, a GPRS module, or the like, or is a wired communication module such as a serial port module, a USB module, or the like. One.
拍照终端600还包括充电模块680和电源管理模块690。外部的电源可以通过充电模块680向电源管理模块690进行充电。电源管理模块690在充电后,向拍照终端的内部的各个模块进行供电。优选的,电源管理模块690可以与处理器620逻辑相连,从而通过电源管理模块690实现管理充电、放电、以及功耗等功能。 The camera terminal 600 also includes a charging module 680 and a power management module 690. An external power source can be charged to the power management module 690 via the charging module 680. After the power management module 690 is charged, power is supplied to each module inside the camera terminal. Preferably, the power management module 690 can be logically coupled to the processor 620 to implement functions such as managing charging, discharging, and power consumption through the power management module 690.
尽管没有示出,但拍照终端600还可以包括SD卡等等,此处不作具体限定。Although not shown, the photographing terminal 600 may further include an SD card or the like, which is not specifically limited herein.
拍照终端600与定位终端之间可以通过无线或者有线的方式建立通信连接,例如,定位终端与拍照终端之间可以通过Wi-Fi、Bluetooth、蜂窝等无线方式进行通信连接,也可以通过通用异步收发传输器(Universal Asynchronous Receiver/Transmitter,UART)、网口、通用串行总线(Universal Serial Bus,USB)等有线方式建立通信连接。其中,定位终端与拍照终端之间连接方式与现有技术相同,此处不再展开赘述。定位终端与拍照终端600的距离不超过预设阈值。其中,预设阈值可以根据实际需要人为根据经验进行设置,设置时需保证定位终端和拍照终端600之间能够正常通信以及将定位终端定位的位置作为拍照终端600的位置不会严重失实而导致不可接受即可。The communication connection between the camera terminal 600 and the positioning terminal can be established by wireless or wired. For example, the positioning terminal and the camera terminal can be connected by wireless means such as Wi-Fi, Bluetooth, cellular, etc., or can be transmitted and received by universal asynchronous transmission. A communication connection is established by a wired method such as a Universal Asynchronous Receiver/Transmitter (UART), a network port, or a Universal Serial Bus (USB). The connection between the positioning terminal and the camera terminal is the same as that in the prior art, and details are not described herein again. The distance between the positioning terminal and the photographing terminal 600 does not exceed a preset threshold. The preset threshold may be set according to the actual needs according to the actual needs. The setting needs to ensure that the positioning between the positioning terminal and the photographing terminal 600 and the position where the positioning terminal is positioned as the position of the photographing terminal 600 are not seriously deficient. Accept it.
可选的,拍照终端600的处理器620指令通信模块610通过无线或者有线的方式建立通信连接,例如,通信模块610可以通过Wi-Fi、Bluetooth、蜂窝等无线方式建立通信连接,也可以通过通用异步收发传输器(Universal Asynchronous Receiver/Transmitter,UART)、网口、通用串行总线(Universal Serial Bus,USB)等有线方式建立通信连接。其中,通信模块610建立连接的方式与现有技术相同,此处不再展开赘述。Optionally, the processor 620 of the camera terminal 600 instructs the communication module 610 to establish a communication connection by using a wireless or wired manner. For example, the communication module 610 can establish a communication connection by wireless means such as Wi-Fi, Bluetooth, cellular, or the like. A wired connection such as a Universal Asynchronous Receiver/Transmitter (UART), a network port, or a Universal Serial Bus (USB) establishes a communication connection. The manner in which the communication module 610 establishes a connection is the same as that in the prior art, and details are not described herein again.
可选的,在通信模块610完成建立连接后,定位终端向拍照终端600的通信模块610发送交换信息,其中,交换信息可以是定位终端和拍照终端600预先约定的字符。通信模块610在接收到定位终端发送的交换信息后,向处理器620发送交换信息。处理器620在接收到交换信息后,通过交换信息从定位终端发出至被通信模块610接收之间的时间计算出拍照终端和定位终端600之间的距离。拍照终端和定位终端600之间的距离等于从定位终端发出至被拍照终端600接收之间的时间乘以交换信息传输的速度。如果处理器620计算得到定位终端与拍照终端600之间的距离小于预设阈值,则处理器620指令显示模块640显示提示界面。其中,提示界面包括允许按钮和不允许按钮。如果用 户通过点击触控面板选择了允许按钮,则处理器620允许通信模块610向定位终端发送请求定位,如果用户通过点击触控面板选择了不允许按钮,则处理器620不允许通信模块610向定位终端发送请求定位。预设阈值可以根据实际需要人为根据经验进行设置,设置时需保证定位终端和拍照终端600的通信模块610之间能够正常通信以及将定位终端定位的位置作为拍照终端600的位置不会严重失实而导致不可接受即可。Optionally, after the communication module 610 completes establishing the connection, the positioning terminal sends the exchange information to the communication module 610 of the photographing terminal 600, wherein the exchange information may be a character pre-agreed by the positioning terminal and the photographing terminal 600. After receiving the exchange information sent by the positioning terminal, the communication module 610 sends the exchange information to the processor 620. After receiving the exchange information, the processor 620 calculates the distance between the photographing terminal and the positioning terminal 600 by exchanging information from the positioning terminal to the time received by the communication module 610. The distance between the photographing terminal and the positioning terminal 600 is equal to the time between the issuance of the positioning terminal and the reception by the photographing terminal 600 multiplied by the speed at which the information is transmitted. If the processor 620 calculates that the distance between the positioning terminal and the photographing terminal 600 is less than a preset threshold, the processor 620 instructs the display module 640 to display the prompting interface. The prompt interface includes an allow button and a disallow button. If used The user selects the allow button by clicking the touch panel, and the processor 620 allows the communication module 610 to send a request location to the location terminal. If the user selects the disallow button by clicking the touch panel, the processor 620 does not allow the communication module 610 to locate the location. The terminal sends a request for location. The preset threshold can be set according to the actual needs according to the actual needs. The setting needs to ensure that the positioning between the positioning terminal and the communication module 610 of the photographing terminal 600 can be normally communicated, and the position where the positioning terminal is positioned as the position of the photographing terminal 600 is not seriously deficient. It can be unacceptable.
可以理解的是,可以是定位终端发起建立与拍照终端600之间的连接,也可以是拍照终端600发起建立与定位终端之间的连接。定位终端600与拍照终端600之间可以在开启电源后,一直保持通信连接,也可以在拍照终端600需要进行拍照时,才建立定位终端与拍照终端600之间的连接,甚至可以在拍照终端600需要向定位终端请求定位时,才建立定位终端与拍照终端600之间的连接等等。It can be understood that the positioning terminal initiates the connection between the establishing and the photographing terminal 600, and the photographing terminal 600 initiates the connection between the establishing and the positioning terminal. The connection between the positioning terminal 600 and the photographing terminal 600 can be maintained after the power is turned on, and the connection between the positioning terminal and the photographing terminal 600 can be established even when the photographing terminal 600 needs to take a photograph, even in the photographing terminal 600. When the positioning needs to be requested from the positioning terminal, the connection between the positioning terminal and the photographing terminal 600 and the like are established.
可选的,如果用户通过点击拍照终端600的触控面板选择了允许按钮或者通过其他方式开启了拍照终端发送定位请求的功能,则处理器620检测到拍摄模块610进行照片的拍摄时,指令通信模块670通过已经建立的通信连接向定位终端发送定位请求。或者处理器620检测到拍摄模块610进行照片的拍摄时,启动定时器进行定时,定时时间到后,处理器620指令通信模块670通过已经建立的通信连接向定位终端发送定位请求。其中,定位请求可以包括照片的标识或者拍照的时间中的至少一个,定位请求还可以包括拍照终端的标识等等。照片的标识通常为照片的唯一的编码,可用于识别照片。拍照的时间为用户进行拍照操作以获得照片的时间。拍照终端的标识通常为拍照终端的唯一的编码,可用于识别拍照终端。通信模块670接收到处理器620的指令后,向定位终端发送定位请求。此外,处理器620指令存储器630将拍摄模块610进行照片的拍摄所得到的照片,拍照的时间、照片的标识等进行存储。Optionally, if the user selects the allow button by clicking the touch panel of the photographing terminal 600 or opens the function of the photographing terminal to send the positioning request by other means, the processor 620 detects that the photographing module 610 performs photographing, and instructs communication. Module 670 sends a location request to the positioning terminal over the established communication connection. Or when the processor 620 detects that the shooting module 610 performs shooting of the photo, the timer is started to perform timing. After the timing time expires, the processor 620 instructs the communication module 670 to send a positioning request to the positioning terminal through the established communication connection. The location request may include at least one of an identifier of the photo or a time of photographing, and the location request may further include an identifier of the photographing terminal and the like. The photo's logo is usually the unique code for the photo and can be used to identify the photo. The time of taking a photo is the time when the user takes a photo to obtain a photo. The identification of the camera terminal is usually a unique code of the camera terminal and can be used to identify the camera terminal. After receiving the instruction of the processor 620, the communication module 670 sends a positioning request to the positioning terminal. Further, the processor 620 instructs the memory 630 to store a photograph obtained by photographing the photograph by the photographing module 610, a photographing time, a logo of the photograph, and the like.
可选的,当定位终端接收到拍照终端发送的定位请求后,先判断接收定位 请求和接收上一次定位请求的时间差是否大于时间阈值,如果判断结果小于或者等于时间阈值,则确定不进行定位,如果判断结果为大于时间阈值,则进一步判断接收定位请求和接收上一次定位请求之间的时间段内,定位终端的位移是否大于位移阈值,如果判断结果为小于或者等于位移阈值,则确定不进行定位,如果判断结果为大于位移阈值,则确定进行定位。其中,时间阈值可以根据用户的需要进行设置,设置时,只需保证时间阈值设置得足够的小以至于在通常的状况下,接收本次定位请求和接收上一次定位请求之间的时间差内,定位终端和拍照终端600的位移可以忽略不计。位移阈值可以根据用户的需要进行设置,设置时,只需保证定位终端接收定位请求和接收上一次定位请求之间的时间段内,定位终端和拍照终端600的位移可以忽略不计,其中,时间段可以是10秒,30秒或半小时等等。定位终端可以通过读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据进而计算出定位终端的位移。例如,定位终端在接收上一次定位请求的时间读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据,在本次接收定位请求的时间读取加速度传感器、陀螺仪传感器等中的一个或者多个的传感器数据,从而计算出两次定位请求之间的时间段内,定位终端的位移。Optionally, after the positioning terminal receives the positioning request sent by the camera terminal, determining the receiving location first Whether the time difference between the request and the previous positioning request is greater than the time threshold, if the judgment result is less than or equal to the time threshold, determining that the positioning is not performed, and if the determination result is greater than the time threshold, further determining the receiving positioning request and receiving the last positioning request If the result of the determination is greater than or equal to the displacement threshold, the positioning is determined not to be performed. If the determination result is greater than the displacement threshold, the positioning is determined. The time threshold can be set according to the needs of the user. When setting, it is only necessary to ensure that the time threshold is set small enough to be within a normal situation, within a time difference between receiving the current positioning request and receiving the last positioning request. The displacement of the positioning terminal and the photographing terminal 600 is negligible. The displacement threshold can be set according to the needs of the user. When setting, the displacement between the positioning terminal and the photographing terminal 600 can be neglected during the time period between receiving the positioning request and receiving the last positioning request, wherein the time period is It can be 10 seconds, 30 seconds or half an hour, and so on. The positioning terminal can calculate the displacement of the positioning terminal by reading sensor data of one or more of the acceleration sensor, the gyro sensor, and the like. For example, the positioning terminal reads sensor data of one or more of the acceleration sensor, the gyro sensor, and the like at the time of receiving the last positioning request, and reads the acceleration sensor, the gyro sensor, and the like at the time of receiving the positioning request. One or more sensor data to calculate the displacement of the positioning terminal during the time period between two positioning requests.
可选的,如果确定不进行定位,定位终端向拍照终端600发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,向拍照终端发送上一次的位置信息,以及定位请求中的照片的标识或者拍照的时间中的至少一个。其中,位置信息可以为经纬度信息,也可以是解析经纬度后得到的地址信息。拍照终端600的通信模块610相应进行接收。Optionally, if it is determined that the positioning is not performed, the positioning terminal sends a notification that the positioning is not performed to the photographing terminal 600, and at least one of the identification of the photo in the positioning request or the time of photographing; or sending the last position to the photographing terminal. Information, and at least one of the identification of the photo in the location request or the time of the photo. The location information may be latitude and longitude information, or may be address information obtained after parsing the latitude and longitude. The communication module 610 of the photographing terminal 600 receives the correspondingly.
可选的,如果确定进行定位,定位终端可以直接根据指定的定位方式确定定位方式,并获取当前的位置信息。定位终端也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息,以提 高定位的效率和节省电量。其中,指定的定位方式可以是无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式,GNSS定位方式中的任意一种或多种的组合。Optionally, if the positioning is determined, the positioning terminal may directly determine the positioning manner according to the specified positioning manner, and obtain current location information. The positioning terminal may also perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information, so as to High positioning efficiency and power savings. The specified positioning mode may be wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning A combination of any one or more of a mode, a broadcast signal positioning mode, an optical positioning mode, a computer vision positioning mode, and a GNSS positioning mode.
在一实施例中,定位终端根据剩余电量选择定位方式。具体地,定位终端判断剩余电量是否大于电量阈值;若定位终端的剩余电量大于电量阈值,则按第一扫描优先级确定定位方式;若定位终端的剩余电量小于电量阈值,则按第二扫描优先级确定定位方式。其中,电量阈值可以根据需要进行设置。第一扫描优先级与第二扫描优先级用于表示定位方式的优先级别的排序。按照第一扫描优先级或第二扫描优先级确定定位方式时,首先选择优先级别最高的定位方式,如果优先级别最高的定位方式不能被使用,则采用优先级别次高的定位方式,依次类推,直到优先级别最低的定位方式。第一扫描优先级不同于第二扫描优先级,可以是第一扫描优先级中的定位方式可与第二扫描优先级中的定位方式不同,也可以是第一扫描优先级中的定位方式与第二扫描优先级中的定位方式相同,但是第一扫描优先级中的定位方式的优先级别不同于第二扫描优先级中的定位方式的优先级别。通常,第一扫描优先级中定位方式的优先级别按照定位方式的准确度降序进行排列,第二扫描优先级中的定位方式的优先级别按照定位方式的耗电量的大小升序进行排列。例如,GNSS定位方式的定位精度最高,功耗最大,蜂窝定位方式的定位精度最低,功耗也最低,Wi-Fi定位方式居中。所以,第一扫描优先级为GNSS定位方式->Wi-Fi定位方式->蜂窝定位方式,第二扫描优先级为蜂窝定位方式->Wi-Fi定位方式->GNSS定位方式。或者,通过第一电量阈值和第二电量阈值将电量划分为三个区域,定位终端判断剩余电量落入哪一个区域,如果定位终端的剩余电量落入大于或等于第一电 量阈值的区间,则按第一扫描优先级确定定位方式,如果定位终端剩余电量落入小于或等于第二电量阈值的区间,则按第二扫描优先级别确定定位方式,如果定位终端的剩余电量落入小于第一电量阈值而大于第二电量阈值的区间,则按第三扫描优先级别确定定位方式。例如,第一扫描优先级定位方式为GNSS定位方式->Wi-Fi定位方式->蜂窝定位方式,第二扫描优先级定位方式为蜂窝定位方式->Wi-Fi定位方式->GNSS定位方式,第三扫描优先级定位方式为Wi-Fi定位方式->GNSS定位方式->蜂窝定位方式。In an embodiment, the positioning terminal selects a positioning mode according to the remaining power. Specifically, the positioning terminal determines whether the remaining power is greater than the power threshold; if the remaining power of the positioning terminal is greater than the power threshold, determining the positioning mode according to the first scanning priority; if the remaining power of the positioning terminal is less than the power threshold, pressing the second scanning first The level determines the positioning method. Among them, the power threshold can be set as needed. The first scan priority and the second scan priority are used to indicate the ordering of the priority levels of the positioning modes. When the positioning mode is determined according to the first scanning priority or the second scanning priority, the positioning mode with the highest priority is selected first. If the positioning mode with the highest priority cannot be used, the positioning mode with the second highest priority is used, and so on. Until the lowest priority positioning method. The first scanning priority is different from the second scanning priority, and the positioning manner in the first scanning priority may be different from the positioning manner in the second scanning priority, or may be the positioning manner in the first scanning priority. The positioning manner in the second scanning priority is the same, but the priority of the positioning mode in the first scanning priority is different from the priority of the positioning mode in the second scanning priority. Generally, the priority levels of the positioning modes in the first scanning priority are arranged in descending order of the accuracy of the positioning mode, and the priority levels of the positioning modes in the second scanning priority are arranged in ascending order according to the power consumption of the positioning mode. For example, the GNSS positioning method has the highest positioning accuracy, the largest power consumption, the lowest positioning accuracy of the cellular positioning mode, and the lowest power consumption, and the Wi-Fi positioning mode is centered. Therefore, the first scanning priority is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode. Alternatively, the first power threshold and the second power threshold are used to divide the power into three regions, and the positioning terminal determines which region the remaining power falls into, if the remaining power of the positioning terminal falls within the first power. The interval of the threshold is determined according to the first scanning priority. If the remaining power of the positioning terminal falls within a range less than or equal to the second power threshold, the positioning mode is determined according to the second scanning priority level, and the remaining power of the positioning terminal is determined. If the interval falls below the first power threshold and is greater than the second power threshold, the positioning mode is determined according to the third scan priority level. For example, the first scanning priority positioning mode is GNSS positioning mode->Wi-Fi positioning mode->cellular positioning mode, and the second scanning priority positioning mode is cellular positioning mode->Wi-Fi positioning mode->GNSS positioning mode. The third scanning priority positioning mode is Wi-Fi positioning mode->GNSS positioning mode->cellular positioning mode.
在另一实施例中,定位终端根据当前环境选择定位方式。具体地,定位终端判断当前环境是室内还是室外。其中,定位终端可以通过读取和分析光传感器、气压计、温度传感器等传感器数据中的至少一个判断定位终端的当前环境是在室内还是室外。若定位终端的当前环境为室内,采用适合室内进行定位的定位方式,例如采用Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式等等中的至少一种获取当前的位置信息;若定位终端的当前环境为室外,采用适合室外进行定位的定位方式,例如,采用GNSS定位方式等等获取当前的位置信息。In another embodiment, the positioning terminal selects a positioning mode according to the current environment. Specifically, the positioning terminal determines whether the current environment is indoors or outdoors. The positioning terminal can determine whether the current environment of the positioning terminal is indoors or outdoors by reading and analyzing at least one of sensor data such as a light sensor, a barometer, and a temperature sensor. If the current environment of the positioning terminal is indoor, the positioning method suitable for indoor positioning is adopted, for example, Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, and radio frequency tag positioning mode. At least one of Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode, optical positioning mode, computer vision positioning mode, and the like acquires current location information; if the current environment of the positioning terminal is outdoor, it is suitable for outdoor use. The positioning method of positioning, for example, using GNSS positioning method or the like to obtain current location information.
可选的,为了能够减少耗电,可以在获取当前的位置信息之前,定位终端开启定位模块,使得电源向定位模块进行供电,在获取当前的位置信息之后,关闭定位模块,使得电源不能向定位模块进行供电。Optionally, in order to reduce power consumption, before the current location information is obtained, the positioning terminal opens the positioning module, so that the power supply supplies power to the positioning module. After obtaining the current location information, the positioning module is closed, so that the power supply cannot be located. The module is powered.
可选的,在定位模块获取到位置信息后,定位终端向拍照终端600发送定位请求中的照片的标识或者拍照的时间中的至少一个,和定位模块获取到的位置信息。拍照终端600的通信模块610相应进行接收。Optionally, after the location module obtains the location information, the positioning terminal sends at least one of the identifier of the photo in the location request or the time of the photographing to the photographing terminal 600, and the location information acquired by the positioning module. The communication module 610 of the photographing terminal 600 receives the correspondingly.
可选的,如果定位终端发送的是没有进行定位的通知,则拍照终端600的 通信模块610在接收到没有进行定位的通知后,通信模块610将没有进行定位的通知发送给处理器620。处理器620从存储器630中获取发送定位请求之前,最近一次保存的位置信息,并根据通信模块610返回的照片的标识和/或照片的拍摄时间,以及拍照终端已拍摄照片的信息,将最近一次保存的位置信息与已拍摄的照片匹配,其中,照片的信息包括照片的标识和/或照片的拍摄时间等等。匹配成功后,处理器620再根据最近一次保存的位置信息为对应的照片添加位置标签。其中,照片的头文件中通常包括多个不同的标签,分别用于记录拍摄时间、快门速度、曝光补偿、焦距以及位置信息等等。位置标签是照片的头文件中专门用于记载位置信息的标签,例如,位置标签为可交换图像文件(Exchangeable Image File,EXIF)中专门用于记载全球定位数据的标签。Optionally, if the positioning terminal sends a notification that no positioning is performed, the photo terminal 600 After receiving the notification that the positioning is not performed, the communication module 610 transmits a notification that the positioning is not performed to the processor 620. The processor 620 acquires, from the memory 630, the location information that was saved last time before transmitting the location request, and according to the identifier of the photo returned by the communication module 610 and/or the shooting time of the photo, and the information that the photo terminal has taken the photo, the last time The saved location information matches the captured photo, wherein the information of the photo includes the logo of the photo and/or the shooting time of the photo, and the like. After the matching is successful, the processor 620 adds a location tag to the corresponding photo according to the last saved location information. Among them, the head file of the photo usually includes a plurality of different labels for recording shooting time, shutter speed, exposure compensation, focal length and position information, and the like. A location tag is a tag in a header file of a photo that is specifically used to record location information. For example, a location tag is a tag specifically used to record global positioning data in an Exchangeable Image File (EXIF).
可选的,定位终端在确定不进行定位时,也可以确定不向拍照终端600反馈任何信息。拍照终端600的通信模块610在一段时间内没有接收到定位终端反馈的任何信息,就通知处理器620从存储器630中获取发送所述的定位请求之前,最近一次保存的位置信息,并根据通信模块610返回的照片的标识和/或照片的拍摄时间,以及拍照终端已拍摄照片的信息,将最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。Optionally, when determining that the positioning is not performed, the positioning terminal may also determine not to feed back any information to the camera terminal 600. The communication module 610 of the camera terminal 600 does not receive any information fed back by the positioning terminal for a period of time, and notifies the processor 620 to obtain, from the memory 630, the last saved location information before transmitting the positioning request, and according to the communication module. The photo of the photo returned by 610 and/or the shooting time of the photo, and the information of the photo taken by the photo terminal, match the last saved location information with the photographed photo, and then add the corresponding photo according to the last saved location information. Location tag.
可选的,如果通信模块610接收到的是定位终端发送的上一次的位置信息,或者,通信模块610接收到的是定位终端返回的获取到的位置信息,通信模块610将接收到的上一次的位置信息或者获取到的位置信息发送给处理器620。处理器620根据返回的上一次的位置信息或者获取到的位置信息,和定位请求包括的部分或全部信息,以及拍照终端已拍摄照片的信息,将位置信息与已拍摄的照片匹配。匹配时,处理器620可以根据通信模块610返回的照片的标识和已拍摄的照片的标识进行匹配,如果通信模块610返回的照片的标识和已拍摄的 照片的标识一致,则匹配成功,或,根据通信模块610返回的照片的拍摄时间和已拍摄的照片的拍摄时间进行匹配,如果通信模块610返回的照片的拍摄时间和已拍摄的照片的拍摄时间一致,则匹配成功。此外,处理器620也可以同时根据照片的标识和照片的拍摄时间进行匹配,如果照片的拍摄时间均与已拍摄的照片的标识和照片的拍摄时间相同,则匹配成功。匹配成功后,处理器620再根据位置信息为对应的照片添加位置标签。Optionally, if the communication module 610 receives the last location information sent by the positioning terminal, or the communication module 610 receives the acquired location information returned by the positioning terminal, the communication module 610 will receive the last time. The location information or the obtained location information is sent to the processor 620. The processor 620 matches the location information with the captured photo according to the returned last location information or the acquired location information, and some or all of the information included in the location request, and the information that the camera terminal has taken the photo. When matching, the processor 620 can match according to the identifier of the photo returned by the communication module 610 and the identifier of the photograph taken, if the logo of the photo returned by the communication module 610 and the photographed If the identification of the photo is consistent, the matching is successful, or, according to the shooting time of the photo returned by the communication module 610 and the shooting time of the taken photo, if the shooting time of the photo returned by the communication module 610 and the shooting time of the taken photo Consistent, the match is successful. In addition, the processor 620 can also perform matching according to the identification of the photo and the shooting time of the photo at the same time. If the shooting time of the photo is the same as the shooting time of the photographed photo and the photographing time of the photo, the matching is successful. After the matching is successful, the processor 620 adds a location tag to the corresponding photo according to the location information.
可以理解的是,拍照终端还可以通过通信模块610将已拍摄的照片发送给第三方服务器。而定位终端在获取到位置信息后,将定位请求中的照片的标识或者拍照的时间中的至少一个,以及位置信息发送给第三方服务器。第三方服务器根据定位终端发送的位置信息,和定位请求包括的部分或全部信息,以及拍照终端已拍摄照片的信息,将位置信息与已拍摄的照片匹配,再根据位置信息为对应的照片添加位置标签。或者,拍照终端将已拍摄的照片发送给定位终端,例如,拍照终端在向定位终端发送的定位请求包含已拍摄的照片,或者,拍照终端单独向定位终端发送已拍摄的照片。定位终端在接收到已拍摄的照片以及获取到位置信息后,将位置信息与已拍摄的照片匹配,再根据位置信息为对应的照片添加位置标签。It can be understood that the photographing terminal can also send the photograph taken to the third party server through the communication module 610. After acquiring the location information, the positioning terminal sends at least one of the identifier of the photo in the location request or the time of photographing, and the location information to the third-party server. The third-party server matches the location information with the captured photo according to the location information sent by the positioning terminal, part or all of the information included in the positioning request, and the information that the camera terminal has taken the photo, and then adds the location to the corresponding photo according to the location information. label. Alternatively, the photographing terminal sends the photographed photograph to the positioning terminal. For example, the photographing terminal sends the photographed photograph to the positioning request sent to the positioning terminal, or the photographing terminal separately sends the photographed photograph to the positioning terminal. After receiving the captured photo and acquiring the location information, the positioning terminal matches the location information with the captured photo, and then adds a location tag to the corresponding photo according to the location information.
可以理解,上述方案还可以由以下中的任意一种方案进行代替。具体如下:It can be understood that the above scheme can also be replaced by any one of the following schemes. details as follows:
方案一:拍照终端600的通信模块610和定位终端在建立连接后,拍照终端600的处理器620判断本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值。如果拍照终端600的处理器620判断的结果为小于或者等于时间阈值,则处理器620确定不进行定位。所以,处理器600确定不需要通过通信模块610向定位终端发送定位请求,而是从存储器630中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果拍照终端600判断的结果为大于时间阈值,则拍照终端600 确定需要通过通信模块610向定位终端发送定位请求。定位终端接收到定位请求后,通过判断接收定位请求和接收上一次定位请求之间的时间段内,定位终端的位移是否大于位移阈值。如果定位终端进行判断得到的判断结果为小于或者等于位移阈值,则确定不进行定位。定位终端向拍照终端600发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,定位终端向拍照终600端发送上一次的位置信息,以及定位请求中的照片的标识或者拍照的时间中的至少一个。如果定位终端判断的结果为大于位移阈值,则确定进行定位。定位终端可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。定位模块在获取得到当前的位置信息后定位终端将当前的位置信息发送给拍照终端进行匹配、添加标签,或者,定位模块在获取得到当前的位置信息后,定位终端向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 1: After the communication module 610 and the positioning terminal of the photographing terminal 600 establish a connection, the processor 620 of the photographing terminal 600 determines whether the time difference between the current shooting and the last shooting is greater than a time threshold. If the result of the processor 620 of the camera terminal 600 determines that the result is less than or equal to the time threshold, the processor 620 determines not to perform positioning. Therefore, the processor 600 determines that it is not necessary to send a positioning request to the positioning terminal through the communication module 610, but obtains the last saved location information from the memory 630 to match the captured photo, and then correspondingly according to the last saved location information. Add a location tag to the photo. If the result of the determination by the photographing terminal 600 is greater than the time threshold, the photographing terminal 600 It is determined that a positioning request needs to be sent to the positioning terminal through the communication module 610. After receiving the positioning request, the positioning terminal determines whether the displacement of the positioning terminal is greater than the displacement threshold by determining the time period between receiving the positioning request and receiving the previous positioning request. If the judgment result obtained by the positioning terminal is less than or equal to the displacement threshold, it is determined that the positioning is not performed. The positioning terminal sends the notification to the photographing terminal 600 that no positioning is performed, and at least one of the identification of the photo in the positioning request or the time of photographing; or the positioning terminal sends the last position information to the photographing terminal 600, and the positioning request At least one of the logo of the photo or the time of photographing. If the result of the positioning terminal judgment is greater than the displacement threshold, it is determined to perform positioning. The locating terminal can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location information. After obtaining the current location information, the positioning module sends the current location information to the camera terminal for matching and adding a label, or after the positioning module obtains the current location information, the positioning terminal sends the current location to the third-party server. The information is sent to a third-party server for matching and labeling. For details, refer to the foregoing embodiment, and the description is not repeated here.
方案二:拍照终端600和定位终端在建立连接后,处理器620判断本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,如果处理器620判断的结果为小于或者等于时间阈值,则确定不需要进行定位。处理器620不需指令通信模块610向定位终端发送定位请求,而是从存储器630中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果处理器620判断的结果为大于时间阈值,则处理器620进一步判断本次进行拍摄和上一次进行拍摄之间的时间段内,拍照终端600的位移是否大于位移阈值。如果处理器620判断的结果为小于或者等于位移阈值,则处理器620确定不进行定位。处理器620确定不需要向定位终端发送定位请求,而是从存储器630中获取最近一次保存的位置信息与已拍摄的照 片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果处理器620判断的结果为大于位移阈值,则处理器620确定需要进行定位,并通过通信模块610向定位终端发送定位请求。拍照终端600通过通信模块610向定位终端发送定位请求。定位终端在接收到定位请求后,定位模块可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。在获取得到当前的位置信息后,通过定位终端将当前的位置信息发送给拍照终端600进行匹配、添加标签,或者,定位模块在获取得到当前的位置信息后,定位终端向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 2: After the camera terminal 600 and the positioning terminal establish a connection, the processor 620 determines whether the time difference between the current shooting and the last shooting is greater than a time threshold, and if the result of the processor 620 is less than or equal to the time threshold, then determining No positioning is required. The processor 620 does not need to instruct the communication module 610 to send a positioning request to the positioning terminal, but obtains the last saved location information from the memory 630 to match the captured photo, and then adds a location to the corresponding photo according to the last saved location information. label. If the result of the determination by the processor 620 is greater than the time threshold, the processor 620 further determines whether the displacement of the photographing terminal 600 is greater than the displacement threshold during the time period between the current shooting and the last shooting. If the result of the processor 620 decision is less than or equal to the displacement threshold, the processor 620 determines not to perform the positioning. The processor 620 determines that it is not necessary to send a positioning request to the positioning terminal, but obtains the last saved location information and the taken photo from the memory 630. The slice is matched, and then the location tag is added to the corresponding photo according to the last saved location information. If the result of the determination by the processor 620 is greater than the displacement threshold, the processor 620 determines that positioning is required and sends a positioning request to the positioning terminal via the communication module 610. The photographing terminal 600 transmits a positioning request to the positioning terminal through the communication module 610. After the positioning terminal receives the positioning request, the positioning module can directly locate the current location information according to the specified positioning manner, or can perform positioning according to the remaining power of the positioning terminal or the current environment of the positioning terminal to obtain the current location. location information. After obtaining the current location information, the positioning terminal sends the current location information to the camera terminal 600 for matching and adding a label, or after the positioning module obtains the current location information, the positioning terminal sends the current location to the third-party server. The location information is sent to a third-party server for matching and tagging. For details, refer to the foregoing embodiment, and the description is not repeated here.
方案三:拍照终端600和定位终端在建立连接后,处理器620判断本次进行拍摄和上一次进行拍摄的时间段内,拍摄终端600的位移是否大于位移阈值。如果处理器620判断的结果为小于或者等于位移阈值,则处理器620确定不进行定位,所以,处理器620确定不需要通过通信模块610向定位终端发送定位请求,而是从存储器630中获取最近一次保存的位置信息与已拍摄的照片匹配,再根据最近一次保存的位置信息为对应的照片添加位置标签。如果处理器620判断的结果为大于位移阈值,则处理器620确定需要通过通信模块610向定位终端发送定位请求,并通过通信模块610向定位终端发送定位请求。定位终端在接收定位请求后,判断接收定位请求和接收上一次定位请求之间的时间差是否小于时间阈值。如果判断的结果为小于或者等于时间阈值,则确定不进行定位。定位终端向拍照终端600发送没有进行定位的通知,以及定位请求中的照片的标识或者拍照的时间中的至少一个;或,定位终端向拍照终端600发送上一次的位置信息,以及定位请求中的照片的标识或者拍照的时间中的至少一个。如果判断的结果为大于时间阈值,则确定进行定位。定位模块可以直接根据指定的定位方式进行定位以获取当前的位置信息,也可以根据定位终端 的剩余电量或者定位终端的当前环境选择定位方式进行定位以获取当前的位置信息。定位模块在获取得到当前的位置信息后,将当前的位置信息发送给拍照终端600。拍照终端600通过通信模块610接收到当前的位置信息后,发送给处理器620。处理器620根据当前的位置信息进行匹配、添加标签,或者,定位模块在获取得到当前的位置信息后,通过向第三方服务器发送当前的位置信息发送给第三方服务器进行匹配、添加标签,具体请参见上述的实施例,此处不再展开描述。Solution 3: After the photographing terminal 600 and the positioning terminal establish a connection, the processor 620 determines whether the displacement of the photographing terminal 600 is greater than the displacement threshold in the period during which the photographing is performed and the photographing is performed last time. If the result of the processor 620 determines that the result is less than or equal to the displacement threshold, the processor 620 determines not to perform the positioning, so the processor 620 determines that the positioning request does not need to be sent to the positioning terminal through the communication module 610, but instead obtains the latest from the memory 630. The saved location information matches the captured photo, and the location tag is added to the corresponding photo based on the last saved location information. If the result of the determination by the processor 620 is greater than the displacement threshold, the processor 620 determines that a positioning request needs to be sent to the positioning terminal through the communication module 610, and transmits a positioning request to the positioning terminal through the communication module 610. After receiving the positioning request, the positioning terminal determines whether the time difference between receiving the positioning request and receiving the last positioning request is less than a time threshold. If the result of the judgment is less than or equal to the time threshold, it is determined that the positioning is not performed. The positioning terminal transmits to the camera terminal 600 a notification that no positioning is performed, and at least one of the identification of the photo in the positioning request or the time of photographing; or the positioning terminal transmits the last location information to the photographing terminal 600, and the positioning request At least one of the identification of the photo or the time of photographing. If the result of the judgment is greater than the time threshold, it is determined to perform the positioning. The positioning module can directly locate the current location information according to the specified positioning manner, or according to the positioning terminal. The remaining power or the current environment of the positioning terminal selects the positioning mode to locate the current location information. After acquiring the current location information, the positioning module sends the current location information to the camera terminal 600. After receiving the current location information through the communication module 610, the camera terminal 600 transmits the current location information to the processor 620. The processor 620 performs matching and adding a label according to the current location information. After obtaining the current location information, the positioning module sends the current location information to the third-party server and sends the label to the third-party server for matching and adding labels. Referring to the above embodiments, the description will not be repeated here.
针对于在拍照终端进行拍摄时,定位终端专门为拍照终端一直进行定位以提供位置信息的场景,本申请提出的技术方案与现有技术相比,只有在定位终端接收到拍照终端发送的定位请求,并且,定位终端和/或拍照终端经过判断确定确实需要进行定位时,定位终端才会通过定位获取当前的位置信息,有效减少了定位终端的电量的消耗。The positioning scheme is specifically for the camera terminal to perform the positioning to provide the location information. The technical solution proposed by the present application is compared with the prior art, and only the positioning terminal receives the positioning request sent by the camera terminal. Moreover, when the positioning terminal and/or the photographing terminal determine that the positioning is really needed, the positioning terminal obtains the current location information by positioning, thereby effectively reducing the power consumption of the positioning terminal.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。 The above disclosure is only a preferred embodiment of the present invention, and of course, the scope of the present invention is not limited thereto, and those skilled in the art can understand all or part of the process of implementing the above embodiments, and according to the present invention. The equivalent changes required are still within the scope of the invention.

Claims (30)

  1. 一种提供位置信息的方法,其特征在于,包括如下步骤:A method for providing location information, comprising the steps of:
    定位终端建立与拍照终端之间的连接,其中,所述定位终端与所述拍照终端之间的距离不超过预设阈值;The positioning terminal establishes a connection with the photographing terminal, wherein a distance between the positioning terminal and the photographing terminal does not exceed a preset threshold;
    所述定位终端接收所述拍照终端通过所述连接发送的定位请求,其中,所述定位请求包括所述拍照终端拍摄的照片的标识或者拍照的时间中的至少一个;The positioning terminal receives a positioning request that is sent by the photographing terminal through the connection, where the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing;
    所述定位终端判断以下至少一个:所述定位终端接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述定位终端接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值;The positioning terminal determines at least one of the following: whether the time difference between the positioning request and the last positioning request is greater than a time threshold; and the time period during which the positioning terminal receives the positioning request and the last positioning request, Whether the displacement amount of the positioning terminal is greater than a displacement threshold;
    根据判断的结果确定是否进行定位;Determine whether to perform positioning based on the result of the judgment;
    仅当确定进行定位时,获取当前的位置信息,并通过所述连接向所述拍照终端发送所述当前的位置信息,和所述定位请求包括的部分或全部信息。Only when it is determined that the positioning is performed, the current location information is acquired, and the current location information and some or all of the information included in the positioning request are sent to the camera terminal through the connection.
  2. 根据权利要求1所述的方法,其特征在于,所述定位终端获取当前的位置信息之前还包括:The method according to claim 1, wherein before the acquiring the current location information by the positioning terminal, the method further comprises:
    判断所述定位终端的剩余电量是否大于电量阈值;Determining whether the remaining power of the positioning terminal is greater than a power threshold;
    若所述定位终端的剩余电量大于电量阈值,则按第一扫描优先级确定定位方式;若所述定位终端的剩余电量小于电量阈值,则按第二扫描优先级确定定位方式,其中,所述第一扫描优先级不同于所述第二扫描优先级。If the remaining power of the positioning terminal is greater than the power threshold, the positioning mode is determined according to the first scanning priority; if the remaining power of the positioning terminal is less than the power threshold, the positioning mode is determined according to the second scanning priority, where the The first scan priority is different from the second scan priority.
  3. 根据权利要求1所述的方法,其特征在于,所述定位终端获取当前的位置信息之前还包括:The method according to claim 1, wherein before the acquiring the current location information by the positioning terminal, the method further comprises:
    判断所述定位终端的当前环境是室内还是室外;Determining whether the current environment of the positioning terminal is indoor or outdoor;
    若所述定位终端的当前环境为室内,采用无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位 方式,光定位方式,计算机视觉定位方式中的至少一种获取当前的位置信息;若所述定位终端的当前环境为室外,采用全球导航卫星系统GNSS定位方式获取当前的位置信息。If the current environment of the positioning terminal is indoor, adopt wireless fidelity Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, Ultra-wideband radio positioning method, broadcast signal positioning At least one of the mode, the optical positioning mode, and the computer vision positioning mode acquires current location information; if the current environment of the positioning terminal is outdoor, the global navigation satellite system GNSS positioning mode is used to obtain current location information.
  4. 根据权利要求1至3任一权利要求所述的方法,其特征在于,A method according to any of claims 1 to 3, characterized in that
    所述定位终端判断以下至少一个:所述定位终端接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述定位终端接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值,根据判断的结果确定是否进行定位具体为:The positioning terminal determines at least one of the following: whether the time difference between the positioning request and the last positioning request is greater than a time threshold; and the time period during which the positioning terminal receives the positioning request and the last positioning request, Whether the displacement of the positioning terminal is greater than a displacement threshold, and determining whether to perform positioning according to the result of the determination is specifically:
    所述定位终端判断所述定位终端接收所述定位请求和接收上一次定位请求的时间差是否大于时间阈值;Determining, by the positioning terminal, whether the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request is greater than a time threshold;
    若所述定位终端接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,则判断所述定位终端接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移是否大于位移阈值;If the time difference between the positioning request and the receiving the last positioning request is greater than a time threshold, determining that the positioning terminal is within a time period between receiving the positioning request and receiving the last positioning request, the positioning terminal Whether the displacement is greater than the displacement threshold;
    若所述定位终端的位移大于位移阈值,则确定进行定位。If the displacement of the positioning terminal is greater than the displacement threshold, it is determined to perform positioning.
  5. 根据权利要求4所述的方法,其特征在于,所述根据判断的结果确定是否进行定位包括:The method according to claim 4, wherein the determining whether to perform positioning according to the result of the determining comprises:
    若所述定位终端接收所述定位请求和接收上一次定位请求的时间差小于或等于时间阈值,则确定不进行定位;或,If the time difference between the positioning terminal receiving the positioning request and receiving the last positioning request is less than or equal to the time threshold, determining that the positioning is not performed; or
    若所述定位终端接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,且,所述定位终端接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移小于或者等于位移阈值,则确定不进行定位。If the time difference between the location request receiving the location request and the previous location request is greater than a time threshold, and the positioning terminal receives the location request and receives the previous location request, the positioning terminal If the displacement is less than or equal to the displacement threshold, then it is determined that no positioning is performed.
  6. 根据权利要求1至5任一权利要求所述的方法,其特征在于,根据判断的结果确定是否进行定位之后,还包括:The method according to any one of claims 1 to 5, wherein after determining whether to perform positioning according to the result of the determining, the method further comprises:
    若确定不进行定位,向所述拍照终端发送没有进行定位的通知,以及所述定位请求中的照片的标识或者拍照的时间中的至少一个;或,向所述拍照终端 发送上一次的位置信息,以及所述定位请求中的照片的标识或者拍照的时间中的至少一个。If it is determined that the positioning is not performed, sending, to the photographing terminal, a notification that no positioning is performed, and at least one of an identification of a photo in the positioning request or a photographing time; or, to the photographing terminal Sending the last location information, and at least one of the identification of the photo in the location request or the time of the photo.
  7. 根据权利要求1所述的方法,其特征在于,所述定位终端获取当前的位置信息之前,包括开启所述定位模块;所述定位终端获取当前的位置信息之后,包括关闭所述定位模块。The method according to claim 1, wherein before the acquiring the current location information, the positioning terminal comprises: opening the positioning module; and after acquiring the current location information, the positioning terminal comprises: closing the positioning module.
  8. 一种提供位置信息的装置,其特征在于,包括:连接建立模块、接收模块、第一判断模块、确定模块以及获取发送模块,An apparatus for providing location information, comprising: a connection establishment module, a receiving module, a first determining module, a determining module, and an obtaining sending module,
    所述连接建立模块用于建立与拍照终端之间的连接,其中,所述定位终端与所述拍照终端之间的距离不超过预设阈值;The connection establishing module is configured to establish a connection with the photographing terminal, wherein a distance between the positioning terminal and the photographing terminal does not exceed a preset threshold;
    所述接收模块用于接收所述拍照终端通过所述连接发送的定位请求,其中,所述定位请求包括所述拍照终端拍摄的照片的标识或者拍照的时间中的至少一个;The receiving module is configured to receive a positioning request that is sent by the photographing terminal through the connection, where the positioning request includes at least one of an identifier of a photo taken by the photographing terminal or a time of photographing;
    所述第一判断模块用于判断以下至少一个:所述接收模块接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述接收模块接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值;The first determining module is configured to determine at least one of the following: whether the time difference between the receiving module and the last positioning request is greater than a time threshold; and the receiving module receives the positioning request and the last positioning request. Whether the displacement amount of the positioning terminal is greater than a displacement threshold during a time period;
    所述确定模块用于根据判断的结果确定是否进行定位;The determining module is configured to determine whether to perform positioning according to the result of the determining;
    所述获取发送模块用于仅当确定进行定位时,获取当前的位置信息,并通过所述连接向所述拍照终端发送所述当前的位置信息,和所述定位请求包括的部分或全部信息。The acquiring and transmitting module is configured to acquire current location information only when determining to perform positioning, and send the current location information and some or all information included in the positioning request to the camera terminal through the connection.
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括第二判断模块以及优先级确定模块,The device according to claim 8, wherein the device further comprises a second determining module and a priority determining module,
    所述第二判断模块用于判断所述定位终端的剩余电量是否大于电量阈值;The second determining module is configured to determine whether the remaining power of the positioning terminal is greater than a power threshold;
    所述优先级确定模块用于在所述定位终端的剩余电量大于电量阈值时,按第一扫描优先级确定定位方式;在所述定位终端的剩余电量小于电量阈值时, 按第二扫描优先级确定定位方式,其中,所述第一扫描优先级不同于所述第二扫描优先级。The priority determining module is configured to determine a positioning mode according to a first scanning priority when the remaining power of the positioning terminal is greater than a power threshold; when the remaining power of the positioning terminal is less than a power threshold, The positioning mode is determined according to the second scanning priority, wherein the first scanning priority is different from the second scanning priority.
  10. 根据权利要求8所述的装置,其特征在于,所述装置还包括第三判断模块,The device according to claim 8, wherein said device further comprises a third determining module,
    所述第三判断模块用于判断所述定位终端的当前环境是室内还是室外;The third determining module is configured to determine whether the current environment of the positioning terminal is indoor or outdoor;
    所述获取发送模块用于在所述定位终端的当前环境为室内时,采用无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式中的至少一种获取当前的位置信息;在所述定位终端的当前环境为室外时,采用全球导航卫星系统GNSS定位方式获取当前的位置信息。The acquiring and sending module is configured to use a wireless fidelity Wi-Fi positioning mode, a Bluetooth positioning mode, a cellular positioning mode, a geomagnetic positioning mode, an ultrasonic positioning mode, an infrared positioning mode, and an RF when the current environment of the positioning terminal is indoors. At least one of a tag positioning mode, a Zigbee positioning mode, an ultra-wideband radio positioning mode, a broadcast signal positioning mode, an optical positioning mode, and a computer vision positioning mode acquires current location information; when the current environment of the positioning terminal is outdoor, The current location information is obtained by using the GNSS positioning method of the global navigation satellite system.
  11. 根据权利要求8至10任一权利要求所述的装置,其特征在于,A device according to any of claims 8 to 10, characterized in that
    所述第一判断模块用于判断所述接收模块接收所述定位请求和接收上一次定位请求的时间差是否大于时间阈值,在所述接收模块接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,判断所述接收模块接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移是否大于位移阈值;The first judging module is configured to determine whether the time difference between the receiving module receiving the positioning request and receiving the last positioning request is greater than a time threshold, and the time difference between the receiving module receiving the positioning request and receiving the last positioning request is greater than a time threshold, determining whether the displacement of the positioning terminal is greater than a displacement threshold within a time period between the receiving the positioning request and receiving the last positioning request;
    所述确定模块用于在所述定位终端的位移大于位移阈值时,确定进行定位。The determining module is configured to determine to perform positioning when the displacement of the positioning terminal is greater than a displacement threshold.
  12. 根据权利要求11所述的装置,其特征在于,所述确定模块用于在所述定位终端接收所述定位请求和接收上一次定位请求的时间差小于或等于时间阈值时,确定不进行定位;或,The apparatus according to claim 11, wherein the determining module is configured to determine not to perform positioning when the time difference between the positioning request and the receiving of the last positioning request is less than or equal to a time threshold; or ,
    在所述定位终端接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,且,所述定位终端接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移小于或者等于位移阈值时,确定不进行定位。 And the time difference between the time that the positioning terminal receives the positioning request and the last positioning request is greater than a time threshold, and the positioning terminal receives the positioning request and receives the last positioning request, the positioning terminal When the displacement is less than or equal to the displacement threshold, it is determined that the positioning is not performed.
  13. 根据权利要求8至12任一权利要求所述的装置,其特征在于,所述获取发送模块用于在确定不进行定位时,向所述拍照终端发送没有进行定位的通知和所述定位请求中的照片的标识或者拍照的时间中的至少一个;或,向所述拍照终端发送上一次的位置信息所述定位请求中的照片的标识或者拍照的时间中的至少一个。The device according to any one of claims 8 to 12, wherein the acquisition and transmission module is configured to send a notification that the positioning is not performed and the positioning request to the camera terminal when determining that the positioning is not performed. At least one of the identification of the photo or the time of photographing; or sending to the photographing terminal at least one of the last location information, the identification of the photo in the location request, or the time of photographing.
  14. 根据权利要求8所述的装置,其特征在于,所述装置还包括开启模块以及关闭模块,所述开启模块用于开启所述定位模块;所述关闭模块用于关闭所述定位模块。The device according to claim 8, wherein the device further comprises an opening module and a closing module, the opening module is configured to open the positioning module; and the closing module is configured to close the positioning module.
  15. 一种定位终端,其特征在于,包括处理器、通信模块以及定位模块;A positioning terminal, comprising: a processor, a communication module, and a positioning module;
    所述定位模块,用于获取当前的位置信息;The positioning module is configured to acquire current location information;
    所述通信模块,用于与拍照终端之间进行通信;The communication module is configured to communicate with a camera terminal;
    所述处理器,用于指令所述通信模块建立与拍照终端之间的连接以及接收所述拍照终端通过所述连接发送的定位请求,其中,所述定位终端与所述拍照终端之间的距离不超过预设阈值,所述定位请求包括所述拍照终端拍摄的照片的标识或者拍照的时间中的至少一个,The processor is configured to instruct the communication module to establish a connection with the photographing terminal and receive a positioning request sent by the photographing terminal through the connection, wherein a distance between the positioning terminal and the photographing terminal Not exceeding a preset threshold, the positioning request includes at least one of an identification of a photo taken by the photographing terminal or a time of photographing,
    所述处理器还用于根据所述定位请求判断以下至少一个:所述通信模块接收所述定位请求和上一次定位请求的时间差是否大于时间阈值;在所述通信模块接收所述定位请求和上一次定位请求的时间段内,所述定位终端的位移量是否大于位移阈值,根据判断的结果确定是否进行定位,仅当确定进行定位时,指令所述定位模块获取当前的位置信息并指令所述通信模块通过所述连接向所述拍照终端发送所述定位请求中的照片的标识或者拍照的时间中的至少一个,和所述位置信息。The processor is further configured to: determine, according to the positioning request, at least one of: the time difference between the time that the communication module receives the positioning request and the last positioning request is greater than a time threshold; and the receiving, by the communication module, the positioning request and Whether the displacement amount of the positioning terminal is greater than the displacement threshold during a time period of the positioning request, determining whether to perform positioning according to the result of the determination, and only when determining to perform positioning, instructing the positioning module to acquire current position information and instructing the The communication module transmits at least one of an identification of a photo in the positioning request or a time of photographing to the photographing terminal through the connection, and the position information.
  16. 根据权利要求15所述的定位终端,其特征在于,所述处理器还用于判断所述定位终端的剩余电量是否大于电量阈值,在若所述定位终端的剩余电量大于电量阈值时,按第一扫描优先级确定定位方式;在所述定位终端的剩余电 量小于电量阈值时,按第二扫描优先级确定定位方式,其中,所述第一扫描优先级不同于所述第二扫描优先级。The locating terminal according to claim 15, wherein the processor is further configured to determine whether the remaining power of the positioning terminal is greater than a power threshold, and if the remaining power of the positioning terminal is greater than a power threshold, a scanning priority determining positioning mode; remaining power in the positioning terminal When the quantity is less than the power threshold, the positioning mode is determined according to the second scanning priority, wherein the first scanning priority is different from the second scanning priority.
  17. 根据权利要求15所述的定位终端,其特征在于,所述处理器还用于判断所述定位终端的当前环境是室内还是室外,在所述定位终端的当前环境为室内时,确定采用无线保真Wi-Fi定位方式,蓝牙定位方式,蜂窝定位方式,地磁定位方式,超声波定位方式,红外定位方式,射频标签定位方式,Zigbee定位方式,超宽带无线电定位方式,广播信号定位方式,光定位方式,计算机视觉定位方式中的至少一种获取当前的位置信息,在所述定位终端的当前环境为室外时,确定采用全球导航卫星系统GNSS定位方式获取当前的位置信息。The positioning terminal according to claim 15, wherein the processor is further configured to determine whether the current environment of the positioning terminal is indoor or outdoor, and when the current environment of the positioning terminal is indoor, determining to adopt wireless protection. True Wi-Fi positioning mode, Bluetooth positioning mode, cellular positioning mode, geomagnetic positioning mode, ultrasonic positioning mode, infrared positioning mode, radio frequency tag positioning mode, Zigbee positioning mode, ultra-wideband radio positioning mode, broadcast signal positioning mode, optical positioning mode At least one of the computer vision positioning modes acquires current location information, and when the current environment of the positioning terminal is outdoor, it is determined that the global navigation satellite system GNSS positioning mode is used to obtain current location information.
  18. 根据权利要求15至17任一权利要求所述的定位终端,其特征在于,所述处理器具体用于判断所述通信模块接收所述定位请求和接收上一次定位请求的时间差是否大于时间阈值,在所述通信模块接收所述定位请求和接收上一次定位请求的时间差大于时间阈值时,判断所述通信模块接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移是否大于位移阈值,在所述定位终端的位移大于位移阈值时,确定进行定位。The positioning terminal according to any one of claims 15 to 17, wherein the processor is specifically configured to determine whether the time difference between the receiving of the positioning request and the receiving of the last positioning request by the communication module is greater than a time threshold. When the time difference between the receiving of the positioning request and the receiving of the last positioning request by the communication module is greater than a time threshold, determining that the positioning terminal is within a time period between receiving the positioning request and receiving the last positioning request, the positioning terminal Whether the displacement is greater than the displacement threshold, and determining the positioning when the displacement of the positioning terminal is greater than the displacement threshold.
  19. 根据权利要求18所述的定位终端,其特征在于,所述处理器具体用于:The positioning terminal according to claim 18, wherein the processor is specifically configured to:
    在所述通信模块接收所述定位请求和接收上一次定位请求的时间差小于或等于时间阈值,则确定不进行定位;或,When the time difference between the receiving of the positioning request and the receiving of the last positioning request by the communication module is less than or equal to a time threshold, determining that no positioning is performed; or
    在所述通信模块接收所述定位请求和接收上一次定位请求的时间差大于时间阈值,且,所述通信模块接收所述定位请求和接收上一次定位请求之间的时间段内,所述定位终端的位移小于或者等于位移阈值时,确定不进行定位。And the time difference between the time that the communication module receives the positioning request and the last positioning request is greater than a time threshold, and the positioning terminal is within a time period between the receiving the positioning request and receiving the last positioning request When the displacement is less than or equal to the displacement threshold, it is determined that the positioning is not performed.
  20. 根据权利要求15至19任一权利要求所述的定位终端,其特征在于,所述处理器还用于:在确定不进行定位时,指令所述通信模块发送没有进行定位的通知和所述定位请求中的照片的标识或者拍照的时间中的至少一个,或, 发送上一次的位置信息以及所述定位请求中的照片的标识或者拍照的时间中的至少一个。The positioning terminal according to any one of claims 15 to 19, wherein the processor is further configured to: when determining that no positioning is to be performed, instruct the communication module to send a notification that the positioning is not performed and the positioning At least one of the identification of the photo in the request or the time of photographing, or, Sending at least one of the last location information and the identification of the photo in the location request or the time of the photo.
  21. 根据权利要求15所述的定位终端,其特征在于,所述处理器还用于在获取当前的位置信息之前,开启所述定位模块,在获取当前的位置信息之后,关闭所述定位模块。The positioning terminal according to claim 15, wherein the processor is further configured to: after acquiring the current location information, turn on the positioning module, and after acquiring the current location information, close the positioning module.
  22. 一种获取位置信息的方法,其特征在于,所述方法包括:A method for obtaining location information, the method comprising:
    拍照终端与定位终端建立连接,所述定位终端与所述拍照终端相距不超过预设距离;The camera terminal establishes a connection with the positioning terminal, and the positioning terminal is not more than a preset distance from the camera terminal;
    确定是否需要发送定位请求;Determine if a location request needs to be sent;
    仅当确定需要发送定位请求时,所述拍照终端通过所述连接向所述定位终端发送定位请求,所述定位请求包括照片的标识和照片的拍照时间中的至少一个;The photographing terminal sends a positioning request to the positioning terminal through the connection, the positioning request includes at least one of an identifier of the photo and a photographing time of the photo, only when it is determined that the positioning request needs to be sent;
    若所述拍照终端接收到所述定位终端根据所述定位请求返回的位置信息,和所述定位请求包括的部分或全部信息,根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述位置信息与所述已拍摄的照片匹配;If the photographing terminal receives the location information returned by the positioning terminal according to the positioning request, and part or all of the information included in the positioning request, part or all of the information included according to the positioning request, and the photographing terminal The information of the photograph has been taken, and the position information is matched with the photographed photograph;
    根据所述位置信息为对应的照片添加位置标签。Adding a location tag to the corresponding photo according to the location information.
  23. 根据权利要求22所述的方法,其特征在于,确定是否需要发送定位请求包括:The method of claim 22, wherein determining whether the location request needs to be sent comprises:
    所述拍照终端判断所述拍照终端本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,若所述拍照终端本次进行拍摄和上一次进行拍摄的时间差大于时间阈值,确定需要发送定位请求,若所述拍照终端本次进行拍摄和上一次进行拍摄的时间差小于或者等于时间阈值,确定不需要发送定位请求;或者,The photographing terminal determines whether the time difference between the photographing terminal and the last photographing is greater than a time threshold. If the photographing terminal performs the photographing and the time difference of the last photographing is greater than a time threshold, it is determined that the positioning request needs to be sent. If the time difference between the photographing terminal and the last photographing is less than or equal to the time threshold, it is determined that the positioning request does not need to be sent; or
    所述拍照终端判断在所述拍照终端本次进行拍摄和上一次进行拍摄的时间段内,所述拍照终端的位移量是否大于位移阈值,若拍照终端的位移量大于位 移阈值,确定需要发送定位请求,若拍照终端的位移量小于或者等于位移阈值,确定不需要发送定位请求。The photographing terminal determines whether the displacement of the photographing terminal is greater than a displacement threshold during a period in which the photographing terminal performs the photographing and the last photographing, and if the displacement of the photographing terminal is greater than the bit The threshold is moved to determine that a positioning request needs to be sent. If the displacement of the camera terminal is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
  24. 根据权利要求22或23所述的方法,其特征在于,所述方法还包括,The method of claim 22 or 23, wherein the method further comprises
    若收到所述定位终端没有进行定位的通知,获取发送所述定位请求之前,最近一次保存的位置信息,根据所述定位终端返回照片的标识和/或照片的拍摄时间,以及所述拍照终端已拍摄照片的信息,将所述最近一次保存的位置信息与所述已拍摄的照片匹配;If the notification that the positioning terminal does not perform positioning is received, obtain the last saved location information before sending the positioning request, according to the identifier of the photo returned by the positioning terminal, and/or the shooting time of the photo, and the photographing terminal. The information of the photograph has been taken, and the last saved position information is matched with the photographed photograph;
    根据所述最近一次保存的位置信息为对应的照片添加位置标签。Adding a location tag to the corresponding photo according to the last saved location information.
  25. 一种获取位置信息的装置,其特征在于,包括:连接模块、确定模块、发送模块、接收模块、匹配模块以及添加模块,An apparatus for acquiring location information, comprising: a connection module, a determining module, a sending module, a receiving module, a matching module, and an adding module,
    所述连接模块用于与定位终端建立连接,所述定位终端与所述拍照终端相距不超过预设距离;The connection module is configured to establish a connection with the positioning terminal, and the positioning terminal is not more than a preset distance from the camera terminal;
    所述确定模块用于确定是否需要发送定位请求;The determining module is configured to determine whether a positioning request needs to be sent;
    所述发送模块用于仅当确定需要发送定位请求时,通过所述连接向所述定位终端发送定位请求,所述定位请求包括照片的标识和照片的拍照时间中的至少一个;The sending module is configured to send, by using the connection, a positioning request to the positioning terminal, where the positioning request includes at least one of an identifier of a photo and a photographing time of a photo, when it is determined that a positioning request needs to be sent;
    所述接收模块用于接收所述定位终端根据所述定位请求返回的位置信息,和所述定位请求包括的部分或全部信息;The receiving module is configured to receive location information returned by the positioning terminal according to the positioning request, and part or all of information included in the positioning request;
    所述匹配模块用于根据所述定位请求包括的部分或全部信息,以及所述拍照终端已拍摄照片的信息,将所述位置信息与所述已拍摄的照片匹配;The matching module is configured to match the location information with the captured photo according to part or all of the information included in the positioning request and information that the camera terminal has taken a photo;
    所述添加模块用于根据所述位置信息为对应的照片添加位置标签。The adding module is configured to add a location tag to the corresponding photo according to the location information.
  26. 根据权利要求25所述的装置,其特征在于,所述确定模块用于判断所述拍照终端本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,在所述拍照终端本次进行拍摄和上一次进行拍摄的时间差大于时间阈值时,确定需 要发送定位请求,在所述拍照终端本次进行拍摄和上一次进行拍摄的时间差小于或者等于时间阈值时,确定不需要发送定位请求;或者,The device according to claim 25, wherein the determining module is configured to determine whether the time difference between the photographing terminal and the last photographing is greater than a time threshold, and the photographing terminal performs the photographing and When the time difference of the last shooting is greater than the time threshold, it is determined To send a positioning request, when the time difference between the current shooting of the photographing terminal and the last shooting is less than or equal to the time threshold, it is determined that the positioning request does not need to be sent; or
    所述确定模块用于判断在所述拍照终端本次进行拍摄和上一次进行拍摄的时间段内,所述拍照终端的位移量是否大于位移阈值,在拍照终端的位移量大于位移阈值时,确定需要发送定位请求,在拍照终端的位移量小于或者等于位移阈值时,确定不需要发送定位请求。The determining module is configured to determine whether the displacement amount of the photographing terminal is greater than a displacement threshold during a period in which the photographing terminal performs the photographing and the last photographing, and when the displacement of the photographing terminal is greater than the displacement threshold, determining A positioning request needs to be sent. When the displacement of the photographing terminal is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
  27. 根据权利要求25或26所述的装置,其特征在于,所述装置还包括获取模块,The apparatus according to claim 25 or 26, wherein said apparatus further comprises an acquisition module,
    所述获取模块用于在收到所述定位终端没有进行定位的通知时,获取发送所述定位请求之前,最近一次保存的位置信息;The acquiring module is configured to: when receiving the notification that the positioning terminal does not perform positioning, obtain the last saved location information before sending the positioning request;
    所述匹配模块用于根据所述定位终端返回照片的标识和/或照片的拍摄时间,以及所述拍照终端已拍摄照片的信息,将所述最近一次保存的位置信息与所述已拍摄的照片匹配;The matching module is configured to: according to the identifier of the photo returned by the positioning terminal and/or the shooting time of the photo, and the information that the photo terminal has taken the photo, the last saved location information and the taken photo match;
    所述添加模块用于根据所述最近一次保存的位置信息为对应的照片添加位置标签。The adding module is configured to add a location tag to the corresponding photo according to the last saved location information.
  28. 一种拍照终端,其特征在于,包括:通信模块、拍摄模块以及处理器,A camera terminal, comprising: a communication module, a shooting module, and a processor,
    所述拍摄模块用于进行拍照;The photographing module is configured to perform photographing;
    所述通信模块用于与定位终端进行通信;The communication module is configured to communicate with a positioning terminal;
    所述处理器用于指令所述通信模块建立连接,其中,所述定位终端与所述拍照终端相距不超过预设距离;The processor is configured to instruct the communication module to establish a connection, where the positioning terminal is not more than a preset distance from the camera terminal;
    所述处理器还用于确定是否需要发送定位请求,并在确定需要发送定位请求时,指令所述通信模块通过所述连接向所述定位终端发送定位请求,其中,所述定位请求包括照片的标识和照片的拍照时间中的至少一个;The processor is further configured to determine whether a location request needs to be sent, and when determining that the location request needs to be sent, instructing the communication module to send a location request to the positioning terminal by using the connection, where the location request includes a photo At least one of the photographing time of the logo and the photo;
    所述处理器还用于根据所述定位请求包括的部分或全部信息,以及所述拍 照终端已拍摄照片的信息,将所述通信模块返回的位置信息与所述已拍摄的照片匹配,并根据所述位置信息为对应的照片添加位置标签。The processor is further configured to: according to part or all of the information included in the positioning request, and the beat And according to the information that the terminal has taken the photo, the location information returned by the communication module is matched with the captured photo, and the location tag is added to the corresponding photo according to the location information.
  29. 根据权利要求28所述的拍照终端,其特征在于,The photographing terminal according to claim 28, wherein
    所述处理器还用于判断所述拍摄模块本次进行拍摄和上一次进行拍摄的时间差是否大于时间阈值,在所述拍摄模块本次进行拍摄和上一次进行拍摄的时间差大于时间阈值时,确定需要发送定位请求,在所述拍摄模块本次进行拍摄和上一次进行拍摄的时间差小于或者等于时间阈值时,确定不需要发送定位请求;或者,The processor is further configured to determine whether the time difference between the current shooting of the shooting module and the last shooting is greater than a time threshold, and determining when the time difference between the shooting module and the last shooting is greater than a time threshold. The positioning request needs to be sent, and when the time difference between the current shooting by the shooting module and the last shooting is less than or equal to the time threshold, it is determined that the positioning request does not need to be sent; or
    所述处理器还用于判断在所述拍摄模块本次进行拍摄和上一次进行拍摄的时间段内,所述拍照终端的位移量是否大于位移阈值,在拍照终端的位移量大于位移阈值时,确定需要发送定位请求,在拍照终端的位移量小于或者等于位移阈值时,确定不需要发送定位请求。The processor is further configured to determine whether the displacement of the photographing terminal is greater than a displacement threshold during a period in which the photographing module performs the photographing and the last photographing, and when the displacement of the photographing terminal is greater than the displacement threshold, It is determined that the positioning request needs to be sent, and when the displacement amount of the photographing terminal is less than or equal to the displacement threshold, it is determined that the positioning request does not need to be sent.
  30. 根据权利要求27或28所述的拍照终端,其特征在于,所述处理器还用于在收到所述定位终端没有进行定位的通知时,获取发送所述定位请求之前,最近一次保存的位置信息,根据所述定位终端返回照片的标识和/或照片的拍摄时间,以及所述拍照终端已拍摄照片的信息,将所述最近一次保存的位置信息与所述已拍摄的照片匹配,并根据所述最近一次保存的位置信息为对应的照片添加位置标签。 The photographing terminal according to claim 27 or 28, wherein the processor is further configured to: when receiving the notification that the positioning terminal does not perform positioning, acquire the last saved position before sending the positioning request The information, according to the identifier of the photo returned by the positioning terminal and/or the photographing time of the photo, and the information that the photographing terminal has taken the photo, matching the last saved location information with the photographed photograph, and according to The last saved location information adds a location tag to the corresponding photo.
PCT/CN2015/096444 2015-12-04 2015-12-04 Method, apparatus and equipment for providing and obtaining location information WO2017092039A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/096444 WO2017092039A1 (en) 2015-12-04 2015-12-04 Method, apparatus and equipment for providing and obtaining location information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/096444 WO2017092039A1 (en) 2015-12-04 2015-12-04 Method, apparatus and equipment for providing and obtaining location information

Publications (1)

Publication Number Publication Date
WO2017092039A1 true WO2017092039A1 (en) 2017-06-08

Family

ID=58796038

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/096444 WO2017092039A1 (en) 2015-12-04 2015-12-04 Method, apparatus and equipment for providing and obtaining location information

Country Status (1)

Country Link
WO (1) WO2017092039A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245546A (en) * 2018-12-06 2019-09-17 浙江大华技术股份有限公司 A kind of Target Tracking System, method and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1674000A (en) * 2004-03-24 2005-09-28 株式会社日立制作所 Method of managing and viewing image data
CN1720527A (en) * 2002-11-06 2006-01-11 佳能株式会社 Communication device, image storage device, image pickup device, and control method thereof
US20070211143A1 (en) * 2006-03-10 2007-09-13 Brodie Keith J Systems and methods for prompt picture location tagging
CN101925831A (en) * 2007-12-14 2010-12-22 高通股份有限公司 Motion detection for tracking

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1720527A (en) * 2002-11-06 2006-01-11 佳能株式会社 Communication device, image storage device, image pickup device, and control method thereof
CN1674000A (en) * 2004-03-24 2005-09-28 株式会社日立制作所 Method of managing and viewing image data
US20070211143A1 (en) * 2006-03-10 2007-09-13 Brodie Keith J Systems and methods for prompt picture location tagging
CN101925831A (en) * 2007-12-14 2010-12-22 高通股份有限公司 Motion detection for tracking

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245546A (en) * 2018-12-06 2019-09-17 浙江大华技术股份有限公司 A kind of Target Tracking System, method and storage medium

Similar Documents

Publication Publication Date Title
CN111434129B (en) Method for controlling express cabinet based on express message and electronic equipment
CN108924737B (en) Positioning method, device, equipment and computer readable storage medium
CN105120144A (en) Image shooting method and device
JP6020353B2 (en) Information processing apparatus, image forming apparatus, remote operation method, remote control method, remote operation program, and remote control program
CN107426428A (en) Electronic equipment and display lightness regulating method
US11588972B2 (en) Shooting control method and terminal
US8478308B2 (en) Positioning system for adding location information to the metadata of an image and positioning method thereof
US9930479B2 (en) Method, apparatus, and mobile terminal for collecting location information
KR101458305B1 (en) Communication system, information terminal, communication method and recording medium
CN113992663B (en) Method for sending file, electronic device and readable storage medium
CN112134995A (en) Method, terminal and computer readable storage medium for searching application object
US9191896B2 (en) Communication apparatus and communication control method
CN114610193A (en) Content sharing method, electronic device, and storage medium
US20220215050A1 (en) Picture Search Method and Device
CN102893295B (en) Storage card
WO2021197354A1 (en) Device positioning method and relevant apparatus
CN108243489B (en) Photographing control method and mobile terminal
WO2017092039A1 (en) Method, apparatus and equipment for providing and obtaining location information
US8477215B2 (en) Wireless data module for imaging systems
US10404903B2 (en) Information processing apparatus, method, system and computer program
CN111567019B (en) Recording medium and electronic device
CN115701032A (en) Device control method, electronic device, and storage medium
CN115250428A (en) Positioning method and device
CN112153404A (en) Code rate adjusting method, code rate detecting method, code rate adjusting device, code rate detecting device, code rate adjusting equipment and storage medium
CN111246240A (en) Method and apparatus for storing media data

Legal Events

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

Ref document number: 15909553

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15909553

Country of ref document: EP

Kind code of ref document: A1