WO2016197816A2 - 终端定位方法、装置和电子设备 - Google Patents

终端定位方法、装置和电子设备 Download PDF

Info

Publication number
WO2016197816A2
WO2016197816A2 PCT/CN2016/083177 CN2016083177W WO2016197816A2 WO 2016197816 A2 WO2016197816 A2 WO 2016197816A2 CN 2016083177 W CN2016083177 W CN 2016083177W WO 2016197816 A2 WO2016197816 A2 WO 2016197816A2
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
light source
location
positioning
graphic code
Prior art date
Application number
PCT/CN2016/083177
Other languages
English (en)
French (fr)
Other versions
WO2016197816A3 (zh
Inventor
陈晓红
刘宁
钱晨
韦玮
支周
卢忱
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016197816A2 publication Critical patent/WO2016197816A2/zh
Publication of WO2016197816A3 publication Critical patent/WO2016197816A3/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/11Arrangements specific to free-space transmission, i.e. transmission through air or vacuum
    • H04B10/114Indoor or close-range type systems
    • H04B10/116Visible light communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • H04W64/003Locating users or terminals or network equipment for network management purposes, e.g. mobility management locating network equipment

Definitions

  • the present application relates to, but is not limited to, the field of communications, and in particular, to a terminal positioning method, apparatus, and electronic device.
  • the positioning methods adopted by the existing visible light communication positioning systems can be classified into the following three categories:
  • LED-label-based (LED-ID)-based visible light communication positioning method the method transmits the position-related ID data to different LED light sources (ie, LED-ID tags), transmits to the mobile terminal through the spatial optical link, and moves The terminal implements passive positioning by processing the ID data.
  • LED-ID tags LED-label-based
  • the terminal implements passive positioning by processing the ID data.
  • the positioning accuracy of this method is low, and the theoretical positioning accuracy is only 1/2 of the spacing of adjacent LED signal sources.
  • a visible light communication positioning method based on received optical signal strength a visible light communication positioning method based on received signal strength indicator (RSSI),
  • RSSI received signal strength indicator
  • the receiving end can detect the signal energy by using a photodetector (Photo Detector, PD for short).
  • PD photodetector
  • Such a method calculates the distance between the reference point and the target point by the propagation loss of the transmitted signal and the path loss model, and then derives the target position according to the trilateral positioning method. Due to the complexity of the indoor visible channel environment, this parameterization method that relies solely on the propagation model to achieve positioning often has large errors and is therefore not commonly used.
  • a visible light communication positioning method based on image sensor imaging uses an LED illumination array as a transmitting end, three-dimensional coordinates emitted from at least three LEDs in the array are received through an optical lens, and information is demodulated by an image sensor, and received by an image sensor The distance geometry of the LED image is calculated to calculate the position of the target.
  • the specific implementation of the method relies on the image sensor's calculation of the distance of the received LED image, so the accuracy of the estimation is related to the measurement accuracy of each component. Due to its fast positioning speed, it is suitable for stationary or slow moving targets. When the mobile terminal is shaken or tilted, the LED image received by the image sensor may also be tilted, uneven illumination, geometric distortion, etc., thereby affecting the positioning accuracy.
  • the embodiments of the present invention provide a method, a device, and an electronic device for positioning a terminal to solve at least the problem of low positioning accuracy caused by positioning the terminal by the visible light communication technology in the related art.
  • a terminal positioning method including: determining a location of a light source according to a graphic code collected by a terminal, wherein the graphic code is formed according to light emitted by the light source, and the graphic code The location of the light source is located; the location of the terminal is located according to the location of the light source.
  • positioning the location of the terminal according to the location where the light source is located includes: acquiring a horizontal distance between the terminal and the light source, wherein the horizontal distance is a projection of the terminal and the light source The distance between projection points in the same horizontal plane; detecting the light source relative to the end An azimuth of the end; positioning the position of the terminal according to the horizontal distance and the azimuth.
  • acquiring the horizontal distance between the terminal and the light source comprises: acquiring a pitch angle between the terminal and the light source, wherein the pitch angle is the terminal and the light source An angle between the line and the horizontal plane; a height difference between a height at which the light source is located and a height at which the terminal is located; and the horizontal distance is calculated according to the height difference and the pitch angle .
  • determining, according to the graphic code collected by the terminal, the location of the light source includes: acquiring the graphic code by using the terminal; and acquiring identification information of the LED array in the light source by parsing the graphic code,
  • the identification information includes at least a location identifier of the LED array; and determining a location of the light source according to the location identifier of the LED array.
  • the graphic code comprises: a two-dimensional code.
  • a terminal locating device including: a determining module, configured to determine, according to a graphic code collected by the terminal, a location where the light source is located, wherein the graphic code is sent according to the light source The light is formed, the graphic code is used to identify a location where the light source is located, and the positioning module is configured to locate a location of the terminal according to a location where the light source is located.
  • the positioning module includes: an acquiring unit, configured to acquire a horizontal distance between the terminal and the light source, wherein the horizontal distance is a projection point when the terminal and the light source are projected on the same horizontal plane a distance between the detection unit configured to detect an azimuth of the light source relative to the terminal; and a positioning unit configured to position the terminal at the position according to the horizontal distance and the azimuth.
  • the acquiring unit includes: a first acquiring subunit, configured to acquire a pitch angle between the terminal and the light source, wherein the pitch angle is a connection between the terminal and the light source An angle between the line and the horizontal plane; a second acquisition subunit, configured to obtain a position of the light source A height difference between a height of the terminal and a height at which the terminal is located; a calculation subunit configured to calculate the horizontal distance based on the height difference and the pitch angle.
  • the determining module includes: an acquiring unit, configured to collect the graphic code by using the terminal; and an analyzing unit, configured to acquire, by parsing the graphic code, identifier information of an LED array in the light source, where The identification information includes at least a location identifier of the LED array; and the first determining unit is configured to determine a location of the light source according to the location identifier of the LED array.
  • an electronic device including: a decoding module, configured to determine a location of a light source according to a graphic code collected by the terminal, wherein the graphic code is formed according to light emitted by the light source, The graphic code is used to identify a location where the light source is located; the positioning processing module is configured to locate a location where the terminal is located according to a location where the light source is located.
  • the positioning processing module includes: a ranging unit configured to acquire a horizontal distance between the terminal and the light source, wherein the horizontal distance is when the terminal is projected on the same horizontal plane as the light source a distance between the projection points; a direction sensor configured to detect an azimuth of the light source relative to the terminal; and a positioning processing unit configured to position the terminal at the position according to the horizontal distance and the azimuth.
  • the ranging unit comprises: a level, configured to acquire a pitch angle between the terminal and the light source, wherein the pitch angle is a line and a horizontal plane between the terminal and the light source An angle between the third acquisition subunit, the height difference between the height of the position where the light source is located and the height of the position where the terminal is located; the ranging subunit is set according to the height difference And the pitch angle calculates the horizontal distance.
  • the decoding module includes: a collector configured to collect, by using the terminal, the graphic code generated according to light emitted by the light source; and a decoder configured to parse the graphic code to obtain an LED in the light source
  • the identification information of the array wherein the identification information includes at least a location identifier of the LED array; and the second determining unit is configured to determine a location of the light source according to the location identifier of the LED array.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented when the computer executable instructions are executed.
  • the position of the light source is determined according to the graphic code collected by the terminal, wherein the graphic code is formed according to the light emitted by the light source, and the graphic code is used to identify the position where the light source is located;
  • the terminal determines the position of the light source by collecting the graphic code generated by the light source, and utilizes the strong anti-distortion capability of the graphic code to improve the success rate of the terminal positioning.
  • FIG. 1 is a flowchart of an optional terminal positioning method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a calculation process of a mobile phone terminal positioning processing module according to an example of the present application
  • FIG. 3 is a schematic diagram showing the structure of a graphic code according to an alternative example of the present application.
  • FIG. 4 is a schematic diagram of a calculation process of terminal positioning according to an example of the present application.
  • FIG. 5 is a structural block diagram of an optional terminal positioning apparatus according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of another optional terminal locating device according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of another optional terminal locating device according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram of another optional terminal positioning apparatus according to an embodiment of the present invention.
  • FIG. 9 is a structural block diagram of an optional electronic device according to an embodiment of the present invention.
  • FIG. 10 is a structural block diagram of another optional electronic device according to an embodiment of the present invention.
  • FIG. 11 is a structural block diagram of another optional electronic device according to an embodiment of the present invention.
  • FIG. 12 is a structural block diagram of another optional electronic device according to an embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a visible light indoor positioning system according to an alternative example of the present application.
  • FIG. 1 is a flowchart of an optional terminal positioning method according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
  • Step S102 determining a location where the light source is located according to the graphic code collected by the terminal, wherein the graphic code is formed according to the light emitted by the light source, and the graphic code is used to identify the location where the light source is located;
  • Step S104 positioning the location of the terminal according to the location of the light source.
  • the foregoing terminal positioning method may be, but is not limited to, being applied to a scenario for positioning a terminal in a room.
  • the terminal may include, but is not limited to, a mobile phone, a tablet computer, a notebook computer, and the like.
  • the above light sources may be, but are not limited to, visible light sources (such as LEDs array signal sources).
  • a visible light source such as LEDs array signal sources.
  • a visible light source for example, a terminal in an indoor scene such as a shopping mall, a mine, a gas station, or a hospital is positioned by using a light source.
  • the terminal determines the position of the light source according to the graphic code, and further locates the position where the terminal is located according to the position of the light source, thereby realizing the positioning.
  • Accurate positioning of the location of the terminal in the room solves the problem of low positioning accuracy caused by the positioning of the terminal by the visible light communication technology in the related art, and improves the positioning accuracy of the terminal.
  • the terminal determines the position of the light source by collecting the graphic code generated by the light source, and utilizes the strong anti-distortion capability of the graphic code to improve the success rate of the terminal positioning.
  • the relative positional relationship between the terminal and the light source may be acquired according to the position of the light source, for example, by calculating the level between the two.
  • the distance, and the azimuth of the light source relative to the terminal are read by the direction sensor, and the terminal is positioned according to the horizontal distance and the azimuth angle.
  • the relative positional relationship between the terminal and the light source is obtained, and the final position can be calculated according to the position information of the light source.
  • the position of the terminal realizes accurate positioning of the terminal, solves the problem of low positioning accuracy caused by the positioning of the terminal by the visible light communication technology in the related art, and improves the positioning accuracy of the terminal.
  • the azimuth angle refers to the horizontal angle from the clockwise direction to the straight line from the north end of the standard direction (ie, the north pointed by the compass), and the azimuth angle of the straight line.
  • the azimuth range is from 0 to 360 degrees.
  • the above graphic code may include, but is not limited to, a two-dimensional code.
  • the way to collect the graphic code can be, but is not limited to, scanning the two-dimensional code.
  • the two-dimensional code included in the graphic code in this embodiment is a light intensity of different LEDs in the light source, so that the light source is in a plane (two-dimensional direction) according to a certain geometric pattern and a certain regularity.
  • the data symbol information represented by the black and white array pattern is displayed on the code; a plurality of geometric figures corresponding to the binary are used in the code preparation to represent the text and numerical information, and are automatically recognized by the image input device or the photoelectric scanning device. Information is processed automatically.
  • the most widely used is the Quick Response (QR) code.
  • the QR code has three positioning patterns so that the recognition device can be quickly recognized. Therefore, it has the ability to resist geometric distortion of the graphic, under the angles of rotation and tilt. By scanning the distortion pattern, it is also possible to accurately recover the pixel value at each point in the pattern by affine transformation, thereby accurately extracting information.
  • the light source takes the LEDs array signal source as an example
  • the graphic code takes the QR code as an example
  • the terminal takes the mobile phone as an example.
  • This example may include the following steps:
  • Step 1 Load QR code image information on the LEDs array signal source through a driving circuit, where the image information includes an LED-ID value for identifying the position of the LEDs array signal source, and transmits the signal to the mobile phone through the wireless optical link, and the mobile phone decodes through the decoding module. Outputting an LED-ID value to determine a coverage area of the LEDs array signal source to achieve coarse positioning of the mobile phone;
  • Step 2 Calculate the absolute horizontal distance between the mobile phone and the LEDs array signal source based on the trigonometric function relationship of the world coordinate system, and then use the direction sensor of the mobile phone to obtain the information of the azimuth angle ⁇ , thereby determining the position of the mobile phone and realizing the precise positioning of the mobile phone.
  • the process is performed in the positioning processing module of the mobile phone.
  • the world coordinate system refers to the absolute coordinate system of the system, and the coordinates of all points on the screen before the user coordinate system is not established are determined by the origin of the coordinate system. Location.
  • the manner of obtaining the horizontal distance may be, but is not limited to, obtaining a pitch angle and a height difference between the terminal and the light source, and then according to the pitch angle, the height difference, the connection line of the terminal and the light source, and the horizontal distance on the vertical plane.
  • the triangular function relationship of the constructed triangles calculates the horizontal distance.
  • the light source takes the LEDs array signal source as an example
  • the terminal uses the mobile phone as an example
  • the height of the position where the terminal is located is represented by h.
  • FIG. 2 is a schematic diagram of a calculation process of a mobile phone terminal positioning processing module according to the present example, as shown in FIG. 2, wherein 202 represents a reference plane, 204 represents a mobile phone, and 206 represents an LEDs array signal source.
  • H is the height of the LEDs array signal source from the reference plane 202 (for example, the ground of the floor where the light source is located)
  • h is the height of the handheld mobile phone from the reference plane 202 (for example, the ground of the floor where the light source is located)
  • d is the source of the mobile phone and the LEDs array.
  • is the pitch angle of the mobile phone to the LEDs array signal source. This angle can be obtained indirectly by calling the level of the mobile phone: the angle reading of the mobile phone level is ⁇ .
  • H knows that h can be obtained by the height distribution of adult handheld mobile phones, and the horizontal distance between the LEDs array signal source and the mobile phone can be calculated by the above trigonometric function relationship:
  • the orientation sensor of the mobile phone is used to obtain the azimuth angle ⁇ information of the mobile phone holder, thereby obtaining the position of the mobile phone holder under the LEDs array signal source. Information to achieve a precise positioning process.
  • the height of the position where the light source is located may be predetermined, or may be carried in the graphic code generated by the light emitted by the light source. Then, in order to obtain the height difference between the terminal and the light source, the present invention may be, but is not limited to, a preset.
  • the height of the location where the terminal is located, and the height of the location where the terminal is located can be preset to A predetermined value may also be preset to a predetermined range, or may be determined according to a preset terminal height value and a preset terminal height error range.
  • the pitch angle between the terminal and the light source can be, but is not limited to, calculated by calculating the degree of the level.
  • the graphic code generated by the light generated by the terminal according to the light source carries the position information of the light source, and the position information of the light source can be obtained by analyzing the graphic code.
  • the light emitted by the light source is used to form a graphic code, and the position information of the light source is carried in the graphic code. Since the graphic code has the characteristic of strong anti-distortion capability, the terminal can more easily collect the graphic code sent by the light source, thereby improving The success rate of terminal positioning.
  • the light source takes the LEDs array signal source as an example
  • the graphic code takes the QR code as an example
  • the terminal uses the mobile phone as an example.
  • the present optional example proposes a visible light indoor space based on two-dimensional code that can be applied in a mobile phone terminal. Positioning method.
  • the transmitting end is an LEDs array signal source, and each point light source transmits mutually independent light intensity signals.
  • Each point light source position uses a "light intensity” to indicate a binary "1", and a "light intensity” indicates a binary "0".
  • the "flat image” signal sent once is a "frame” whose "strong” and “weak” arrangement of light intensity constitutes a QR code pattern.
  • three "return” shaped positioning pattern areas are planned at the three apex angles of the LEDs array signal source, and the illuminance intensity ratio is 1:1:3:1:1. This proportional characteristic is not changed by the rotation and tilt of the entire image. According to the special design of the fixed pattern of QR code, three positioning blocks can be detected by rapid positioning.
  • the frame information of each LEDs array signal source includes the position information value (denoted as LED-ID) of the LEDs array signal source.
  • 3 is a schematic diagram of a structure of a graphic code according to the present alternative example. As shown in FIG. 3, the black and white dots respectively indicate a light-intensity and strong LED point light source, and the black and white gray values are set to 0 and 255, respectively. Three "back" shaped positioning modules are planned at the top corners of the figure. The ratio of light intensity is 1:1:3:1:1. The proportional characteristics are not changed due to the rotation and tilt of the entire image. 3 positioning blocks can be detected quickly.
  • the positioning modules at the three apex angles of the light source are not limited to the “back” shaped positioning module, and the light intensity thereof is
  • the ratio of strength to weakness is not limited to 1:1:3:1:1. It is only necessary to satisfy the ratio of the graphic code (for example, QR code) when scanning.
  • the light source in this embodiment can adjust the black and white contrast of the dot matrix light source according to the actual scene illumination requirements to meet the illumination requirements.
  • the horizontal distance d between the terminal and the light source is obtained, where d is a positive number, the azimuth angle ⁇ between the terminal and the light source, and the coordinate of the position where the light source is located is (X, Y), and X is The position where the light source is located is the abscissa in the preset coordinate system, and Y is the ordinate of the position where the light source is located in the preset coordinate system. It can be, but is not limited to, calculating the coordinates (x, y) of the position where the terminal is located by the following formula.
  • x is the abscissa of the position where the terminal is located in the preset coordinate system
  • the preset coordinate system may be, but not limited to, a world coordinate system.
  • the azimuth angle ⁇ ranges from 0 to 360 degrees, the values of sin ⁇ and cos ⁇ are positive and negative.
  • the symbols in the formula may be plus or minus. In the embodiment, the plus sign is taken as an example, and the application does not limit this.
  • FIG. 4 is a schematic diagram of the calculation process of the terminal positioning according to the present example.
  • the light source and the terminal are projected onto the same plane in the preset coordinate system.
  • the coordinates of the light source are set to (X, Y), and X is the position where the light source is located in the preset coordinate system.
  • the abscissa, Y is the ordinate of the position where the light source is located in the preset coordinate system, the coordinates of the terminal are set to (x, y), x is the abscissa of the position where the terminal is located in the preset coordinate system, and y is the terminal
  • the position is in the ordinate of the preset coordinate system
  • d is the horizontal distance between the terminal and the light source
  • the direction sensor of the terminal reads the azimuth angle ⁇ of the position where the terminal is located. Then, the terminal and the light source can be calculated in the preset coordinate system.
  • the distance on the x-axis is dsin ⁇ , and further, according to the formula
  • , the abscissa x X+d sin ⁇ of the terminal is obtained, and further, the distance between the terminal and the light source on the y-axis of the preset coordinate system can be calculated as Dcos ⁇ , further according to the formula
  • , obtain the ordinate y Y+d cos ⁇ of the terminal, thereby locating the position where the terminal is located.
  • the azimuth angle ⁇ ranges from 0 degrees to 360 degrees, the values of sin ⁇ and cos ⁇ are positive and negative.
  • the symbols in the formula may be plus or minus, in this implementation. In the example, taking the plus sign as an example, this application There is no limit to this.
  • the horizontal distance between the terminal and the light source may be acquired, where the horizontal distance is a distance between the projection point when the terminal and the light source are projected on the same horizontal plane, and the light source is detected relative to the terminal.
  • the azimuth and then locate the location of the terminal based on the horizontal distance and azimuth.
  • the position is the abscissa in the preset coordinate system
  • Y is the ordinate of the position where the light source is located in the preset coordinate system
  • d is the horizontal distance
  • d is a positive number
  • is the azimuth.
  • the symbols in the formula may be plus or minus, in this implementation. In the example, the plus sign is taken as an example, and the application does not limit this.
  • the number of floors of the current location can be obtained by positioning the position of the light source, and then the coordinates of the current position of the terminal can be calculated according to the coordinates of the light source to obtain the specific location of the terminal on the current floor, thereby realizing the indoor location of the terminal. Positioning.
  • the relative positional relationship between the terminal and the light source is determined by acquiring the horizontal distance between the terminal and the light source and the azimuth angle of the light source with respect to the terminal, and then the position of the terminal is located according to the relative positional relationship between the two, and the terminal can be obtained.
  • the coordinates under the coordinate system of the light source realize precise positioning of the terminal, solve the problem of low positioning accuracy caused by the positioning of the terminal by the visible light communication technology in the related art, and improve the positioning accuracy of the terminal.
  • acquiring the horizontal distance between the terminal and the light source may be, but is not limited to, obtaining a pitch angle between the terminal and the light source, wherein the pitch angle is an angle between the connection between the terminal and the light source and the horizontal plane, and acquiring The height difference between the height of the position where the light source is located and the height of the position where the terminal is located, and then the horizontal distance between the terminal and the light source is calculated according to the height difference and the elevation angle. It can be seen that, through the above steps, the horizontal distance between the terminal and the light source can be obtained by simple calculation according to the obtained elevation angle between the terminal and the light source and the height difference between the light source and the terminal, thereby obtaining the relative position of the terminal and the light source. Positional relationship.
  • the light generated by the light source is generated by the terminal.
  • the graphic code is further parsed to obtain the identification information of the LED array in the light source, wherein the identification information includes at least the position identifier of the LED array, and the position of the light source can be determined according to the position identifier of the LED array.
  • the identification information of the LED array in the foregoing light source may be, but is not limited to, identification information such as an identity (eg, LED-ID) carrying the LED.
  • identification information such as an identity (eg, LED-ID) carrying the LED.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the related art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present application.
  • a terminal locating device is provided, which is used to implement the foregoing embodiments and optional embodiments, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 5 is a structural block diagram of an optional terminal positioning apparatus according to an embodiment of the present invention. As shown in FIG. 5, the apparatus includes:
  • the determining module 52 is configured to determine a location of the light source according to the graphic code collected by the terminal, wherein the graphic code is formed according to the light emitted by the light source, and the graphic code is used to identify the location where the light source is located;
  • the positioning module 54 coupled to the determination module 52, is arranged to position the terminal according to the location of the light source.
  • the foregoing terminal positioning device may be, but is not limited to, applied to a scenario for positioning a terminal in the room.
  • the terminal may include but is not limited to: a mobile phone or a tablet.
  • the above light sources may be, but are not limited to, visible light sources (such as LEDs array signal sources).
  • a visible light source such as LEDs array signal sources.
  • a visible light source for example, a terminal in an indoor scene such as a shopping mall, a mine, a gas station, or a hospital is positioned by using a light source.
  • the determining module 52 determines the position of the light source according to the graphic code, and further positions the module 54 to implement the terminal according to the position of the light source. Positioning is performed to accurately locate the location of the terminal in the room, and the problem of low positioning accuracy caused by the positioning of the terminal by the visible light communication technology in the related art is solved, and the positioning accuracy of the terminal is improved.
  • the terminal determines the position of the light source by collecting the graphic code generated by the light source, and utilizes the strong anti-distortion capability of the graphic code to improve the success rate of the terminal positioning.
  • the positioning module 54 can obtain the relative positional relationship between the terminal and the light source according to the position of the light source, for example, but not limited to, obtaining the horizontal distance between the two, and calculating the horizontal distance between the two.
  • the orientation sensor senses the azimuth of the light source relative to the terminal, and then positions the terminal according to the horizontal distance and the azimuth angle.
  • the azimuth angle means that the horizontal angle from the clockwise direction to the straight line is the azimuth angle of the straight line from the north end of the standard direction (ie, the north pointed by the compass).
  • the azimuth range is from 0 to 360 degrees.
  • the above graphic code may include, but is not limited to, a two-dimensional code.
  • the way to collect the graphic code can be, but is not limited to, scanning the two-dimensional code.
  • the manner in which the positioning module 54 acquires the horizontal distance may be, but is not limited to, obtaining the pitch angle and the height difference between the terminal and the light source, and then according to the pitch angle, the height difference, the connection line and the horizontal distance of the terminal and the light source.
  • the triangular function relationship of the triangles formed on the vertical plane calculates the horizontal distance.
  • the height of the light source may be predetermined or carried in the graphic code generated by the light emitted by the light source, and then, in order to obtain the height difference between the terminal and the light source, may be, but is not limited to,
  • the height of the terminal may be preset to a predetermined value, or may be preset to a predetermined range, or may be determined according to a preset terminal height value and a preset terminal height error range.
  • the pitch angle between the terminal and the light source can be, but is not limited to, calculated by calculating the degree of the level.
  • the graphic code generated by the determining module 52 according to the light emitted by the light source carries the position information of the light source, and the position information of the light source can be obtained by analyzing the graphic code.
  • the light emitted by the light source is used to form a graphic code, and the position information of the light source is carried in the graphic code. Since the graphic code has the characteristics of strong anti-distortion capability, the terminal can more easily collect the graphic code sent by the light source, thereby improving The success rate of terminal positioning.
  • the positioning module at the three apex angles of the light source (for example, the LEDs array signal source) in this embodiment is not limited to the “back” shaped positioning module, and the light intensity ratio is not limited to 1:1:3. : 1:1, just need to meet the graphic code (for example: QR code) when scanning the scale is not deformed.
  • the light source in this embodiment can adjust the black and white contrast of the dot matrix light source according to the actual scene illumination requirements to meet the illumination requirements.
  • the positioning module 54 acquires the horizontal distance d between the terminal and the light source, where d is a positive number, the azimuth angle ⁇ between the terminal and the light source, and the coordinate of the position where the light source is located is (X, Y)
  • X is the abscissa of the position where the light source is located in the preset coordinate system
  • Y is the ordinate of the position where the light source is located in the preset coordinate system
  • x is the abscissa of the position where the terminal is located in the preset coordinate system
  • the preset coordinate system may be, but not limited to, a world coordinate system. It should be noted that since the azimuth angle ⁇ ranges from 0 degrees to 360 degrees, the values of sin ⁇ and cos ⁇ are positive and negative.
  • the symbols in the formula may be plus or minus, in this implementation. In the example, the plus sign is taken as an example, and the application does not limit this.
  • FIG. 6 is a structural block diagram of another optional terminal positioning apparatus according to an embodiment of the present invention.
  • the positioning module 54 includes:
  • an obtaining unit 62 coupled to the positioning unit 66, configured to acquire a horizontal distance between the terminal and the light source, wherein the horizontal distance is a distance between the projection point when the terminal and the light source are projected on the same horizontal plane;
  • a detecting unit 64 coupled to the positioning unit 66, configured to detect an azimuth of the light source relative to the terminal;
  • the positioning unit 66 is arranged to position the terminal according to the horizontal distance and the azimuth.
  • the horizontal distance between the terminal and the light source is acquired by the obtaining unit 62, and the relative positional relationship between the terminal and the light source is determined by the detecting unit 64 detecting the azimuth angle of the light source with respect to the terminal, and the positioning unit 66 is based on the relative positions of the two.
  • the location of the location-targeting terminal can obtain the coordinates of the terminal in the coordinate system of the light source, thereby accurately positioning the terminal, and solving the problem of low positioning accuracy caused by the visible light communication technology positioning terminal in the related art, and improving The positioning accuracy of the terminal.
  • FIG. 7 is a structural block diagram of another optional terminal locating device according to an embodiment of the present invention. As shown in FIG. 7, the obtaining unit 62 includes:
  • a first acquisition sub-unit 72 coupled to the calculation sub-unit 76, configured to acquire a pitch angle between the terminal and the light source, wherein the elevation angle is an angle between a line connecting the terminal and the light source and a horizontal plane;
  • a second acquisition sub-unit 74 coupled to the calculation sub-unit 76, configured to obtain a height difference between the height of the location where the light source is located and the height of the location where the terminal is located;
  • the calculation subunit 76 is arranged to calculate the horizontal distance from the height difference and the pitch angle.
  • the elevation angle between the terminal and the light source acquired by the first acquisition subunit 72 and the height difference between the light source and the terminal acquired by the second acquisition subunit 74 can be calculated by the simple calculation of the subunit 76.
  • the calculation obtains the horizontal distance between the terminal and the light source, thereby initially obtaining the relative positional relationship between the terminal and the light source.
  • FIG. 8 is a structural block diagram of another optional terminal locating device according to an embodiment of the present invention. As shown in FIG. 8, the determining module 52 includes:
  • the collecting unit 82 is configured to collect, by using the terminal, a graphic code generated according to the light emitted by the light source;
  • the parsing unit 84 is coupled to the collecting unit 82, and configured to obtain the identification information of the LED array in the light source by analyzing the graphic code, wherein the identification information includes at least the position identifier of the LED array;
  • the first determining unit 86 coupled to the parsing unit 84, is arranged to determine the location of the light source based on the position identification of the LED array.
  • the light emitted by the light source is used to form a graphic code, and the position information of the light source is carried.
  • the collecting unit 82 can more easily collect the graphic code sent by the light source, and the parsing unit 84 obtains the identification information of the LED array in the light source through analysis, and the identification information carries The position identification of the LED array, the first determining unit 86 determines the location of the light source according to the position identifier of the LED array, thereby improving the success rate of the terminal positioning.
  • the preset coordinate system may be, but not limited to, a world coordinate system. It should be noted that since the azimuth angle ⁇ ranges from 0 degrees to 360 degrees, the values of sin ⁇ and cos ⁇ are positive and negative.
  • the symbols in the formula may be plus or minus, in this implementation. In the example, the plus sign is taken as an example, and the application does not limit this.
  • modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are respectively located in multiple processes. In the device.
  • module may implement a combination of software and/or hardware of a predetermined function.
  • apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 9 is a structural block diagram of an optional electronic device according to an embodiment of the present invention. As shown in FIG. 9, the electronic device includes:
  • the decoding module 92 is configured to determine a location where the light source is located according to the graphic code collected by the terminal, wherein the graphic code is formed according to the light emitted by the light source, and the graphic code is used to identify the location where the light source is located;
  • the location processing module 94 coupled to the decoding module 92, is configured to locate the location of the terminal based on the location of the light source.
  • the foregoing electronic device for terminal location may be, but is not limited to, applied to a scenario for positioning a terminal in the room.
  • the above electronic device may include, but is not limited to, a mobile phone, a tablet computer, a notebook computer, and the like.
  • the above light sources may be, but are not limited to, visible light sources (such as LEDs array signal sources).
  • a visible light source such as LEDs array signal sources.
  • a visible light source for example, a terminal in an indoor scene such as a shopping mall, a mine, a gas station, or a hospital is positioned by using a light source.
  • the decoding module 92 determines the location of the light source according to the graphic code, and further positions the processing module 94 to implement the terminal according to the position of the light source. Positioning at the location makes it possible to accurately locate the location of the terminal in the room, and solves the problem of low positioning accuracy caused by the positioning of the terminal by the visible light communication technology in the related art, and improves the positioning accuracy of the terminal.
  • the terminal determines the position of the light source by collecting the graphic code generated by the light source, and utilizes the strong anti-distortion capability of the graphic code to improve the success rate of the terminal positioning.
  • the positioning processing module 94 can obtain the relative positional relationship between the terminal and the light source according to the position of the light source, for example, but the horizontal distance between the two is obtained by calculation. And reading, by the direction sensor, the azimuth of the light source relative to the terminal, and then positioning the terminal according to the horizontal distance and the azimuth angle.
  • the relative positional relationship between the terminal and the light source is obtained, and the position of the terminal can be calculated according to the position information of the light source, the precise positioning of the terminal is realized, and the visible light communication technology is used to locate the terminal through the related art.
  • the resulting problem of low positioning accuracy improves the positioning accuracy of the terminal.
  • the azimuth angle means that the horizontal angle from the clockwise direction to the straight line is the azimuth angle of the straight line from the north end of the standard direction (ie, the north pointed by the compass).
  • the azimuth range is from 0 to 360 degrees.
  • the above graphic code may include, but is not limited to, a two-dimensional code.
  • the way to collect the graphic code can be, but is not limited to, scanning the two-dimensional code.
  • the manner in which the positioning processing module 94 obtains the horizontal distance may be, but is not limited to, acquiring the pitch angle and the height difference between the terminal and the light source, and then according to the pitch angle, the height difference, the connection line and the horizontal distance of the terminal and the light source.
  • the triangular function relationship of the triangles formed on the vertical plane calculates the horizontal distance.
  • the height of the light source may be predetermined or may be carried in the graphic code generated by the light emitted by the light source. Then, in order to obtain the height difference between the terminal and the light source, the height of the preset terminal may be limited to, but not limited to, the height of the preset terminal.
  • the height of the terminal may be preset to a predetermined value, or may be preset to a predetermined range, or may be determined according to a preset terminal height value and a preset terminal height error range.
  • the pitch angle between the terminal and the light source can be, but is not limited to, calculated by calculating the degree of the level.
  • the decoding code generated by the decoding module 92 according to the light emitted by the light source carried by the terminal carries the position information of the light source, and the position information of the light source can be obtained by analyzing the graphic code.
  • the light generated by the light source is used to form a graphic code, and the position information of the light source is carried in the graphic code. Since the graphic code has the characteristic of strong anti-distortion capability, the terminal can more easily collect the graphic code sent by the light source, thereby Improve the success rate of terminal positioning.
  • the positioning module at the three apex angles of the light source (for example, the LEDs array signal source) in this embodiment is not limited to the “back” shaped positioning module, and the light intensity ratio is not limited to 1:1:3. : 1:1, just need to meet the graphic code (for example: QR code) when scanning the scale is not deformed.
  • the light source in this embodiment can adjust the black and white contrast of the dot matrix light source according to the actual scene illumination requirements to meet the illumination requirements.
  • the preset coordinate system may be, but not limited to, a world coordinate system. It should be noted that since the azimuth angle ⁇ ranges from 0 degrees to 360 degrees, the values of sin ⁇ and cos ⁇ are positive and negative.
  • the symbols in the formula may be plus or minus, in this implementation. In the example, the plus sign is taken as an example, and the application does not limit this.
  • FIG. 10 is a structural block diagram of another optional electronic device according to an embodiment of the present invention.
  • the positioning processing module 94 includes:
  • the ranging unit 102 is coupled to the positioning processing unit 106 and configured to acquire the terminal and the light source.
  • a direction sensor 104 coupled to the positioning processing unit 106, configured to detect an azimuth of the light source relative to the terminal;
  • the positioning processing unit 106 is arranged to position the terminal according to the horizontal distance and the azimuth.
  • the horizontal distance between the terminal and the light source is acquired by the ranging unit 102, and the relative positional relationship between the terminal and the light source is determined by the direction sensor 104 detecting the azimuth of the light source with respect to the terminal, and the positioning processing unit 106 according to the two
  • the relative positional relationship is located at the location of the terminal, and the coordinates of the terminal in the coordinate system of the light source can be obtained, thereby accurately positioning the terminal, and solving the positioning accuracy caused by the visible light communication technology positioning terminal in the related art is low.
  • the problem is to improve the positioning accuracy of the terminal.
  • FIG. 11 is a structural block diagram of another optional electronic device according to an embodiment of the present invention.
  • the ranging unit 102 includes:
  • a level 112 coupled to the ranging subunit 116, configured to obtain a pitch angle between the terminal and the light source, wherein the pitch angle is an angle between a line connecting the terminal and the light source and a horizontal plane;
  • a third acquisition sub-unit 114 coupled to the ranging sub-unit 116, configured to obtain a height difference between a height at which the light source is located and a height at which the terminal is located;
  • the ranging subunit 116 is arranged to calculate the horizontal distance based on the height difference and the pitch angle.
  • the elevation angle between the terminal and the light source acquired by the level 112 and the height difference between the light source and the terminal acquired by the third acquisition subunit 114 can be simply calculated by the ranging subunit 116.
  • the horizontal distance between the terminal and the light source is obtained, thereby obtaining the relative positional relationship between the terminal and the light source.
  • FIG. 12 is a structural block diagram of another optional electronic device according to an embodiment of the present invention.
  • the decoding module 92 includes:
  • the collector 122 is configured to collect a graphic code generated by the light emitted by the light source through the terminal;
  • a decoder 124 coupled to the collector 122, configured to parse the graphic code to obtain identification information of the LED array in the light source, wherein the identification information includes at least a position identifier of the LED array;
  • a second determining unit 126 coupled to the decoder 124, is arranged to determine the location of the light source based on the location identification of the LED array.
  • the light generated by the light source is used to form a graphic code, and the position information of the light source is carried in the graphic code. Since the graphic code has the strong anti-distortion capability, the collector 122 can more easily collect the graphic code sent by the light source.
  • the decoder 124 obtains the identification information of the LED array in the light source by analyzing, and identifies the position identifier of the LED array in the information.
  • the second determining unit 126 determines the location of the light source according to the position identifier of the LED array, thereby improving the success rate of the terminal positioning. .
  • the electronic device in this embodiment will be described and described below with an optional example.
  • the electronic device in this embodiment is exemplified by a mobile terminal such as a mobile phone.
  • This optional example proposes a visible light indoor positioning system.
  • the structure of the system is divided into three parts: LEDs array signal source, mobile terminal and mobile terminal.
  • the mobile terminal such as a mobile phone includes a QR code-related decoding module 92 and a positioning processing module 94.
  • the control terminal loads the QR code image information related to the position information of the different LEDs array light sources through the driving circuit.
  • 13 is a schematic structural diagram of a visible light indoor positioning system according to the present alternative example, as shown in FIG. 13, wherein 132 represents a control terminal, 1322 represents a driving circuit of the control terminal, 1324 represents a LED array signal source, and 134 represents a mobile terminal such as a mobile phone.
  • the mobile terminal such as a mobile phone includes a decoding module 92 and a positioning processing module 94.
  • the control terminal 132 loads the LEDs array signal source 1324 with LED-ID information for identifying its position via the drive circuit 1322 and displays it as a QR code image.
  • the mobile phone 134 collects the QR code image, and the mobile terminal obtains the LED-ID information through the decoding module 92.
  • the positioning processing module 94 determines the position of the LEDs array signal source where it is located, and implements the rough positioning process of the terminal.
  • Embodiments of the present invention also provide a software for performing the technical solutions described in the foregoing embodiments and optional embodiments.
  • Embodiments of the present invention also provide a computer readable storage medium.
  • the computer readable storage medium described above may be arranged to store program code for performing the following steps:
  • Step S1 determining, according to the graphic code collected by the terminal, a location where the light source is located, where the graphic code is formed according to the light emitted by the light source, and the graphic code is used to identify the location where the light source is located;
  • step S2 the location of the terminal is located according to the location of the light source.
  • the computer readable storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (Random Access Memory).
  • ROM Read-Only Memory
  • Random Access Memory Random Access Memory
  • the embodiments of the present invention can achieve the following beneficial effects: First, the embodiments of the present invention make full use of related devices and resources such as a light source (such as an LEDs array signal source), thereby reducing the cost of the indoor positioning system; secondly, the present invention The embodiment uses a graphic code (for example, a QR code) to identify a fast speed, a simple device, and a strong correction capability, and improves the positioning speed of the visible light indoor positioning; in addition, the embodiment of the present invention performs a simple trigonometric function relationship based on the preset coordinate system.
  • a graphic code for example, a QR code
  • the calculation of the horizontal distance between the terminal and the light source by giving the error range to the height of the handheld mobile phone and the holding pitch angle, using the direction sensor of the mobile phone to obtain the azimuth information, thereby determining the precise position information of the mobile terminal holder such as the mobile phone,
  • the computational complexity of the visible light indoor positioning system is reduced, and the positioning accuracy of the indoor positioning system is improved.
  • modules or steps of the present application can be implemented by a general-purpose computing device, which can be centralized on a single computing device or distributed over a network of multiple computing devices. They may be implemented by program code executable by the computing device such that they may be stored in the storage device for execution by the computing device and, in some cases, may be performed in a different order than that illustrated herein. Or the steps described, either separately as individual integrated circuit modules, or as a plurality of modules or steps in a single integrated circuit module. Thus, the application is not limited to any particular combination of hardware and software.
  • the embodiment of the present invention provides a method, a device, and an electronic device for positioning a terminal, which can accurately locate a location where the terminal is located in the room, and solve the problem that the positioning accuracy caused by the visible light communication technology in the related art is low. , improve the positioning accuracy of the terminal.

Abstract

一种终端定位方法,包括:根据终端采集的图形码确定光源所在的位置,其中,图形码依据光源发出的光形成,图形码用于标识光源所在的位置;根据光源所在的位置定位终端所在的位置。通过上述方案,解决了相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。

Description

终端定位方法、装置和电子设备 技术领域
本申请涉及但不限于通信领域,尤其涉及一种终端定位方法、装置和电子设备。
背景技术
近年来,随着智能手机的普及、移动数据业务的增加,人们对定位和导航的需求日益增大。对于户外环境,卫星定位系统作为一种成熟的无线定位技术已经得到了广泛的应用,但是在人们活动较为频繁的家庭、办公室、大型商场等室内环境以及隧道、地下停车场等特殊环境,由于无线电信号的遮蔽效应导致全球定位系统(Global Positioning System,简称为GPS)等传统卫星定位系统难以适用。
目前大多采用的无线定位技术,如超宽带、无线局域网、红外和蓝牙等,在一定程度上能够满足人们在室内的定位需求,但由于这些定位系统存在不稳定性、功耗大以及定位精度低等缺点而未能广泛普及,并且其在矿井、加油站和医院等射频受限场所的使用不同程度上也受到了限制。因此,寻求一种普适、低功率、高精度的室内定位技术迫在眉睫。而基于白光发光二极管(Light Emitting Diode,简称为LED)的可见光通信具有无电磁干扰、频谱宽、绿色环保、成本低廉等显著优势,因此在室内定位领域具有广泛的应用前景。
目前已有的可见光通信定位系统采用的定位方法可分为以下三类:
基于LED标签(LED-ID)的可见光通信定位方法:该方法通过将与位置相关的ID数据加载到不同的LED光源上(即LED-ID标签),通过空间光链路传送到移动终端,移动终端通过对ID数据的处理实现被动定位。但这种方法的定位精度较低,其理论定位精度仅为相邻LED信号源间距的1/2。
基于接收光信号强度的可见光通信定位方法:基于接收信号强度检测(Received Signal Strength Indicator,简称为RSSI)的可见光通信定位方法, 其原理与传统无线电定位方法中的RSSI方法基本相同。由于可见光通信过程中,信号通常采用强度调制,接收端可利用光电检测器件(Photo Detector,简称为PD)实现对信号能量的检测。此类方法通过发射信号的传播损耗以及路径损耗模型计算得到参考点和目标点之间的距离,再根据三边定位法推算得到目标位置。受室内可见光信道环境的复杂性限制,这种单纯依靠传播模型实现定位的参数化方法往往存在较大误差,因此不常用。
基于图像传感器成像的可见光通信定位方法:该方法利用LED照明阵列作为发送端,从阵列中的至少3个LED发射的三维坐标通过光学透镜被接收,由图像传感器解调信息,利用图像传感器中接收到的LED图像的距离几何关系计算出目标的位置。该方法的具体实现依赖于图像传感器对接收到的LED图像的距离计算,所以估计的精度和每个组件测量精度有关。由于其定位速度比较快,适用于静止或缓慢移动的目标。当移动终端发生抖动或倾斜时,图像传感器接收到的LED图像也会发生倾斜、光照不均匀、几何失真等,从而影响定位精度。
针对通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,目前尚未提出有效的解决方案。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供了一种终端定位方法、装置和电子设备,以至少解决通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题。
根据本发明实施例的一个方面,提供了一种终端定位方法,包括:根据终端采集的图形码确定光源所在的位置,其中,所述图形码依据所述光源发出的光形成,所述图形码用于标识所述光源所在的位置;根据所述光源所在的位置定位所述终端所在的位置。
可选地,根据所述光源所在的位置定位所述终端所在的位置包括:获取所述终端与所述光源之间的水平距离,其中,所述水平距离为所述终端与所述光源投影在同一水平面时投影点之间的距离;检测所述光源相对于所述终 端的方位角;根据所述水平距离与所述方位角定位所述终端所在的位置。
可选地,获取所述终端与所述光源之间的所述水平距离包括:获取所述终端与所述光源之间的俯仰角,其中,所述俯仰角为所述终端与所述光源之间的连线与水平面之间的夹角;获取所述光源所在的位置的高度与所述终端所在位置的高度之间的高度差;根据所述高度差及所述俯仰角计算所述水平距离。
可选地,根据所述终端采集的所述图形码确定所述光源所在的位置包括:通过所述终端采集所述图形码;通过解析所述图形码获取所述光源中LED阵列的标识信息,其中,所述标识信息至少包括所述LED阵列的位置标识;根据所述LED阵列的所述位置标识确定所述光源所在的位置。
可选地,根据所述水平距离与所述方位角定位所述终端所在的位置包括:x=X+d sinθ;y=Y+d cosθ;其中,x为所述终端所在的位置在预设坐标系中的横坐标,y为所述终端所在的位置在所述预设坐标系中的纵坐标,X为所述光源所在的位置在所述预设坐标系中的横坐标,Y为所述光源所在的位置在所述预设坐标系中的纵坐标,d表示所述水平距离,d为正数,θ表示所述方位角。
可选地,所述图形码包括:二维码。
根据本发明实施例的另一个方面,还提供了一种终端定位装置,包括:确定模块,设置为根据终端采集的图形码确定光源所在的位置,其中,所述图形码依据所述光源发出的光形成,所述图形码用于标识所述光源所在的位置;定位模块,设置为根据所述光源所在的位置定位所述终端所在的位置。
可选地,所述定位模块包括:获取单元,设置为获取所述终端与所述光源之间的水平距离,其中,所述水平距离为所述终端与所述光源投影在同一水平面时投影点之间的距离;检测单元,设置为检测所述光源相对于所述终端的方位角;定位单元,设置为根据所述水平距离与所述方位角定位所述终端所在的位置。
可选地,所述获取单元包括:第一获取子单元,设置为获取所述终端与所述光源之间的俯仰角,其中,所述俯仰角为所述终端与所述光源之间的连线与水平面之间的夹角;第二获取子单元,设置为获取所述光源所在的位置 的高度与所述终端所在位置的高度之间的高度差;计算子单元,设置为根据所述高度差及所述俯仰角计算所述水平距离。
可选地,所述确定模块包括:采集单元,设置为通过所述终端采集所述图形码;解析单元,设置为通过解析所述图形码获取所述光源中LED阵列的标识信息,其中,所述标识信息至少包括所述LED阵列的位置标识;第一确定单元,设置为根据所述LED阵列的所述位置标识确定所述光源所在的位置。
根据本发明实施例的另一个方面,还提供了一种电子设备,包括:解码模块,设置为根据终端采集的图形码确定光源所在的位置,其中,所述图形码依据光源发出的光形成,所述图形码用于标识所述光源所在的位置;定位处理模块,设置为根据所述光源所在的位置定位所述终端所在的位置。
可选地,所述定位处理模块包括:测距单元,设置为获取所述终端与所述光源之间的水平距离,其中,所述水平距离为所述终端与所述光源投影在同一水平面时投影点之间的距离;方向传感器,设置为检测所述光源相对于所述终端的方位角;定位处理单元,设置为根据所述水平距离与所述方位角定位所述终端所在的位置。
可选地,所述测距单元包括:水平仪,设置为获取所述终端与所述光源之间的俯仰角,其中,所述俯仰角为所述终端与所述光源之间的连线与水平面之间的夹角;第三获取子单元,设置为获取所述光源所在的位置的高度与所述终端所在的位置的高度之间的高度差;测距子单元,设置为根据所述高度差及所述俯仰角计算所述水平距离。
可选地,所述解码模块包括:采集器,设置为通过所述终端采集依据所述光源发出的光生成的所述图形码;解码器,设置为解析所述图形码获取所述光源中LED阵列的标识信息,其中,所述标识信息至少包括所述LED阵列的位置标识;第二确定单元,设置为根据所述LED阵列的所述位置标识确定所述光源所在的位置。
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述的终端定位方法。
通过本发明实施例,采用根据终端采集的图形码确定光源所在的位置,其中,图形码依据光源发出的光形成,图形码用于标识光源所在的位置;根 据光源所在的位置定位终端所在的位置的方式。也就是说,终端在采集到由光源发出的不同的光所生成的图形码后,根据该图形码确定光源所在的位置,进一步再根据光源所在的位置实现对终端所在的位置进行定位,实现了对室内的终端所在的位置进行精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。此外,终端通过采集光源生成的图形码来确定光源的位置,利用了图形码抗失真能力强的特点,提高了终端定位的成功率。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是根据本发明实施例的一种可选的终端定位方法的流程图;
图2是根据本申请示例的手机终端定位处理模块的计算过程示意图;
图3是根据本申请可选示例的图形码结构示意图;
图4是根据本申请示例的终端定位的计算过程示意图;
图5是根据本发明实施例的一种可选的终端定位装置的结构框图;
图6是根据本发明实施例的另一种可选的终端定位装置的结构框图;
图7是根据本发明实施例的另一种可选的终端定位装置的结构框图;
图8是根据本发明实施例的另一种可选的终端定位装置的结构框图;
图9是根据本发明实施例的一种可选的电子设备的结构框图;
图10是根据本发明实施例的另一种可选的电子设备的结构框图;
图11是根据本发明实施例的另一种可选的电子设备的结构框图;
图12是根据本发明实施例的另一种可选的电子设备的结构框图;
图13是根据本申请可选示例的可见光室内定位系统的结构示意图。
本发明的实施方式
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
实施例一
在本实施例中提供了一种终端定位方法,图1是根据本发明实施例的一种可选的终端定位方法的流程图,如图1所示,该流程包括如下步骤:
步骤S102,根据终端采集的图形码确定光源所在的位置,其中,图形码依据光源发出的光形成,图形码用于标识光源所在的位置;
步骤S104,根据光源所在的位置定位终端所在的位置。
可选地,在本实施例中,上述终端定位方法可以但不限于应用于对室内的终端进行定位的场景中。其中,上述终端可以包括但不限于:手机、平板电脑、笔记本电脑等。上述光源可以但不限于可见光光源(如LEDs阵列信号源)。例如,利用可见光光源对室内终端进行定位的场景中,如利用光源对商场、矿井、加油站、医院等室内场景中的终端进行定位。
通过上述步骤,终端在采集到由光源发出的不同的光所生成的图形码后,根据该图形码确定光源所在的位置,进一步再根据光源所在的位置实现对终端所在的位置进行定位,实现了对室内的终端所在的位置进行精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。此外,终端通过采集光源生成的图形码来确定光源的位置,利用了图形码抗失真能力强的特点,提高了终端定位的成功率。
在本实施例中,在上述步骤S104中,为了实现对终端的精确定位,可以但不限于首先根据光源的位置获取终端与该光源的相对位置关系,例如:通过计算获取二者之间的水平距离,以及通过方向传感器读取该光源相对于终端的方位角,再根据水平距离和方位角对终端进行定位。通过上述步骤,获取了终端与光源间的相对位置关系,就可以根据光源的位置信息计算出终 端的位置,实现了对终端的精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。
需要说明的是,本实施例中,方位角是指从标准方向的北端(即指南针所指的北)起,顺时针方向到直线的水平角称为该直线的方位角。方位角的取值范围为0度到360度。
在本实施例中,上述图形码可以但不限于包括:二维码。采集图形码的方式可以但不限于是对二维码进行扫描。
需要说明的是,本实施例中图形码所包括的二维码是一种通过设置光源中不同LED的光强,以使光源按照某种特定的几何图形及一定规律在平面(二维方向)上显示出的黑白相间的阵列图形所表示的数据符号信息;在代码编制上使用若干个与二进制相对应的几何图形来表示文字、数值信息,并通过图像输入设备或光电扫描设备自动识别,实现信息自动处理。其中应用最广泛的就是快速反应(Quick Response,简称为QR)码,QR码有三个定位图形使得识别设备很快就能识别出来,因此具备抗图形几何失真的能力,在旋转、倾斜等角度下扫描畸变图形,也能通过仿射变换准确地恢复图形内每个点处像素值,从而准确地提取信息。
下面以一个示例对上述过程进行说明和描述。在本示例中,光源以LEDs阵列信号源为例,图形码以QR码为例,终端以手机为例,本示例可以包括如下步骤:
步骤1,在LEDs阵列信号源上通过驱动电路加载QR码图像信息,该图像信息包括用于标识LEDs阵列信号源位置的LED-ID值,通过无线光链路传输到手机,手机通过解码模块解码出LED-ID值,确定该LEDs阵列信号源的覆盖区域,实现对手机的粗定位;
步骤2,采用基于世界坐标系的三角函数关系计算手机与LEDs阵列信号源的绝对水平距离,再利用手机的方向传感器获得其方位角θ的信息,从而确定手机的位置,实现对手机的精确定位过程,该过程在手机的定位处理模块进行。
需要说明的是,在本实施例中,世界坐标系是指系统的绝对坐标系,在没有建立用户坐标系之前画面上所有点的坐标都是以该坐标系的原点来确定 位置的。
在本实施例中,获取水平距离的方式可以但不限于是获取终端与光源之间的俯仰角和高度差,再根据俯仰角、高度差、终端和光源的连线和水平距离在垂直平面上构成的三角形的三角函数关系计算出水平距离。通过上述步骤,可以通过简单的计算获取终端和光源之间的水平距离,从而初步获取终端和光源的相对位置关系。
下面以一个示例对水平距离的获取过程进行说明和描述,在本可选示例中,光源以LEDs阵列信号源为例,终端以手机为例,终端所在的位置的高度用h表示。
图2是根据本示例的手机终端定位处理模块的计算过程示意图,如图2所示,其中202表示参考平面,204表示手机,206表示LEDs阵列信号源。H为LEDs阵列信号源距离参考平面202(例如:光源所在楼层的地面)的高度,h为手持手机距离参考平面202(例如:光源所在楼层的地面)的高度,d是手机与LEDs阵列信号源的水平距离。α为手机到LEDs阵列信号源的俯仰角,该角度可通过调用手机的水平仪间接获得:记手机水平仪的角度读数为β,若手机所在平面与LEDs阵列信号源到手机所在平面处于垂直状态,则有α=90°-β。根据图2所示的距离关系,可得到LEDs阵列信号源与手机之间在预设坐标系下的三角函数关系为:
Figure PCTCN2016083177-appb-000001
其中,H已知,h可通过成人手持手机高度的分布来获得,则可通过上述三角函数关系进行LEDs阵列信号源与手机之间的水平距离的计算:
Figure PCTCN2016083177-appb-000002
通过预设手机距离参考平面的高度h与俯仰角α的误差范围,利用手机的方向传感器获得手机持有者所在的方位角θ信息,进而获得手机持有者在该LEDs阵列信号源下的位置信息,实现精确定位过程。
在本实施例中,光源所在的位置的高度可以是预定的,也可以携带在光源发出的光生成的图形码中,那么,为了获取终端和光源之间的高度差,可以但不限于预设终端所在的位置的高度,终端所在的位置的高度可以预设为 一个预定值,也可以预设为一个预定范围,或者是根据预设终端高度值和预设终端高度的误差范围确定。终端与光源之间的俯仰角可以但不限于通过对水平仪的度数进行计算获取。
在本实施例中,通过终端采集的依据光源发出的光生成的图形码携带有光源的位置信息,可以通过对图形码的解析获取光源的位置信息。通过上述步骤,利用光源发出的光线形成图形码,将光源的位置信息携带在图形码中,由于图形码具有抗失真能力强的特点,使终端可以更容易采集到光源发出的图形码,从而提高了终端定位的成功率。
下面以一个可选示例对图形码的生成和采集的过程进行说明和描述,在本可选示例中,光源以LEDs阵列信号源为例,图形码以QR码为例,终端以手机为例。
在本可选示例中,为了克服相关的室内定位方法资源浪费、成本高、定位速度慢、精度低等不足,本可选示例提出了能够在手机终端应用的一种基于二维码的可见光室内定位方法。
本可选示例中的发射端为LEDs阵列信号源,每点光源发送相互独立的光强度信号,每点光源位置用“光强强”表示二进制“1”,“光强弱”表示二进制“0”,一次发送的“平面图像”信号为一“帧”,其光强的“强”和“弱”排列组成QR码图形。在本可选示例中,在LEDs阵列信号源的3个顶角处规划出3块“回”字形定位图形区域,其光照度强弱比值为1:1:3:1:1。这种比例特性不因整个图像的旋转、倾斜而改变,根据QR码这种固定模式的特殊设计,3个定位块能够被快速定位检测到。每一个LEDs阵列信号源的帧信息包括该LEDs阵列信号源的位置信息值(记为LED-ID)。图3是根据本可选示例的图形码结构示意图,如图3所示,图中黑、白点分别表示发光强度弱、强的LED点光源,其黑白灰度值分别设为0、255。图中3个顶角处规划出3个“回”字形定位模块,其光强度强弱比值为1:1:3:1:1,该比例特性不因整个图像的旋转、倾斜而改变,因此,3个定位块能够快速检测到。
需要说明的是,本发明实施例、示例和可选示例中光源(例如:LEDs阵列信号源)的3个顶角处的定位模块不限于“回”字形定位模块,其光强 度强弱比值也不限于1:1:3:1:1,只需满足图形码(例如:QR码)扫描时的比例不变形即可。
此外,考虑到可见光通信具有能够同时实现照明与通信的功能,因此本实施例中的光源可根据实际场景照明要求调整点阵光源的黑白对比度,以满足照明要求。
在本实施例中,获取了终端与光源之间的水平距离d,其中d为正数,终端与光源之间的方位角θ,以及光源所在的位置的坐标为(X,Y),X为光源所在的位置在预设坐标系中的横坐标,Y为光源所在的位置在预设坐标系中的纵坐标,可以但不限于通过下述公式计算终端所在的位置的坐标(x,y),x为终端所在的位置在预设坐标系中的横坐标,y为终端所在的位置在预设坐标系中的纵坐标:x=X+d sinθ;y=Y+d cosθ,从而实现对终端的定位。需要说明的是,在本实施例中,预设坐标系可以但不限于是世界坐标系。需要说明的是,由于方位角θ的取值范围为0度到360度,因此,sinθ和cosθ的值有正有负,这里公式中的符号可以取加号,也可以取减号,在本实施例中以取加号为例,本申请对此不做限定。
下面以一个示例对终端的定位过程进行说明和描述,图4是根据本示例的终端定位的计算过程示意图,如图4所示,将光源和终端投影到同一个平面上,在预设坐标系(由如图所示的x,y轴构成的坐标系,可以但不限于是世界坐标系)内光源的坐标设为(X,Y),X为光源所在的位置在预设坐标系中的横坐标,Y为光源所在的位置在预设坐标系中的纵坐标,终端的坐标设为(x,y),x为终端所在的位置在预设坐标系中的横坐标,y为终端所在的位置在预设坐标系中的纵坐标,d为终端与光源之间的水平距离,终端的方向传感器读取终端所在位置的方位角θ,那么,可以计算终端与光源在预设坐标系的x轴上的距离为dsinθ,进一步根据公式|x-X|=|dsinθ|,获取终端的横坐标x=X+d sinθ,此外,可以计算终端与光源在预设坐标系的y轴上的距离为dcosθ,进一步可以根据公式|y-Y|=|dcosθ|,获取终端的纵坐标y=Y+d cosθ,从而定位出终端所在的位置。需要说明的是,由于方位角θ的取值范围为0度到360度,因此sinθ和cosθ的值有正有负,这里公式中的符号可以取加号,也可以取减号,在本实施例中以取加号为例,本申请 对此不做限定。
可选地,在上述步骤S104中,可以但不限于获取终端与光源之间的水平距离,其中,水平距离为终端与光源投影在同一水平面时投影点之间的距离,并检测光源相对于终端的方位角,再根据水平距离与方位角定位终端所在的位置。例如:可以但不限于通过以下公式根据水平距离与方位角定位终端所在的位置:x=X+d sinθ;y=Y+d cosθ;其中,(x,y)表示终端所在的位置的坐标,x为终端所在的位置在预设坐标系中的横坐标,y为终端所在的位置在预设坐标系中的纵坐标,(X,Y)表示光源所在的位置的坐标,X为光源所在的位置在预设坐标系中的横坐标,Y为光源所在的位置在预设坐标系中的纵坐标,d表示水平距离,d为正数,θ表示方位角。需要说明的是,由于方位角θ的取值范围为0度到360度,因此sinθ和cosθ的值有正有负,这里公式中的符号可以取加号,也可以取减号,在本实施例中以取加号为例,本申请对此不做限定。
例如:在商场中进行终端定位时,可以通过对光源位置的定位获取当前位置的楼层数,再根据光源的坐标计算终端当前位置的坐标可以获取终端在当前楼层的具体位置,从而实现终端的室内定位。
通过上述步骤,通过获取终端与光源之间的水平距离和光源相对于终端的方位角来确定终端与光源的相对位置关系,再根据二者的相对位置关系定位终端所在的位置,可以获取到终端在光源所在坐标系下的坐标,实现对终端的精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。
可选地,获取终端与光源之间的水平距离可以但不限于获取终端与光源之间的俯仰角,其中,俯仰角为终端与光源之间的连线与水平面之间的夹角,以及获取光源所在的位置的高度与终端所在的位置的高度之间的高度差,再根据高度差及俯仰角计算终端与光源之间的水平距离。可见,通过上述步骤,可以根据获取到的终端与光源之间的俯仰角和光源与终端之间的高度差通过简单的计算获取终端与光源之间的水平距离,从而初步获取终端和光源的相对位置关系。
可选地,在上述步骤S102中,通过终端采集到依据光源发出的光生成 的图形码,再对该图形码进行解析获取光源中LED阵列的标识信息,其中,标识信息至少包括LED阵列的位置标识,根据LED阵列的位置标识可以确定光源所在的位置。通过上述步骤,利用光源发出的光线形成图形码,将光源的位置信息携带在图形码中,由于图形码具有抗失真能力强的特点,使终端可以更容易采集到光源发出的图形码,从而提高了终端定位的成功率。
可选地,上述光源中LED阵列的标识信息还可以但不限于携带LED的身份标识(例如:LED-ID)等标识信息。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
实施例二
在本实施例中提供了一种终端定位装置,该装置用于实现上述实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图5是根据本发明实施例的一种可选的终端定位装置的结构框图,如图5所示,该装置包括:
1)确定模块52,设置为根据终端采集的图形码确定光源所在的位置,其中,图形码依据光源发出的光形成,图形码用于标识光源所在的位置;
2)定位模块54,耦合至确定模块52,设置为根据光源所在的位置定位终端所在的位置。
可选地,在本实施例中,上述终端定位装置可以但不限于应用于对室内的终端进行定位的场景中。其中,上述终端可以包括但不限于:手机、平板 电脑、笔记本电脑等。上述光源可以但不限于可见光光源(如LEDs阵列信号源)。例如,利用可见光光源对室内终端进行定位的场景中,如利用光源对商场、矿井、加油站、医院等室内场景中的终端进行定位。
通过上述装置,终端在采集到由光源发出的不同的光所生成的图形码后,确定模块52根据该图形码确定光源所在的位置,进一步定位模块54再根据光源所在的位置实现对终端所在的位置进行定位,实现了对室内的终端所在的位置进行精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。此外,终端通过采集光源生成的图形码来确定光源的位置,利用了图形码抗失真能力强的特点,提高了终端定位的成功率。
在本实施例中,定位模块54为了实现对终端的精确定位,可以但不限于首先根据光源的位置获取终端与该光源的相对位置关系,例如:通过计算获取二者之间的水平距离,以及通过方向传感器读取该光源相对于终端的方位角,再根据水平距离和方位角对终端进行定位。通过上述装置,获取了终端与光源间的相对位置关系,就可以根据光源的位置信息计算出终端的位置,实现了对终端的精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。
需要说明的是,本实施例中方位角是指从标准方向的北端(即指南针所指的北)起,顺时针方向到直线的水平角称为该直线的方位角。方位角的取值范围为0度到360度。
在本实施例中,上述图形码可以但不限于包括:二维码。采集图形码的方式可以但不限于是对二维码进行扫描。
在本实施例中,定位模块54获取水平距离的方式可以但不限于是获取终端与光源之间的俯仰角和高度差,再根据俯仰角、高度差、终端和光源的连线和水平距离在垂直平面上构成的三角形的三角函数关系计算出水平距离。通过上述装置,可以通过简单的计算获取终端和光源之间的水平距离,从而初步获取终端和光源的相对位置关系。
在本实施例中,光源的高度可以是预定的,也可以携带在光源发出的光生成的图形码中,那么,为了获取终端和光源之间的高度差,可以但不限于 预设终端的高度,终端的高度可以预设为一个预定值,也可以预设为一个预定范围,或者是根据预设终端高度值和预设终端高度的误差范围确定。终端与光源之间的俯仰角可以但不限于通过对水平仪的度数进行计算获取。
在本实施例中,确定模块52通过终端采集的依据光源发出的光生成的图形码携带有光源的位置信息,可以通过对图形码的解析获取光源的位置信息。通过上述装置,利用光源发出的光线形成图形码,将光源的位置信息携带在图形码中,由于图形码具有抗失真能力强的特点,使终端可以更容易采集到光源发出的图形码,从而提高了终端定位的成功率。
需要说明的是,本实施例中光源(例如:LEDs阵列信号源)的3个顶角处的定位模块不限于“回”字形定位模块,其光强度强弱比值也不限于1:1:3:1:1,只需满足图形码(例如:QR码)扫描时的比例不变形即可。
此外,考虑到可见光通信具有能够同时实现照明与通信的功能,因此本实施例中的光源可根据实际场景照明要求调整点阵光源的黑白对比度,以满足照明要求。
在本实施例中,定位模块54获取了终端与光源之间的水平距离d,其中d为正数,终端与光源之间的方位角θ,以及光源所在的位置的坐标为(X,Y),X为光源所在的位置在预设坐标系中的横坐标,Y为光源所在的位置在预设坐标系中的纵坐标,可以但不限于通过下述公式计算终端所在的位置的坐标(x,y),x为终端所在的位置在预设坐标系中的横坐标,y为终端所在的位置在预设坐标系中的纵坐标:x=X+d sinθ;y=Y+d cosθ,从而实现对终端的定位。需要说明的是,在本实施例中,预设坐标系可以但不限于是世界坐标系。需要说明的是,由于方位角θ的取值范围为0度到360度,因此sinθ和cosθ的值有正有负,这里公式中的符号可以取加号,也可以取减号,在本实施例中以取加号为例,本申请对此不做限定。
图6是根据本发明实施例的另一种可选的终端定位装置的结构框图,如图6所示,定位模块54包括:
1)获取单元62,耦合至定位单元66,设置为获取终端与光源之间的水平距离,其中,水平距离为终端与光源投影在同一水平面时投影点之间的距离;
2)检测单元64,耦合至定位单元66,设置为检测光源相对于终端的方位角;
3)定位单元66,设置为根据水平距离与方位角定位终端所在的位置。
通过上述装置,通过获取单元62获取终端与光源之间的水平距离,并通过检测单元64检测光源相对于终端的方位角来确定终端与光源的相对位置关系,定位单元66根据二者的相对位置关系定位终端所在的位置,可以获取到终端在光源所在坐标系下的坐标,实现对终端的精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。
图7是根据本发明实施例的另一种可选的终端定位装置的结构框图,如图7所示,获取单元62包括:
1)第一获取子单元72,耦合至计算子单元76,设置为获取终端与光源之间的俯仰角,其中,俯仰角为终端与光源之间的连线与水平面之间的夹角;
2)第二获取子单元74,耦合至计算子单元76,设置为获取光源所在的位置的高度与终端所在的位置的高度之间的高度差;
3)计算子单元76,设置为根据高度差及俯仰角计算水平距离。
可见,通过上述装置,可以根据第一获取子单元72获取到的终端与光源之间的俯仰角和第二获取子单元74获取到的光源与终端之间的高度差通过计算子单元76的简单的计算获取终端与光源之间的水平距离,从而初步获取终端和光源的相对位置关系。
图8是根据本发明实施例的另一种可选的终端定位装置的结构框图,如图8所示,确定模块52包括:
1)采集单元82,设置为通过终端采集依据光源发出的光生成的图形码;
2)解析单元84,耦合至采集单元82,设置为通过解析图形码获取光源中LED阵列的标识信息,其中,标识信息至少包括LED阵列的位置标识;
3)第一确定单元86,耦合至解析单元84,设置为根据LED阵列的位置标识确定光源所在的位置。
通过上述装置,利用光源发出的光线形成图形码,将光源的位置信息携 带在图形码中,由于图形码具有抗失真能力强的特点,使采集单元82可以更容易采集到光源发出的图形码,解析单元84通过解析获取光源中LED阵列的标识信息,标识信息中携带LED阵列的位置标识,第一确定单元86根据LED阵列的位置标识确定光源所在的位置,从而提高了终端定位的成功率。
可选地,定位单元66可以但不限于根据下列公式根据水平距离与方位角定位终端所在的位置:x=X+d sinθ;y=Y+d cosθ;其中,x为终端所在的位置在预设坐标系中的横坐标,y为终端所在的位置在预设坐标系中的纵坐标,X为光源所在的位置在预设坐标系中的横坐标,Y为光源所在的位置在预设坐标系中的纵坐标,d表示水平距离,d为正数,θ表示方位角。需要说明的是,在本实施例中,预设坐标系可以但不限于是世界坐标系。需要说明的是,由于方位角θ的取值范围为0度到360度,因此sinθ和cosθ的值有正有负,这里公式中的符号可以取加号,也可以取减号,在本实施例中以取加号为例,本申请对此不做限定。
需要说明的是,上述模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。
实施例三
在本实施例中提供了一种用于终端定位的电子设备,该电子设备用于实现上述实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图9是根据本发明实施例的一种可选的电子设备的结构框图,如图9所示,该电子设备包括:
1)解码模块92,设置为根据终端采集的图形码确定光源所在的位置,其中,图形码依据光源发出的光形成,图形码用于标识光源所在的位置;
2)定位处理模块94,耦合至解码模块92,设置为根据光源所在的位置定位终端所在的位置。
可选地,在本实施例中,上述用于终端定位的电子设备可以但不限于应用于对室内的终端进行定位的场景中。其中,上述电子设备可以包括但不限于:手机、平板电脑、笔记本电脑等。上述光源可以但不限于可见光光源(如LEDs阵列信号源)。例如,利用可见光光源对室内终端进行定位的场景中,如利用光源对商场、矿井、加油站、医院等室内场景中的终端进行定位。
通过上述电子设备,终端在采集到由光源发出的不同的光所生成的图形码后,解码模块92根据该图形码确定光源所在的位置,进一步定位处理模块94再根据光源所在的位置实现对终端所在的位置进行定位,实现了对室内的终端所在的位置进行精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。此外,终端通过采集光源生成的图形码来确定光源的位置,利用了图形码抗失真能力强的特点,提高了终端定位的成功率。
在本实施例中,定位处理模块94为了实现对终端的精确定位,可以但不限于首先根据光源的位置获取终端与该光源的相对位置关系,例如:通过计算获取二者之间的水平距离,以及通过方向传感器读取该光源相对于终端的方位角,再根据水平距离和方位角对终端进行定位。通过上述电子设备,获取了终端与光源间的相对位置关系,就可以根据光源的位置信息计算出终端的位置,实现了对终端的精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。
需要说明的是,本实施例中方位角是指从标准方向的北端(即指南针所指的北)起,顺时针方向到直线的水平角称为该直线的方位角。方位角的取值范围为0度到360度。
在本实施例中,上述图形码可以但不限于包括:二维码。采集图形码的方式可以但不限于是对二维码进行扫描。
在本实施例中,定位处理模块94获取水平距离的方式可以但不限于是获取终端与光源之间的俯仰角和高度差,再根据俯仰角、高度差、终端和光源的连线和水平距离在垂直平面上构成的三角形的三角函数关系计算出水平距离。通过上述电子设备,可以通过简单的计算获取终端和光源之间的水平距离,从而初步获取终端和光源的相对位置关系。
在本实施例中,光源的高度可以是预定的,也可以携带在光源发出的光生成的图形码中,那么,为了获取终端和光源之间的高度差,可以但不限于预设终端的高度,终端的高度可以预设为一个预定值,也可以预设为一个预定范围,或者是根据预设终端高度值和预设终端高度的误差范围确定。终端与光源之间的俯仰角可以但不限于通过对水平仪的度数进行计算获取。
在本实施例中,解码模块92通过终端采集的依据光源发出的光生成的图形码携带有光源的位置信息,可以通过对图形码的解析获取光源的位置信息。通过上述电子设备,利用光源发出的光线形成图形码,将光源的位置信息携带在图形码中,由于图形码具有抗失真能力强的特点,使终端可以更容易采集到光源发出的图形码,从而提高了终端定位的成功率。
需要说明的是,本实施例中光源(例如:LEDs阵列信号源)的3个顶角处的定位模块不限于“回”字形定位模块,其光强度强弱比值也不限于1:1:3:1:1,只需满足图形码(例如:QR码)扫描时的比例不变形即可。
此外,考虑到可见光通信具有能够同时实现照明与通信的功能,因此本实施例中的光源可根据实际场景照明要求调整点阵光源的黑白对比度,以满足照明要求。
在本实施例中,定位处理模块94获取了终端与光源之间的水平距离d,其中d为正数,终端与光源之间的方位角θ,以及光源所在的位置的坐标为(X,Y),X为光源所在的位置在预设坐标系中的横坐标,Y为光源所在的位置在预设坐标系中的纵坐标,可以但不限于通过下述公式计算终端所在的位置的坐标(x,y),x为终端所在的位置在预设坐标系中的横坐标,y为终端所在的位置在预设坐标系中的纵坐标:x=X+d sinθ;y=Y+d cosθ,从而实现对终端的定位。需要说明的是,在本实施例中,预设坐标系可以但不限于是世界坐标系。需要说明的是,由于方位角θ的取值范围为0度到360度,因此sinθ和cosθ的值有正有负,这里公式中的符号可以取加号,也可以取减号,在本实施例中以取加号为例,本申请对此不做限定。
图10是根据本发明实施例的另一种可选的电子设备的结构框图,如图10所示,可选地,定位处理模块94包括:
1)测距单元102,耦合至定位处理单元106,设置为获取终端与光源之 间的水平距离,其中,水平距离为终端与光源投影在同一水平面时投影点之间的距离;
2)方向传感器104,耦合至定位处理单元106,设置为检测光源相对于终端的方位角;
3)定位处理单元106,设置为根据水平距离与方位角定位终端所在的位置。
通过上述电子设备,通过测距单元102获取终端与光源之间的水平距离,并通过方向传感器104检测光源相对于终端的方位角来确定终端与光源的相对位置关系,定位处理单元106根据二者的相对位置关系定位终端所在的位置,可以获取到终端在光源所在坐标系下的坐标,实现对终端的精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。
图11是根据本发明实施例的另一种可选的电子设备的结构框图,如图11所示,可选地,测距单元102包括:
1)水平仪112,耦合至测距子单元116,设置为获取终端与光源之间的俯仰角,其中,俯仰角为终端与光源之间的连线与水平面之间的夹角;
2)第三获取子单元114,耦合至测距子单元116,设置为获取光源所在的位置的高度与终端所在的位置的高度之间的高度差;
3)测距子单元116,设置为根据高度差及俯仰角计算水平距离。
可见,通过上述电子设备,可以根据水平仪112获取到的终端与光源之间的俯仰角和第三获取子单元114获取到的光源与终端之间的高度差通过测距子单元116的简单的计算获取终端与光源之间的水平距离,从而初步获取终端和光源的相对位置关系。
图12是根据本发明实施例的另一种可选的电子设备的结构框图,如图12所示,可选地,解码模块92包括:
1)采集器122,设置为通过终端采集依据光源发出的光生成的图形码;
2)解码器124,耦合至采集器122,设置为解析图形码获取光源中LED阵列的标识信息,其中,标识信息至少包括LED阵列的位置标识;
3)第二确定单元126,耦合至解码器124,设置为根据LED阵列的位置标识确定光源所在的位置。
通过上述电子设备,利用光源发出的光线形成图形码,将光源的位置信息携带在图形码中,由于图形码具有抗失真能力强的特点,使采集器122可以更容易采集到光源发出的图形码,解码器124通过解析获取光源中LED阵列的标识信息,标识信息中携带LED阵列的位置标识,第二确定单元126根据LED阵列的位置标识确定光源所在的位置,从而提高了终端定位的成功率。
下面以一个可选示例对本实施例中的电子设备进行说明和描述。在本可选示例本实施例中的电子设备以手机等移动终端为例。
本可选示例提出了一种可见光室内定位系统,该系统的结构分为三个部分:LEDs阵列信号源、手机等移动终端和控制端。手机等移动终端包括QR码相关的解码模块92和定位处理模块94;控制端通过驱动电路对不同的LEDs阵列光源加载与其位置信息相关的QR码图像信息。图13是根据本可选示例的可见光室内定位系统的结构示意图,如图13所示,其中132表示控制端,1322表示控制端的驱动电路,1324表示LED阵列信号源,134表示手机等移动终端,手机等移动终端包括解码模块92和定位处理模块94。控制端132通过驱动电路1322给LEDs阵列信号源1324加载用于标识其位置的LED-ID信息,并以QR码图像显示。手机134采集该QR码图像,手机终端通过解码模块92获得LED-ID信息,定位处理模块94确定其所处的LEDs阵列信号源的位置,实现终端的粗定位过程。
实施例四
本发明的实施例还提供了一种软件,该软件用于执行上述实施例及可选实施方式中描述的技术方案。
本发明的实施例还提供了一种计算机可读存储介质。在本实施例中,上述计算机可读存储介质可以被设置为存储用于执行以下步骤的程序代码:
步骤S1,根据终端采集的图形码,确定光源所在的位置,其中,图形码依据光源发出的光形成,图形码用于标识光源所在的位置;
步骤S2,根据光源所在的位置定位终端所在的位置。
可选地,在本实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
综上所述,本发明实施例可以实现以下有益效果:首先,本发明实施例充分利用光源(例如:LEDs阵列信号源)等相关设备及资源,降低了室内定位系统的成本;其次,本发明实施例利用图形码(例如:QR码)识别速度快、设备简单、校正能力强等特点,提高了可见光室内定位的定位速度;此外,本发明实施例基于预设坐标系的简单三角函数关系进行终端和光源之间水平距离的计算,通过对手持手机高度及握持俯仰角给定误差范围,利用手机的方向传感器获得方位角信息,从而确定手机等移动终端持有者的精确位置信息,不仅降低了可见光室内定位系统的计算复杂度,而且提高了室内定位系统的定位精度。
本领域的技术人员应该明白,上述的本申请的模块或步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。
以上所述仅为本申请的可选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
工业实用性
本申请实施例提供一种终端定位方法、装置和电子设备,实现了对室内的终端所在的位置进行精确定位,解决了通过相关技术中的可见光通信技术定位终端所导致的定位精度较低的问题,提高了终端的定位精度。

Claims (14)

  1. 一种终端定位方法,包括:
    根据终端采集的图形码确定光源所在的位置,其中,所述图形码依据所述光源发出的光形成,所述图形码用于标识所述光源所在的位置;
    根据所述光源所在的位置定位所述终端所在的位置。
  2. 根据权利要求1所述的方法,其中,所述根据所述光源所在的位置定位所述终端所在的位置包括:
    获取所述终端与所述光源之间的水平距离,其中,所述水平距离为所述终端与所述光源投影在同一水平面时投影点之间的距离;
    检测所述光源相对于所述终端的方位角;
    根据所述水平距离与所述方位角定位所述终端所在的位置。
  3. 根据权利要求2所述的方法,其中,所述获取所述终端与所述光源之间的所述水平距离包括:
    获取所述终端与所述光源之间的俯仰角,其中,所述俯仰角为所述终端与所述光源之间的连线与水平面之间的夹角;
    获取所述光源所在的位置的高度与所述终端所在的位置的高度之间的高度差;
    根据所述高度差及所述俯仰角计算所述水平距离。
  4. 根据权利要求2所述的方法,其中,所述根据所述终端采集的所述图形码确定所述光源所在的位置包括:
    通过所述终端采集所述图形码;
    解析所述图形码获取所述光源中发光二极管LED阵列的标识信息,其中,所述标识信息至少包括所述LED阵列的位置标识;
    根据所述LED阵列的所述位置标识确定所述光源所在的位置。
  5. 根据权利要求2所述的方法,其中,所述根据所述水平距离与所述方位角定位所述终端所在的位置包括:
    x=X+d sinθ;
    y=Y+d cosθ;
    其中,x为所述终端所在的位置在预设坐标系中的横坐标,y为所述终端所在的位置在所述预设坐标系中的纵坐标,X为所述光源所在的位置在所述预设坐标系中的横坐标,Y为所述光源所在的位置在所述预设坐标系中的纵坐标,d表示所述水平距离,θ表示所述方位角。
  6. 根据权利要求1至5中任一项所述的方法,其中,所述图形码包括:二维码。
  7. 一种终端定位装置,包括:
    确定模块,设置为根据终端采集的图形码确定光源所在的位置,其中,所述图形码依据所述光源发出的光形成,所述图形码用于标识所述光源所在的位置;
    定位模块,设置为根据所述光源所在的位置定位所述终端所在的位置。
  8. 根据权利要求7所述的装置,其中,所述定位模块包括:
    获取单元,设置为获取所述终端与所述光源之间的水平距离,其中,所述水平距离为所述终端与所述光源投影在同一水平面时投影点之间的距离;
    检测单元,设置为检测所述光源相对于所述终端的方位角;
    定位单元,设置为根据所述水平距离与所述方位角定位所述终端所在的位置。
  9. 根据权利要求8所述的装置,其中,所述获取单元包括:
    第一获取子单元,设置为获取所述终端与所述光源之间的俯仰角,其中,所述俯仰角为所述终端与所述光源之间的连线与水平面之间的夹角;
    第二获取子单元,设置为获取所述光源所在的位置的高度与所述终端所在的位置的高度之间的高度差;
    计算子单元,设置为根据所述高度差及所述俯仰角计算所述水平距离。
  10. 根据权利要求7所述的装置,其中,所述确定模块包括:
    采集单元,设置为通过所述终端采集所述图形码;
    解析单元,设置为解析所述图形码获取所述光源中发光二极管LED阵列 的标识信息,其中,所述标识信息至少包括所述LED阵列的位置标识;
    第一确定单元,设置为根据所述LED阵列的所述位置标识确定所述光源所在的位置。
  11. 一种电子设备,包括:
    解码模块,设置为根据终端采集的图形码确定光源所在的位置,其中,所述图形码依据光源发出的光形成,所述图形码用于标识所述光源所在的位置;
    定位处理模块,设置为根据所述光源所在的位置定位所述终端所在的位置。
  12. 根据权利要求11所述的电子设备,其中,所述定位处理模块包括:
    测距单元,设置为获取所述终端与所述光源之间的水平距离,其中,所述水平距离为所述终端与所述光源投影在同一水平面时投影点之间的距离;
    方向传感器,设置为检测所述光源相对于所述终端的方位角;
    定位处理单元,设置为根据所述水平距离与所述方位角定位所述终端所在的位置。
  13. 根据权利要求12所述的电子设备,其中,所述测距单元包括:
    水平仪,设置为获取所述终端与所述光源之间的俯仰角,其中,所述俯仰角为所述终端与所述光源之间的连线与水平面之间的夹角;
    第三获取子单元,设置为获取所述光源所在的位置的高度与所述终端所在的位置的高度之间的高度差;
    测距子单元,设置为根据所述高度差及所述俯仰角计算所述水平距离。
  14. 根据权利要求12所述的电子设备,其中,所述解码模块包括:
    采集器,设置为通过所述终端采集依据所述光源发出的光生成的所述图形码;解码器,设置为解析所述图形码获取所述光源中发光二极管LED阵列的标识信息,其中,所述标识信息至少包括所述LED阵列的位置标识;第二确定单元,设置为根据所述LED阵列的所述位置标识确定所述光源所在的位置。
PCT/CN2016/083177 2016-03-15 2016-05-24 终端定位方法、装置和电子设备 WO2016197816A2 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610146331.5A CN107196704A (zh) 2016-03-15 2016-03-15 终端定位方法、装置和电子设备
CN201610146331.5 2016-03-15

Publications (2)

Publication Number Publication Date
WO2016197816A2 true WO2016197816A2 (zh) 2016-12-15
WO2016197816A3 WO2016197816A3 (zh) 2017-02-02

Family

ID=57504300

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/083177 WO2016197816A2 (zh) 2016-03-15 2016-05-24 终端定位方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN107196704A (zh)
WO (1) WO2016197816A2 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110275132A (zh) * 2019-06-18 2019-09-24 西京学院 一种基于二维码映射的室内定位方法
CN113688649A (zh) * 2021-08-16 2021-11-23 江苏博赛孚医疗科技有限公司 一种快速的qr码定位方法
CN114186655A (zh) * 2021-12-10 2022-03-15 福建正孚软件有限公司 一种基于微观码的身份应用方法和系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107835050B (zh) * 2017-11-01 2019-06-18 中国科学院计算技术研究所 一种基于可见光通信的定位方法及系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101189209B1 (ko) * 2011-10-06 2012-10-09 늘솜주식회사 위치 인식 장치 및 그 방법
CN104253646B (zh) * 2013-06-26 2018-11-06 中兴通讯股份有限公司 一种可见光通信mimo系统及其实现数据收发的方法
CN105227238B (zh) * 2015-10-21 2017-07-11 宁波大学 可见光扩频通信定位系统
CN105636202A (zh) * 2016-03-16 2016-06-01 广东工业大学 一种室内融合定位系统
CN205545960U (zh) * 2016-03-16 2016-08-31 广东工业大学 一种室内融合定位装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110275132A (zh) * 2019-06-18 2019-09-24 西京学院 一种基于二维码映射的室内定位方法
CN110275132B (zh) * 2019-06-18 2023-03-28 西京学院 一种基于二维码映射的室内定位方法
CN113688649A (zh) * 2021-08-16 2021-11-23 江苏博赛孚医疗科技有限公司 一种快速的qr码定位方法
CN114186655A (zh) * 2021-12-10 2022-03-15 福建正孚软件有限公司 一种基于微观码的身份应用方法和系统
CN114186655B (zh) * 2021-12-10 2023-07-04 福建正孚软件有限公司 一种基于微观码的身份应用方法和系统

Also Published As

Publication number Publication date
WO2016197816A3 (zh) 2017-02-02
CN107196704A (zh) 2017-09-22

Similar Documents

Publication Publication Date Title
Xie et al. LIPS: A light intensity--based positioning system for indoor environments
Li et al. A VLC smartphone camera based indoor positioning system
Kim et al. High‐resolution indoor positioning using light emitting diode visible light and camera image sensor
CN107702714B (zh) 定位方法、装置及系统
US8494553B2 (en) Position determination using horizontal angles
WO2016197816A2 (zh) 终端定位方法、装置和电子设备
CN108332748B (zh) 一种室内可见光定位方法及装置
US20200273204A1 (en) Accurate positioning system using attributes
CN102696057A (zh) 增强现实系统
Guan et al. High-precision indoor positioning algorithm based on visible light communication using complementary metal–oxide–semiconductor image sensor
CN103245337B (zh) 一种获取移动终端位置的方法、移动终端和位置检测系统
US20160261987A1 (en) Vlc-based vector field fingerprint mapping
Huang et al. Indoor imaging visible light positioning with sampled sparse light source and mobile device
CN104391273B (zh) 一种基于圆形投影的可见光定位方法及系统
CN106470478B (zh) 一种定位数据处理方法、装置和系统
US10007825B2 (en) Positioning system using triangulation positioning based on three pixel positions, a focal length and the two-dimensional coordinates
Wang et al. Arbitrarily tilted receiver camera correction and partially blocked LED image compensation for indoor visible light positioning
CN112422653A (zh) 基于位置服务的场景信息推送方法、系统、存储介质及设备
CN113607158A (zh) 基于可见光通信的平板光源视觉识别匹配定位方法及系统
Sun et al. Headio: zero-configured heading acquisition for indoor mobile devices through multimodal context sensing
Hussain et al. Camera pose estimation using a VLC-modulated single rectangular LED for indoor positioning
CN103491631A (zh) 基于二维码和wifi信号的室内定位系统和方法
CN109636850B (zh) 面向室内智能灯下的可见光定位方法
Wen et al. Enhanced pedestrian navigation on smartphones with vlp-assisted pdr integration
Song et al. Robust LED region-of-interest tracking for visible light positioning with low complexity

Legal Events

Date Code Title Description
NENP Non-entry into the national phase in:

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16806714

Country of ref document: EP

Kind code of ref document: A2