Positioning method and electronic device

By processing the modulated light signal to obtain the identification information of the visible light source, directly determine the indoor positioning position, solving the problems of positioning accuracy and user experience in the prior art, and achieving efficient and simple indoor positioning.

WO2024244508A1PCT designated stage expired Publication Date: 2024-12-05HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/073688
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-01
Filing Date
2024-01-23
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

In the prior art, users need to perform tedious shooting operations when positioning indoors, and the image quality requirements are high, resulting in a decrease in positioning accuracy and user experience.

Method used

By processing the received modulated optical signal, the identification information of the visible light source is obtained, the positioning positioning positioning is directly determined, the positioning process is simplified, and the accuracy is improved. The optical signal is obtained by using an ambient light sensor, which has high sampling rate and low power consumption.

Benefits of technology

No need for tedious operations by users, improving positioning accuracy and user experience, simplifying the positioning process, and saving equipment power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024073688_05122024_PF_FP_ABST
    Figure CN2024073688_05122024_PF_FP_ABST
Patent Text Reader

Abstract

A positioning method and an electronic device, which relate to the technical field of positioning. The method comprises: a receiving device receiving a first target optical signal, and demodulating the first target optical signal, so as to obtain a first modulation parameter, wherein the first target optical signal is obtained by means of a first sending device performing modulation on the basis of the first modulation parameter; then, the receiving device obtaining identification information of the first sending device according to the first modulation parameter; and next, the receiving device determining a first positioning location of the receiving device according to the identification information of the first sending device. It is not necessary for a user to perform tedious positioning operations, such that the positioning process is simple. Moreover, during the process of analyzing an optical signal, it is not necessary to perform complex algorithm processing. Therefore, the positioning accuracy is improved, the power consumption of a device is reduced, and the usage experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Positioning method and electronic equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on June 1, 2023, with application number 202310645917.6 and application name “A Positioning Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of positioning technology, and in particular to a positioning method and electronic device. Background Art

[0003] With the development of visible light communication (VLC) technology, fluorescent lamps and light-emitting diodes (LEDs), while serving as illumination, can now communicate over varying distances and bandwidths by adjusting the brightness and light field distribution. This technology offers advantages such as efficient channel utilization, fast response times, and secure point-to-point transmission. Because visible light is so integral to our daily lives, VLC technology can provide users with indoor positioning services anytime, anywhere.

[0004] Typically, users can use electronic devices to capture an image of an LED lamp and use the image to determine their specific location within the room. Specifically, the electronic device decodes the image captured by the image sensor to determine the position of the LED lamp. Finally, positioning algorithms and calculations are used to locate the user. This requires users to perform cumbersome steps, such as taking photos, to determine their location. Furthermore, the captured image must meet certain quality requirements to facilitate subsequent decoding by the electronic device. In other words, if the captured image does not meet these quality requirements, positioning errors will occur, reducing positioning accuracy and, in turn, diminishing the user experience.

[0005] Summary of the Invention

[0006] Embodiments of the present application provide a positioning method and electronic device that processes received modulated optical signals to obtain identification information of visible light sources. This identification information is then used to determine the location of the device. This eliminates the need for complex positioning operations, resulting in a highly accurate positioning process and an improved user experience.

[0007] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0008] In a first aspect, embodiments of the present application provide a positioning method, applied to a receiving device, comprising: the receiving device receiving a first target optical signal and demodulating the first target optical signal to obtain a first modulation parameter; wherein the first target optical signal is modulated by a first emitting device based on the first modulation parameter. Subsequently, the receiving device obtains identification information of the first emitting device based on the first modulation parameter. Subsequently, the receiving device determines a first positioning position of the receiving device based on the identification information of the first emitting device.

[0009] It can be seen that the embodiment of the present application can use modulation parameters to modulate the light signal emitted by the visible light source, so that the emitted light signal carries the identification information corresponding to the visible light source. Then, the receiving device obtains the modulated light signal and demodulates the light signal to obtain the modulation parameters. The receiving device then obtains the identification information corresponding to the visible light source based on the modulation parameters. Finally, the receiving device determines the first positioning position based on the identification information corresponding to the visible light source. This allows the user carrying the receiving device to obtain their own location. In this way, based on the above content, there is no need for the user to perform tedious positioning operations, and the positioning process is simple. At the same time, in the process of analyzing the light signal, there is no need to perform complex algorithm processing. The ambient light sensor in the receiving device can also be used to obtain the light signal, which has a high sampling rate and accuracy. This improves the accuracy of positioning, saves the power consumption of the receiving device, and improves the user experience.

[0010] In one possible implementation of the first aspect, the method further includes: the receiving device determining a first linkage device based on the first location; the first linkage device being a device associated with the first location; and the receiving device detecting a first trigger operation and sending a first trigger instruction to the first linkage device, the first trigger instruction being used to instruct the first linkage device to execute a first task.

[0011] As can be seen, in the embodiment of the present application, the receiving device can find the device associated with the first location based on the first location. The receiving device can then detect the first trigger operation and send a first trigger instruction to the first linkage device to instruct the first linkage device to perform the first task. For example, when the user's first location is in the first room, the receiving device can find the first smart speaker in the first room. The user can control the first smart speaker to play the first song through the receiving device.

[0012] In this way, the receiving device in the embodiment of the present application can be linked with other devices based on the positioning position, so that the other devices can perform corresponding tasks, providing users with more humanized functions, improving the interactivity between users and multiple devices, and enhancing the user experience.

[0013] In one possible implementation of the first aspect, the method further includes: the receiving device may display the first linkage device and at least one function identifier corresponding to the first linkage device. Then, the receiving device detects a trigger operation for the function identifier and transmits a first trigger instruction to the first linkage device, causing the first linkage device to execute a first task corresponding to the function identifier.

[0014] As can be seen, the receiving device can display the first linked device and at least one function identifier corresponding to the first linked device. The user can trigger the function identifier. Upon detecting the trigger, the receiving device controls the linked device to perform the first task corresponding to the function identifier. The user can sense the devices associated with the first location and control any of them to perform the corresponding task. This provides users with more services, improves the naturalness and flow of interaction, and enhances the user experience.

[0015] In one possible implementation of the first aspect, a first correspondence exists between the identification information and the location information of the transmitting device. When determining the first location of the receiving device based on the identification information of the first transmitting device, the receiving device may determine the location information corresponding to the first transmitting device based on the first correspondence and the identification information of the first transmitting device. The first location of the receiving device is then determined based on the location information corresponding to the first transmitting device.

[0016] It can be seen that there is a first correspondence between the identification information and the location information of the emitting device. The receiving device can determine the location information corresponding to the first emitting device based on the first correspondence and the identification information of the first emitting device. The first positioning position of the receiving device can then be determined based on the location information corresponding to the first emitting device. For example, the receiving device can determine that the location information corresponding to the first lamp is the first room based on the identification information corresponding to the first lamp. Therefore, the first positioning position of the receiving device can be determined to be the first room. This eliminates the need to rely on captured images for positioning, avoids positioning errors, and improves positioning accuracy.

[0017] In one possible implementation of the first aspect, the method further includes: a receiving device can receive a second target optical signal, where the second target optical signal is modulated by the second emitting device based on a second modulation parameter. The receiving device demodulates the second target optical signal to obtain the second modulation parameter. Next, the receiving device obtains identification information of the second emitting device based on the second modulation parameter. Then, based on the identification information of the second emitting device, the receiving device is determined to have a second positioning position; the second positioning position is different from the first positioning position. Finally, the receiving device can also send a second trigger instruction to the second linkage device based on the second positioning position. The second linkage device is a device associated with the second positioning position, and the second trigger instruction is used to instruct the second linkage device to perform the first task.

[0018] It can be seen that the receiving device can also determine its own second positioning position based on the received second target light signal. The second positioning position is different from the above-mentioned first positioning position. Then, the receiving device can control the device associated with the second positioning position to perform the first task. For example, when the first positioning position is the first room, the receiving device can find the smart speaker in the first room and control the first smart speaker to play the first song. When the second positioning position is the second room, the receiving device can find the second smart speaker in the second room and control the second smart speaker to continue playing the first song. In this way, the functions of sound following people and music flow / continuation can be realized. While simplifying the positioning process, more humane services can be provided to users based on the positioning position, thereby improving the user experience.

[0019] In an implementation manner of the first aspect, the method further includes: after the receiving device sends the second trigger instruction to the second linkage device, sending a third trigger instruction to the first linkage device; the third trigger instruction is used to instruct the first linkage device to stop executing the first task.

[0020] It can be seen that after controlling the second linkage device to perform the first task, the receiving device can also send a third trigger instruction to the first linkage device to cause the first linkage device to stop performing the first task. Continuing with the example of the first smart speaker and the second smart speaker playing the first song. After the receiving device controls the second smart speaker to continue playing the first song, it can control the first smart speaker to stop playing the first song. In this way, the embodiment of the present application can further improve the flow / continuation process for implementing the first task and provide users with a better experience.

[0021] In one implementation of the first aspect, during the process of receiving the first target optical signal by the receiving device, the receiving device may receive at least one group of first optical signals within a preset time period; different groups of first optical signals are emitted by different emitting devices. Subsequently, the receiving device obtains at least one group of second optical signals from the at least one group of first optical signals, each group of second optical signals including at least two recurring optical signals. The receiving device then determines the first target optical signal based on the at least one group of second optical signals.

[0022] Furthermore, in the process of determining the first target optical signal based on the at least one second optical signal, the receiving device needs to derive at least one set of third optical signals from the at least one set of second optical signals, wherein the time interval between two adjacent optical signals in each set of third optical signals is the same, and convert each set of third optical signals into a corresponding electrical signal. Finally, the receiving device obtains the signal strength of each electrical signal and determines the third optical signal corresponding to the electrical signal with the highest signal strength as the first target optical signal.

[0023] As can be seen, the receiving device can exclude optical signals that appear only once from at least one group of first optical signals to obtain at least one group of second optical signals. Then, from at least one group of second optical signals, it can exclude optical signals that appear twice in a row with different time intervals to obtain at least one group of third optical signals. Finally, each group of third optical signals is converted into a corresponding electrical signal, and the third optical signal corresponding to the electrical signal with the highest signal strength is determined as the first target optical signal. This improves the accuracy and efficiency of determining the first target optical signal.

[0024] In one possible implementation of the first aspect, a second correspondence exists between the identification information of the emitting device and the modulation parameters. During the process of obtaining the identification information of the first emitting device based on the first modulation parameters, the receiving device can obtain the identification information of the first emitting device based on the second correspondence and the first modulation parameters. The modulation parameters include one or more of a light intensity parameter, a color temperature parameter, a color parameter, a spectral power distribution parameter, or a high-frequency flicker frequency parameter.

[0025] As can be seen, there is a correspondence between the identification information of the transmitting device and the modulation parameters. The receiving device can directly obtain the identification information of the first transmitting device based on the second correspondence and the first modulation parameters. This eliminates the need for complex algorithmic processing, improving the efficiency and accuracy of obtaining the identification information of the first transmitting device.

[0026] In one implementation of the first aspect, the method further includes: the receiving device may further output location prompt information, wherein the location prompt information is used to indicate the first positioning location, and the location prompt information includes one or more of text prompt information, voice prompt information, and video prompt information.

[0027] As can be seen, the receiving device can display the determined first positioning position. The user can perceive the positioning result based on the position prompt information output by the receiving device, thereby improving the user experience.

[0028] In a second aspect, an embodiment of the present application provides a positioning method, applied to a first sending device, the method comprising:

[0029] The first emitting device can modulate the optical signal based on a first modulation parameter to obtain a first target optical signal. The first emitting device then emits the modulated first target optical signal. The modulated first target optical signal is used by the receiving device to obtain identification information of the first emitting device based on the first modulation parameter, and to determine a first location of the receiving device based on the identification information of the first emitting device.

[0030] As can be seen, the first target light signal emitted by the first emitting device is modulated based on the first modulation parameters. Subsequent receiving devices no longer need to rely on complex algorithmic processing or captured images for positioning. Instead, they can directly obtain the identification information of the first emitting device based on the first modulation parameters and then determine the first positioning position of the receiving device based on the identification information of the first emitting device. This simplifies the positioning process and improves positioning accuracy, thereby enhancing the user experience.

[0031] In a third aspect, an embodiment of the present application provides a positioning system, comprising a transmitting device and a receiving device. The transmitting device is configured to modulate an optical signal based on a first modulation parameter to obtain a first target optical signal. The transmitting device is further configured to transmit the modulated first target optical signal. The receiving device is further configured to receive the first target optical signal. The receiving device is further configured to demodulate the first target optical signal to obtain the first modulation parameter. The receiving device is further configured to obtain identification information of the transmitting device based on the first modulation parameter. The receiving device is further configured to determine a first positioning position of the receiving device based on the identification information of the transmitting device.

[0032] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a memory and one or more processors; the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the positioning method described in the first aspect above, or the positioning method described in the second aspect above.

[0033] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a computer, the computer can execute the positioning method described in the first aspect above, or the positioning method described in the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] FIG1 is a schematic diagram of a scenario for positioning an electronic device provided in an embodiment of the present application;

[0035] FIG2 is a schematic diagram of the structure of a positioning system provided in an embodiment of the present application;

[0036] FIG3 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0037] FIG4 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;

[0038] FIG5 is a schematic diagram of an interface for adding a device provided in an embodiment of the present application;

[0039] FIG6 is a schematic diagram of an interface of a modulation device provided in an embodiment of the present application;

[0040] FIG7 is a schematic diagram of an interface for prompting information provided in an embodiment of the present application;

[0041] FIG8 is a schematic diagram of another prompt information interface provided in an embodiment of the present application;

[0042] FIG9 is a schematic diagram of an interface of a first service information provided in an embodiment of the present application;

[0043] FIG10 is a schematic diagram of an interface of a device list provided in an embodiment of the present application;

[0044] FIG11 is a schematic diagram of an interface of a second service information provided in an embodiment of the present application;

[0045] FIG12 is an interactive diagram of a positioning method provided in an embodiment of the present application;

[0046] FIG13 is a schematic diagram of a process of receiving a first target optical signal according to an embodiment of the present application;

[0047] FIG14 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship. For example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in some embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0049] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0050] With the continuous improvement and development of electronic equipment hardware and software technology, sensing technology, mobile Internet technology, etc., indoor positioning, as a combination of sensing technology and electronic equipment, has achieved great progress in the fields of positioning accuracy, response speed and manufacturing cost. Indoor positioning technology can include infrared positioning technology, visible light positioning technology, ultrasonic positioning technology, radio frequency identification (RFID) / near field communication (NFC) positioning technology, etc., depending on the electromagnetic waves used. Depending on its networking protocol or design, it can include Bluetooth positioning technology, Zigbee positioning technology, Wi-Fi positioning technology, ultra-wide band positioning technology (UWB), etc. It can also include Global Positioning System (GPS) positioning technology and acceleration / magnetic field positioning technology.

[0051] Infrared positioning technology operates within line of sight, has extremely poor penetration, and is easily affected by environmental factors such as lighting and smoke. Ultrasonic positioning technology suffers from significant attenuation in air and is significantly affected by multipath and non-line-of-sight transmission when used for reflection ranging, resulting in inaccurate measurement data. Radio frequency identification positioning technology lacks communication capabilities and has poor anti-interference capabilities. It requires extensive deployment of communication components and is expensive. Bluetooth positioning technology suffers from less stable performance and is significantly affected by noise signals, enabling it to identify only nearby devices. Zigbee positioning technology is significantly affected by multipath and motion, resulting in a high cost. Wi-Fi positioning technology suffers from co-channel interference, consumes a lot of power, and cannot provide accurate positioning. Furthermore, Wi-Fi hotspots are intermittent, preventing them from transmitting signals continuously. Ultra-wideband positioning technology requires pre-determined component layout based on requirements, is difficult to achieve large-scale indoor coverage, and is expensive. Global Positioning System positioning technology is primarily suitable for outdoor scenarios. Satellite positioning signals are severely attenuated after passing through walls, and cannot provide reliable and high-precision positioning indoors. The positioning accuracy of acceleration / magnetic field positioning technology is closely related to the sensor device or user status, and the positioning accuracy is low.

[0052] Compared to the aforementioned positioning technologies, the development of visible light communication (VLC) technology allows fluorescent lamps and light-emitting diodes (LEDs), for example, to simultaneously use their light as a carrier wave for information transmission. This allows communication at varying distances and bandwidths simply by adjusting the brightness and light field distribution. This approach offers advantages such as fast response times and secure point-to-point transmission without occupying channel resources.

[0053] Typically, as shown in Figure 1, a user can use a camera in an electronic device to capture an image of an LED lamp and then use an application within the electronic device to locate their own position. Specifically, after the camera captures the image of the LED lamp, the application in the electronic device can process the image to obtain a corresponding light and dark stripe pattern. The application then decodes the light and dark stripe pattern to obtain the corresponding location information. Finally, based on the location information, such as the position coordinates of the LED lamp, the application further calculates the camera's three-dimensional position coordinates using the camera's positioning algorithm to obtain a positioning result. This, in turn, determines the user's specific location within the room.

[0054] In other words, in the process of determining their own location, users need to rely on the camera and camera system of the electronic device. For example, after taking a photo, the electronic device needs to obtain the image captured in the album to perform positioning. Because the album application involves images captured by the user in addition to the image of the LED lamp, there is a possibility of user privacy leakage when the electronic device calls the album application. In addition, the user needs to use the electronic device to perform a series of photo taking and positioning operations, resulting in increased power consumption of the electronic device. At the same time, the electronic device also needs to ensure that the captured image meets certain quality requirements when decoding the image. If the captured image does not meet the quality requirements, positioning errors will occur, reducing the accuracy of positioning. In turn, the user's user experience is reduced.

[0055] Based on the above content, the embodiments of the present application provide a positioning method and electronic device, which can be applied to a variety of scenarios, such as home scenes and communities, hospitals, large shopping malls, indoor pedestrian streets, underground parking lots, and work factories, etc., which are large in scale and have complex spatial environments. It can also be applied to outdoor scenes such as highways, parks, and scenic spots.

[0056] The embodiment of the present application modulates the light signal emitted by the visible light source based on the light emitting principle of the visible light source, so that the emitted light signal carries the identification information corresponding to the visible light source. The user can obtain the modulated light signal through the electronic device carried by the user, and then obtain his own location. Specifically, the electronic device receives the light signal emitted by the visible light source, and demodulates it to identify the identification information carried by the light signal. Afterwards, the electronic device obtains the corresponding positioning position based on the correspondence between the identification information and the location to which it belongs. Furthermore, in a home scenario, after obtaining the positioning position, the electronic device can also obtain other electronic devices associated with the positioning position based on the positioning position, and establish information interaction with other electronic devices.

[0057] The positioning method provided in the present application can be applied to a positioning system. Referring to Figure 2, a positioning system provided in an embodiment of the present application includes a first electronic device 101 (for example, an LED lamp), a second electronic device 102 (a device to be positioned used by a user, such as a user's mobile phone), and a third electronic device 103 (a modulation device, such as a user's laptop computer).

[0058] In some embodiments of the present application, a communication connection may be established between the first electronic device 101 and the third electronic device 103. The communication connection may include a wireless communication connection. For example, the wireless communication connection may include a short-range wireless communication connection such as a Bluetooth communication connection and a wireless local area network communication connection. In one implementation, the third electronic device 103 is configured to control the first electronic device 101 to perform signal modulation.

[0059] In some embodiments of the present application, a user may use the second electronic device 102 to implement a positioning process with the first electronic device 101. The number of the first electronic device 101 may be one or more.

[0060] The positioning system provided in the embodiments of the present application may further include other electronic devices in addition to the first electronic device 101, the second electronic device 102, and the third electronic device 103, such as a fourth electronic device 104 (e.g., a user's smart speaker). The fourth electronic device 104 and the first electronic device 101 are both located in the same indoor location. A communication connection may be established between the second electronic device 102 and the fourth electronic device 104.

[0061] The positioning system provided in the embodiments of the present application includes, but is not limited to, information exchange between the aforementioned devices, and can also be information exchange between one device and multiple devices. Those skilled in the art can determine the type and number of electronic devices based on actual needs, and such designs do not exceed the scope of protection of the embodiments of the present application.

[0062] For example, in a home scenario, while a user is using their phone, the phone can communicate and interact with LED lamp 1 in room A, obtaining the location information of "Room A" to implement indoor positioning. The phone can also communicate and interact with LED lamp 2 in room B, obtaining the location information of "Room B", and then implement information exchange with other electronic devices in room B based on the obtained location information.

[0063] For example, the user moves in multiple rooms. When the user moves to room A with a mobile phone, the mobile phone determines that the location is room A based on the LED lamp 1 and obtains the smart speaker in room A. After that, the mobile phone displays the service card corresponding to the smart speaker, such as the feature ability (FA) card, on the screen. The user can then directly control the smart speaker to perform the corresponding task based on the FA card corresponding to the smart speaker. In other words, the user does not need to open the home application corresponding to the smart speaker, but can directly click on the FA card to make the interface displayed on the mobile phone jump directly to the service interface corresponding to the smart speaker. Among them, the FA card is used to implement the service functions of the application program (APP). An APP can have multiple FAs, and different FAs represent different service functions.

[0064] For example, when a user is in room A, they use smart speaker 1 in room A to play song A. Later, when the user moves to room B with their phone, the phone determines the location is room B based on LED lamp 2 and retrieves smart speaker 2 in room B. The phone then controls smart speaker 2 in room B to continue playing song A. This allows for real-time location acquisition and location-based control of electronic devices in different rooms. Using this example, users can be provided with service flow / continuation features such as "music follows the user."

[0065] In some embodiments of the present application, the wireless communication technology for establishing a wireless communication connection includes but is not limited to at least one of the following: wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT) (for example, traditional Bluetooth or bluetooth low energy (BLE) Bluetooth), near field communication (NFC), Zigbee, frequency modulation (FM) and infrared (IR), etc.

[0066] It will be understood that the electronic devices in the embodiments of the present application may be, for example, mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart screens, smart cars, smart speakers, robots, and smart home devices, etc. The present application does not impose any special restrictions on the specific form of the electronic devices.

[0067] Furthermore, the first electronic device 101, the second electronic device 102, the third electronic device 103 and the fourth electronic device 104 may be installed with an operating system or not, and their operating systems include but are not limited to: This application does not limit the specific type of electronic device or the type of operating system installed.

[0068] In the embodiments of the present application, the first electronic device 101, the second electronic device 102, the third electronic device 103, and the fourth electronic device 104 can be implemented by different or the same devices. For example, the second electronic device 102, the third electronic device 103, and the fourth electronic device 104 in the embodiments of the present application can be implemented by the hardware structure shown in Figure 3.

[0069] It should be noted that the first electronic device 101 may also be referred to as a sending device, the second electronic device 102 may also be referred to as a receiving device, and the fourth electronic device 104 may also be referred to as a linkage device.

[0070] For example, taking the electronic device as a mobile phone as an example, FIG3 shows a schematic structural diagram of the electronic device.

[0071] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc.

[0072] Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L and a bone conduction sensor 180M, etc.

[0073] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0074] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0075] The processor can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.

[0076] Processor 110 may also be provided with a memory for storing instructions and data. In some embodiments of the present application, the memory in processor 110 may be a cache memory. This memory can store instructions or data that have been used or are frequently used by processor 110. If processor 110 needs to use the instruction or data, it can directly call it from this memory. This avoids repeated accesses, reduces the waiting time of processor 110, and thus improves system efficiency.

[0077] In some embodiments of the present application, the memory also stores other data in addition to computer programs. The other data may include data generated after the operating system or application is run, including system data (such as configuration parameters of the operating system) and user data. For example, the data cached by the application opened by the user is typical user data. The memory generally includes internal memory and external memory. The internal memory may be random access memory (RAM), read-only memory (ROM), and CACHE, etc. The external memory may include a solid state drive (SSD), a universal flash memory (UFS), a hybrid hard drive (HHD), a magnetic disk, a floppy disk, an optical disk, a USB flash drive, and a multimedia card, etc.

[0078] It is understood that the connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0079] In some embodiments of the present application, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other electronic devices through wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a Global Positioning System (GPS), a Global Navigation Satellite System (GLONASS), a BeiDou Navigation Satellite System (BDS), a Quasi-Zenith Satellite System (QZSS) and / or a Satellite Based Augmentation System (SBAS).

[0080] The pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals. In some embodiments of the present application, the pressure sensor 180A may be disposed on the display screen 194 .

[0081] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments of the present application, the gyroscope sensor 180B can be used to determine the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can also be used for anti-shake photography.

[0082] The air pressure sensor 180C is used to measure air pressure. In some embodiments of the present application, the electronic device calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0083] Magnetic sensor 180D includes a Hall sensor. The electronic device can use magnetic sensor 180D to detect the opening and closing of a flip case. In some embodiments of the present application, when the electronic device is a flip phone, the electronic device can detect the opening and closing of the flip cover based on magnetic sensor 180D. Furthermore, based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0084] The accelerometer 180E can detect the magnitude of an electronic device's acceleration in all directions (generally three axes). When the electronic device is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0085] Distance sensor 180F is used to measure distance. Electronic devices can measure distance using infrared or laser. In some embodiments of the present application, when shooting a scene, the electronic device can use distance sensor 180F to measure distance to achieve fast focusing.

[0086] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device emits infrared light through the LED. The electronic device uses the photodiode to detect infrared reflected light from nearby objects.

[0087] The ambient light sensor 180L senses ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 194 based on the perceived ambient light. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking photos. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device is in a pocket to prevent accidental touches.

[0088] In some embodiments of the present application, in indoor scenarios, ambient light sensor 180L can also be used to collect visible light emitted by LED lamps via a free-space optical wireless channel and convert the optical signal corresponding to the visible light into an electrical signal. Ambient light sensor 180L then identifies the identification information carried by the optical signal based on the electrical signal and obtains the corresponding location information based on the correspondence between the identification information and the indoor location, thereby achieving indoor positioning.

[0089] Fingerprint sensor 180H is used to collect fingerprints. Electronic devices can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.

[0090] The temperature sensor 180J is used to detect temperature. In some embodiments of the present application, the electronic device uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.

[0091] The touch sensor 180K, also known as a "touch panel," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near the touch sensor.

[0092] Bone conduction sensor 180M can acquire vibration signals. In some embodiments of the present application, bone conduction sensor 180M can acquire vibration signals from vibrating bones in the human body's vocal cords. Bone conduction sensor 180M can also contact a person's pulse to receive blood pressure signals. In some embodiments of the present application, bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones.

[0093] The electronic device can implement display functions using a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0094] Display screen 194 is used to display files, images, videos, etc. Display screen 194 includes a display panel. In some embodiments of the present application, the electronic device may include one or more display screens 194. A user can use display screen 194 to open a target file stored on a disk. In response to the user's action to open the target file, the electronic device controls display screen 197 to display the corresponding target file.

[0095] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device.

[0096] (A) in FIG4 is a software structure block diagram of the electronic device according to an embodiment of the present application.

[0097] A layered architecture divides software into several layers, each with distinct roles and divisions of labor. Layers communicate with each other through software interfaces. In some embodiments of the present application, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime layer, the system library layer, and the kernel layer.

[0098] The application layer can include a series of application packages.

[0099] As shown in (A) in FIG4 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0100] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0101] As shown in (A) of FIG4 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

[0102] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0103] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0104] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0105] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).

[0106] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0107] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0108] Android Runtime includes core libraries and a virtual machine. Android Runtime is responsible for scheduling and management of the Android system.

[0109] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the core library of the Android system.

[0110] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0111] The system library can include multiple functional modules, such as a photosensitive module, a demodulation module, and a positioning module. The photosensitive module is used to acquire light signals; the demodulation module is used to convert light signals into electrical signals and demodulate the electrical signals to obtain corresponding identification information; and the positioning module is used to generate a positioning position based on the identification information.

[0112] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0113] As shown in FIG4(B), the interactive system architecture provided in the embodiment of the present application includes a physical unit and a functional unit. The physical unit includes an ambient light sensor and processor in a first electronic device, such as an LED lamp, and a second electronic device, such as a mobile phone. The functional unit includes a modulation module and a driver module in the first electronic device, and a light sensing module, a demodulation module, and a positioning module in the second electronic device.

[0114] As shown in (C) in Figure 4, the process of executing the positioning method of the interactive system provided in the embodiment of the present application is as follows: the modulation module in the first electronic device can modulate the optical signal based on the modulation parameter, and send a driving signal to the driving module to emit the modulated optical signal.

[0115] The photosensitive module of the ambient light sensor in the second electronic device can receive the light signal emitted by the first electronic device. The photosensitive module then sends the light signal to the demodulation module. The demodulation module demodulates the light signal to obtain a modulation parameter. Based on the modulation parameter, the demodulation module obtains identification information corresponding to the first electronic device. The demodulation module then sends the identification information corresponding to the first electronic device to the positioning module. After receiving the identification information, the positioning module determines the location of the first electronic device based on the correspondence between the identification information of the first electronic device and the location of the first electronic device.

[0116] The technical solutions involved in the following examples can all be implemented in electronic devices with the above-mentioned hardware architecture and software architecture.

[0117] The present embodiment provides a positioning method that modulates an optical signal emitted by a first electronic device 101 so that the modulated optical signal carries identification information of the first electronic device 101. A second electronic device 102 then receives the modulated optical signal emitted by the first electronic device 101 and demodulates the modulated optical signal to obtain the identification information carried by the signal. Based on the identification information, the second electronic device 102 then obtains indoor location information corresponding to the identification information, i.e., a positioning position, to achieve indoor positioning.

[0118] In some examples, there may be one or more first electronic devices 101. There may also be one or more second electronic devices 102. The technical solutions provided in the embodiments of the present application enable a second electronic device 102 to perform indoor positioning based on multiple modulated optical signals emitted by multiple first electronic devices 101. For example, when there are multiple LED lamps in room A, or when there are multiple mobile phones in room A, different users can use their mobile phones to interact with different LED lamps to determine their location in room A.

[0119] Specifically, in a home interior, every room is equipped with an LED lamp. When operating, these lamps emit modulated visible light. As a user moves around the room with their phone, the phone's ambient light sensor collects and demodulates the visible light emitted by the LED lamps, determining the location of the lamp and the user's location in that room. The phone then uses this location to identify other electronic devices in the room and control them to perform corresponding tasks.

[0120] Indoor scenarios with complex spatial environments, such as large shopping malls, indoor pedestrian streets, underground parking lots, and factory areas, consider this example. These malls often feature multiple stores, each equipped with LED lamps. As a user moves through the mall with their phone, the phone's ambient light sensor collects and demodulates the light signals emitted by the store's LED lamps, determining the location corresponding to that LED lamp and confirming the user's location within the mall. If the user then wishes to travel to another store, the phone can provide navigation and other services based on their location.

[0121] Visible light is closely related to users' daily lives, and many electronic devices in the aforementioned indoor scenarios contain visible light sources. The embodiments of the present application can provide users with more intelligent, user-friendly, and complex functions such as indoor positioning and navigation services anytime and anywhere, thereby improving the user experience.

[0122] It should be noted that the second electronic device 102 and the third electronic device 103 can be different electronic devices of the same user. For example, the second electronic device 102 is a device to be located, such as a mobile phone, used by the first user, and the third electronic device 103 is a modulation device, such as a laptop, used by the first user. The first user can use the laptop to modulate the LED lamp and then use the mobile phone to locate it.

[0123] The second electronic device 102 and the third electronic device 103 can also be different electronic devices belonging to different users. For example, the second electronic device 102 is a device to be located, such as a mobile phone, used by a first user, and the third electronic device 103 is a modulation device, such as a laptop, used by a second user. The first user can be a mother, and the second user can be a child. The mother can use the laptop to modulate the LED lamp, and the child can then use the mobile phone to locate it.

[0124] A device of the same user can also realize the modulation function corresponding to the second electronic device 102 and the positioning function corresponding to the third electronic device 103. For example, the first user can use a mobile phone to modulate the LED lamp, and then continue to use the mobile phone for positioning.

[0125] Below, taking the first electronic device 101 as an LED lamp, the second electronic device 102 as the user's first mobile phone (modulation device), and the third electronic device 103 as the user's second mobile phone (positioning device) as examples, the technical solution provided in the example of this application is described in detail in combination with the accompanying drawings.

[0126] In some embodiments of the present application, a user can use a first mobile phone to bind an LED lamp to a location to which the LED lamp belongs in advance, so as to establish a first correspondence between the LED lamp and the location to which the LED lamp belongs. It is understandable that, in the process of binding the LED lamp and the location to which the first mobile phone belongs, it can obtain the identification information corresponding to the LED lamp after establishing a communication connection with the LED lamp. Then, the first mobile phone detects the setting operation for the location to which the LED lamp belongs, and binds the identification information corresponding to the LED lamp and the location to which the LED lamp belongs. Then, the first mobile phone can control the LED lamp to modulate the light signal emitted based on the identification information of the LED lamp without affecting the normal lighting of the LED lamp, so that the identification information of the LED lamp is loaded into the light signal emitted by the LED lamp. This facilitates the subsequent receiving end to receive the light signal containing the identification information and demodulate the corresponding identification information from the light signal.

[0127] In one implementation, a user can add an LED lamp in a smart home app and select a corresponding location for binding. After detecting the user's input binding operation, the first mobile phone can establish a first correspondence between the identification information of the LED lamp and its location information. By associating the LED lamp with the location, the first mobile phone can facilitate subsequent determination of the corresponding location information of the LED lamp based on the identification information corresponding to the LED lamp.

[0128] Exemplarily, FIG5 is a schematic diagram of an interface for adding devices provided in an embodiment of the present application. As shown in (A) in FIG5 , it is a schematic diagram of the front of the first mobile phone provided in an embodiment of the present application. A smart home APP icon 500 is displayed on the display screen of the first mobile phone. The user can click on the smart home APP icon 500. As shown in (B) in FIG5 , the first mobile phone displays the user interface of the smart home APP in response to the click operation on the smart home APP icon. The user interface may include pre-configured scene names, electronic devices in the home, and corresponding status information, etc. For example, electronic devices in the home and corresponding status information include a TV in the living room (online), a TV in the master bedroom (online), a stereo in the master bedroom (offline), and a smart door lock (online), etc. The pre-configured scene names include a home scene, a sleep scene, and a going out scene, etc. The user interface may also include icons of configured electronic devices.

[0129] It is understood that the configured electronic device can be an electronic device associated with a user account. The user needs to log in to the corresponding user account in the smart home app. The user's pre-configured electronic device must be bound to the user account to complete the configuration. If the user is not logged in to the smart home app, they must log in to the corresponding user account and enter their username and password.

[0130] Continuing with Figure 5 (B), users can also click the "+" icon on the user interface to add electronic devices and create scenes with one click. For example, as shown in Figure 5 (C), after the user clicks the "+" icon, the first mobile phone, in response to the user's click, controls the display screen to display a drop-down menu. The drop-down menu includes an add device control 501, a share device control 502, a create scene control 503, a connect to third-party platform control 504, and a modulate device control 505. The user can click the pre-configured add device control 501 in the drop-down menu to trigger the add device interface. As shown in Figure 5 (D), in response to the user clicking the add device control 501, the first mobile phone displays the add device interface. The add device interface includes a first content area 506 and a second content area 507. The first content area 506 displays the device name of the added device, and the second content area 507 displays the rooms corresponding to the pre-added device. The user can add the device using the ">" control in the first content area 506 and click "Master Bedroom" in the second content area 506 to set the room to which the electronic device belongs. Then, click the OK control 508 to complete the device adding process. For example, the user adds LED lamp 1 and selects the corresponding room as the master bedroom. In this way, the first mobile phone can associate the added device with the room to which it belongs in response to the user's click operation on the OK control 508.

[0131] It should be noted that the first mobile phone can associate all LED lamps in the home scene with the rooms to which they belong, and the implementation form of the association is not limited in the embodiment of this application.

[0132] After associating the LED lamps with their respective locations, the first mobile phone can store the first correspondence between the LED lamps and their respective locations on the server. This allows electronic devices other than the first mobile phone to obtain the first correspondence between the LED lamps and their respective locations from the server. For example, when a user is using a tablet computer, they can obtain the first correspondence between the LED lamps and their respective locations by simply logging into a smart home app and their user account on the tablet computer.

[0133] In some embodiments of the present application, after establishing a first correspondence between an LED lamp and a location of the LED lamp, the first mobile phone can control the LED lamp to modulate the emitted light signal based on identification information corresponding to the LED lamp.

[0134] It should be noted that the user can control the light signal modulated by the LED lamp through the smart home app on the first mobile phone, or through other software solutions. The user can also control the light signal modulated by the LED lamp through a desktop computer, tablet computer, laptop computer, etc. The embodiments of this application do not specifically limit the implementation method of the light signal modulated by the LED lamp or the electronic device used by the user.

[0135] The following describes the process of a user modulating an LED lamp.

[0136] Figure 6 is a schematic diagram of a modulation device interface provided in an embodiment of the present application. As shown in (A) in Figure 6, the user can click on the pre-configured modulation device control 505 in the drop-down menu to trigger entry into the modulation device interface. As shown in (B) in Figure 6, the first mobile phone displays the modulation device interface in response to the user clicking on the modulation device control 505. The modulation device interface includes a modulation parameter control 601, at least one pre-modulation device control 602, a full selection control 603, and a modulation control 604. After the user clicks on any pre-modulation device control 602, the first mobile phone can display the modulation details page of the device corresponding to the modulation device control 602. For example, after the first mobile phone detects that the user clicks on the LED lamp 1, the modulation details page corresponding to the LED lamp 1 is displayed. And after detecting that the user clicks on the modulation details page, the first mobile phone can only control the LED lamp 1 to modulate the light signal emitted by itself.

[0137] Furthermore, the first mobile phone can control all LED lamps to modulate the light signals they emit. After the first mobile phone detects that the user has clicked the Select All control 603, it controls all LED lamps in the modulation device interface to enter a selected state. Subsequently, after the user clicks the Modulation Parameter control 601, the first mobile phone can display a parameter menu corresponding to the Modulation Parameter control 601. The parameter menu can include parameters such as light intensity, color temperature, color, spectral power distribution, and high-frequency flicker frequency. The user can select any modulation parameter from the parameter menu, and the first mobile phone will display the modulation parameter in the Modulation Parameter control 601 based on the user's selection. It is understood that the user can select one or more modulation parameters from the parameter menu. The first mobile phone can control the LED lamps to modulate the modulation parameters of the light signals they emit. For example, the first mobile phone can control the LED lamps to modulate the high-frequency flicker frequency of the light signals they emit. For another example, the first mobile phone can control the LED lamps to modulate the light intensity of the light signals they emit. Finally, after the first mobile phone detects that the user has clicked the Modulation Parameter control 604, it can control all LED lamps to perform subsequent modulation tasks based on the modulation parameters corresponding to the Modulation Parameter control 601.

[0138] In some embodiments of the present application, when the first mobile phone controls an LED lamp to modulate an emitted light signal, the first mobile phone can control multiple LED lamps to modulate the same type of modulation parameters of the emitted light signal, or can control multiple LED lamps to modulate different types of modulation parameters of the emitted light signal.

[0139] For example, the first mobile phone can control LED lamp 1 to modulate the high-frequency flickering frequency of the light signal emitted, and control LED lamp 2 to modulate the high-frequency flickering frequency of the light signal emitted. For another example, the first mobile phone can control LED lamp 1 to modulate the high-frequency flickering frequency of the light signal emitted, and control LED lamp 2 to modulate the light intensity of the light signal emitted.

[0140] In some embodiments of the present application, the first mobile phone may store a second correspondence between identification information of the LED lamp and a modulation parameter of a light signal emitted by the LED lamp. The first mobile phone may determine the corresponding modulation parameter based on the identification information of the LED lamp and control the LED lamp to perform modulation based on the modulation parameter.

[0141] For example, the identification information of LED lamp 1 corresponds to the modulation parameter A1 of the light signal emitted by LED lamp 1, and the identification information of LED lamp 2 corresponds to the modulation parameter A2 of the light signal emitted by LED lamp 2. Modulation parameter A1 and modulation parameter A2 are different. Modulation parameter A1 and modulation parameter A2 can be the same type of modulation parameter, for example, both modulation parameter A1 and modulation parameter A2 are high-frequency flicker frequencies.

[0142] For example, the identification information of LED lamp 1 corresponds to the modulation parameter A1 of the light signal emitted by LED lamp 1, and the identification information of LED lamp 2 corresponds to the modulation parameter B2 of the light signal emitted by LED lamp 2. Modulation parameter A1 and modulation parameter B2 are different. Modulation parameter A1 and modulation parameter B2 can be different types of modulation parameters, for example, modulation parameter A1 is light intensity, and modulation parameter B2 is a high-frequency flicker frequency.

[0143] Taking modulation parameters A1 and A2 as examples of high-frequency flickering frequencies, the flickering frequency of LEDs is usually at least 100Hz, which is imperceptible to the human eye. LED lamps can use binary on-off keying (OOK) modulation. Binary on-off keying modulation uses a unipolar non-return-to-zero code sequence to control the on and off of the sinusoidal carrier. One amplitude is set to 0, that is, the LED lamp emits light, and the other amplitude is non-zero, that is, the LED lamp does not emit light. The subsequent receiving end can receive the light signal and perform OOK demodulation based on the corresponding modulation parameters. For example, modulation parameter A1 can be "1, 1, 1, 0 and 0", and modulation parameter A2 can be "1, 0, 1, 1 and 0".

[0144] It should be noted that the modulation mode may include OOK modulation, OFDM modulation, PM modulation, CSK modulation, FSK modulation, etc. The embodiment of the present application does not specifically limit this.

[0145] In this way, the first mobile phone can determine the corresponding modulation parameters based on the identification information of the LED lamp and control the LED lamp to modulate based on the modulation parameters. Different LED lamps correspond to different identification information, and the modulation parameters corresponding to the identification information of different LED lamps are also different. Consequently, the light signals emitted by different LED lamps have different signal characteristics.

[0146] It should be noted that, when the first mobile phone determines the corresponding modulation parameters based on the identification information of the LED lamp, the modulation parameters can be determined based on a pre-stored second correspondence between the identification information of the LED lamp and the modulation parameters and the identification information of the LED lamp. A preset model and / or preset algorithm can also be used to determine the modulation parameters corresponding to the identification information of the LED lamp. The embodiments of this application do not specifically limit the implementation method for determining the modulation parameters.

[0147] In order to allow the light signal emitted by the LED lamp to carry the identification information of the LED lamp, the first mobile phone can control each LED lamp to encode its corresponding identification information and load it into the emitted light signal, so that the identification information is carried in the visible light signal for transmission.

[0148] The identification information corresponding to the LED lamp may be unique information used to identify the identity of the LED lamp. The identification information corresponding to the LED lamp may include a preset value of the LED lamp, a MAC address of the LED lamp, a hardware number of the LED lamp, or a system-generated string, for example, one or more plaintext or encrypted information such as the international mobile equipment identity (IMEI), mobile equipment identifier (MEID), personal identification number (PIN), and device serial number (SN) corresponding to the LED lamp.

[0149] Because each LED lamp has unique identification information, the light signal it emits after performing modulation based on its own identification information also has unique signal characteristics. This allows the identification information of the corresponding LED lamp and the room it belongs to to be subsequently obtained based on the emitted light signal.

[0150] In some implementations of the present application, while the first mobile phone is controlling an LED lamp to perform a modulation task, the first mobile phone may store the corresponding relationship between the identification information of the LED lamp, the corresponding location of the LED lamp, and the modulation parameters of the light signal emitted by the LED lamp. It is understood that the modulation parameters of different light signals correspond one-to-one to the identification information of different LED lamps, and the identification information of different LED lamps may correspond to the same room or different locations. Certain mapping rules may exist between the above three, thereby establishing the above corresponding relationship.

[0151] In one implementation, the electronic device can store the corresponding relationship between the identification information of LED lamps, the corresponding locations of the LED lamps, and the light signals emitted by the LED lamps in the form of a mapping table. In a home environment, the corresponding locations of the LED lamps can include rooms, stairs, and corridors, etc., and the rooms can include the master bedroom, second bedroom, bathroom, kitchen, balcony, and study, etc.

[0152] For example, referring to Table 1, the identification information corresponding to LED lamp 1 is the SN number of LED lamp 1, the room corresponding to LED lamp 1 is Room A, and the modulation parameter of the light signal emitted by LED lamp 1 is Modulation Parameter A1, which carries the SN number of LED lamp 1. The identification information corresponding to LED lamp 2 is the SN number of LED lamp 2, the room corresponding to LED lamp 2 is Room A, and the modulation parameter of the light signal emitted by LED lamp 1 is Modulation Parameter A2, which carries the SN number of LED lamp 2. The identification information corresponding to LED lamp 3 is the SN number of LED lamp 3, the room corresponding to LED lamp 3 is Room B, and the modulation parameter of the light signal emitted by LED lamp 3 is Modulation Parameter A3, which carries the SN number of LED lamp 3. The identification information corresponding to LED lamp 4 is the SN number of LED lamp 4, the room corresponding to LED lamp 4 is Room C, and the modulation parameter of the light signal emitted by LED lamp 4 is Modulation Parameter A4, which carries the SN number of LED lamp 4.

[0153] It should be noted that to facilitate the management of the aforementioned LED lamp-related data, the smart home app can store the aforementioned LED lamp-related data in a corresponding data storage table. The data storage table can include multiple data rows and columns, and the data rows and columns can be used to present data such as the identification information of each LED lamp, the room to which the LED lamp corresponds, and the correspondence between the light signals emitted by the LED lamp. This embodiment of the application does not specifically limit the implementation method of storing the aforementioned LED lamp-related data.

[0154] Table 1

[0155] In some implementations of the present application, LED lamps can be used for indications and reminders in addition to lighting, such as LED indicator lamps. When the LED lamps are used for non-lighting purposes, changes in the light signals emitted by the LED lamps can be perceived by the human eye. LED lamps can adopt the same or different modulation methods as described above. That is to say, the LED lamps in the implementation of the present application can emit modulated light signals, and the modulated light signals may have different characteristic changes such as brightness, color, and stroboscopic. The modulated light signals may be perceptible to the human eye or not. And different modulation requirements can be set according to the different uses of the LED lamps.

[0156] In indoor scenes with more complex spatial environments, scene operators can also use applications in electronic devices to control the light signals modulated by LED lamps. Let's continue with the above-mentioned large shopping mall as an example. Scene operators can be managers of the shopping mall or shop owners of various stores. Mall managers and shop owners can use the mall's application to modulate the LED lamps installed indoors. It should be noted that multiple shopping malls can use the same or different applications to perform modulation tasks. The embodiments of the present application include but are not limited to using applications to perform modulation tasks. At the same time, the embodiments of the present application include but are not limited to modulation control within the indoor range, and can also control modulation within other ranges such as provinces, cities and administrative regions.

[0157] In one implementation, when a first mobile phone detects that a manager has associated LED lamps in each store, it can associate one or more LED lamps in each store with the store to which they belong. The first mobile phone can then control the LED lamps to encode and modulate their identification information into visible light signals, and store the corresponding relationship between the LED lamp identification information, the store to which the LED lamp belongs, and the light signal emitted by the LED lamp to a server.

[0158] In another possible implementation, when a first mobile phone detects a store associates LED lamps in a store, it can associate one or more LED lamps in the store with the store to which they belong. The first mobile phone can then control all LED lamps to encode and modulate their identification information into visible light signals, and store the corresponding relationship between the LED lamp identification information, the store to which they belong, and the light signal emitted by the LED lamps to a server. For details about the first mobile phone's association operations, controlling the LED lamps to perform modulation tasks, and storing the data, please refer to the above description and will not be repeated here.

[0159] As can be seen, the embodiments of the present application utilize visible light for communication, and indoor communication information will not be leaked outdoors, thus maintaining good confidentiality. Furthermore, indoor scenes typically contain a large number of visible light sources, and these sources illuminate for extended periods of time. In other words, communication can occur wherever visible light is available, meaning that optical signals carrying identification information relative to indoor locations are continuously emitted. This allows for subsequent indoor positioning and navigation processes, eliminating the need for tedious user operations and improving user convenience.

[0160] In some embodiments of the present application, after the first mobile phone controls the LED lamp to perform the modulation task, the second mobile phone can implement a positioning process based on the light signal emitted by the LED lamp.

[0161] In some embodiments of the present application, a second mobile phone receives an optical signal transmitted by an LED lamp, converts the optical signal into an electrical signal, and demodulates the electrical signal to obtain modulation parameters corresponding to the LED lamp. The modulation parameters corresponding to the LED lamp are then used to determine the identification information corresponding to the LED lamp. In other words, the demodulated electrical signal carries the identification information corresponding to the LED lamp, and the second mobile phone can determine the user's location based on the identification information corresponding to the LED lamp.

[0162] In this way, when the user moves indoors, the second mobile phone only needs to decode the received light signal and find the position of the corresponding LED lamp to obtain the user's indoor position.

[0163] In some embodiments of the present application, the optical signal is acquired by a sensor built into the second mobile phone, such as an ambient light sensor. The ambient light sensor can acquire the optical signal within a preset duration and analyze it. The preset duration can include 0.5 seconds, 1.0 seconds, 1.5 seconds, etc. The embodiments of the present application do not specifically limit the preset duration.

[0164] In some embodiments of the present application, when the user uses the second mobile phone normally and moves indoors, the user does not need to perform a series of complex operations on the second mobile phone. The ambient light sensor in the second mobile phone can obtain light signals and convert light signals into electrical signals without the user noticing. The second mobile phone then demodulates the electrical signals to obtain the positioning position. In addition, the ambient light sensor in the second mobile phone has a high sampling rate and can quickly collect light signals, so that subsequent signal analysis can be quickly performed. In this way, the time of the entire positioning process is shortened to achieve an efficient positioning process. At the same time, the ambient light sensor also has high measurement accuracy and low power consumption, which can improve the positioning accuracy of the entire positioning process without affecting the battery life of the second mobile phone.

[0165] In one implementation, the ambient light sensor of the second phone can automatically trigger the positioning process when the screen is on. That is, when the user is using the second phone, the second phone can detect the screen-on operation and control the ambient light sensor to acquire light signals and convert them into electrical signals, thus continuously performing the positioning process in the background. This allows the user to obtain the positioning location without any need for any positioning operations.

[0166] For example, in a home scenario, when a user uses a second mobile phone and moves to Room A, LED lamp 1 sends a light signal to the second mobile phone. The second mobile phone decodes the light signal sent by LED lamp 1 and obtains the identification information of LED lamp 1. It then finds the corresponding location of LED lamp 1, namely Room A. For another example, in a complex indoor environment, when a user uses a second mobile phone and moves to Store O, LED lamp 2 sends a light signal to the second mobile phone. The second mobile phone decodes the light signal sent by LED lamp 2 and obtains the identification information of LED lamp 2. It then finds the corresponding location of LED lamp 2, namely Store O.

[0167] In another possible implementation, the user can also control the ambient light sensor to perform the positioning process. For example, the user can turn on or off the automatic positioning function corresponding to the ambient light sensor. The second mobile phone detects the activation operation of the automatic positioning function and controls the ambient light sensor to obtain the light signal and convert the light signal into an electrical signal, thereby triggering the positioning process after detecting the user's operation. The embodiments of this application do not limit the specific implementation method of triggering the positioning process.

[0168] It should be noted that the method for demodulating the visible light signal may include demodulating the visible light signal using an on-off keying demodulation method, or demodulating the visible light signal using a pulse position demodulation method, or demodulating the visible light signal using a multi-carrier demodulation method. This is not specifically limited in the embodiments of the present application.

[0169] In some embodiments of the present application, multiple LED lamps are typically installed indoors. Because LED lamps, as lighting sources, are always on when in use, they repeatedly send light signals. In this way, the second mobile phone will receive multiple light signals simultaneously. Therefore, the second mobile phone needs to filter out the light signal emitted by the LED lamp closest to the user from the multiple light signals received. In other words, based on the principle that the closer the distance, the greater the signal strength, the light signal with the greatest intensity that is filtered out is the light signal emitted by the LED lamp closest to the user. Then, based on this signal, the specific LED lamp is determined, thereby determining the user's indoor location.

[0170] Specifically, after receiving at least one optical signal, the second mobile phone first converts the optical signal into an electrical signal. Next, it extracts signal components from the electrical signal, each corresponding to a different LED lamp. The signal components are then sorted by signal strength from highest to lowest, and the signal component with the highest signal strength is determined as the target electrical signal. The target electrical signal corresponds to the optical signal emitted by the LED lamp closest to the user.

[0171] In some embodiments of the present application, in the process of determining the LED lamp closest to the user, the second mobile phone can pre-process the received multiple light signals after receiving the multiple light signals to obtain light signals that appear repeatedly within a certain period of time.

[0172] In one implementation, the second mobile phone can exclude single-occurring light signals from multiple light signals. Because LED lamps continuously emit light signals, single-occurring light signals are likely received by the second mobile phone due to unexpected circumstances such as reflection. This eliminates abnormal light signals caused by these unexpected circumstances.

[0173] In another implementation, the second mobile phone detects the time interval between two consecutive occurrences of the same light signal among multiple optical signals and excludes those with different time intervals. Because there is a time interval between two light signals emitted by LED lamps, and the time intervals of each LED lamp are equal, if the time intervals between two occurrences of the same light signal are different, it indicates that the light signal is abnormal. This can then be excluded, improving the efficiency and accuracy of target light signal screening.

[0174] In some embodiments of the present application, the time at which indoor LED lamps initially emit light signals can be arranged in a sequential order. In other words, the LED lamps periodically emit light signals carrying identification information, and each light signal emission is separated by a specific time interval. Different LED lamps may emit light signals at different times. Even if the time intervals are equal, the time at which each light signal is emitted will also be different. This prevents spatial overlap between light signals, preventing signal reception conflicts. This prevents overlap between light signals emitted by two or more LED lamps.

[0175] In some embodiments of the present application, indoor LED lamps may not have a sequential order for the initial emission of light signals. If different LED lamps initially emit light signals at the same time and emit them synchronously, resulting in overlapping signals, a second mobile phone can separate the overlapping multiple light signals based on their respective signal characteristics to facilitate subsequent conversion of the light signals into electrical signals. This avoids conflicts between light signals from LED lamps with different initial emission times.

[0176] In some embodiments of the present application, after determining the light signal emitted by the LED lamp closest to the user, the second mobile phone decodes the signal component with the highest signal strength to obtain the identification information corresponding to the LED lamp. The second mobile phone then obtains the location based on the identification information corresponding to the LED lamp.

[0177] In a home scenario, as some examples, the second mobile phone can use the mapping table pre-stored in the smart home APP to obtain the positioning position. Among them, the mapping table includes a first correspondence between the identification information of the LED lamp and the room corresponding to the LED lamp. Specifically, the second mobile phone decodes the signal component with the largest signal strength to obtain the identification information corresponding to the LED lamp. Afterwards, the corresponding room can be found in the mapping table based on the identification information corresponding to the LED lamp. Then, the positioning position of the user can be determined according to the room to which the LED lamp belongs. In other words, by finding the corresponding room according to the identification information corresponding to the LED lamp, the location of the LED lamp can be determined, and the location of the second mobile phone that receives the light signal emitted by the LED lamp and the user carrying the second mobile phone can also be known.

[0178] For example, referring to Table 1 above, after decoding, the second mobile phone obtains the SN number of LED lamp 1. According to the pre-stored mapping table, the room corresponding to the SN number of LED lamp 1 is Room A. For another example, after decoding, the second mobile phone obtains the SN number of LED lamp 3. According to the pre-stored mapping table, the room corresponding to the SN number of LED lamp 3 is Room C.

[0179] In an indoor scenario with a relatively complex spatial environment, such as a shopping mall, the second mobile phone can use the mall's corresponding application to retrieve a pre-stored mapping table from the server to obtain the location. Alternatively, the second mobile phone can retrieve a pre-stored mapping table from the server to obtain the location when it detects a connection to the mall's corresponding wireless local area network. The mapping table includes a first correspondence between the identification information of the LED lamp and the store to which the LED lamp belongs. In other words, the second mobile phone can locate the corresponding store based on the identification information corresponding to the LED lamp, thereby determining the location of the LED lamp and the location of the second mobile phone that receives the light signal from the LED lamp and the user carrying the second mobile phone.

[0180] As can be seen, the positioning method provided by the embodiments of the present application does not require a camera to capture images or perform complex positioning calculations, and can obtain the position without the user having to operate the second mobile phone. Positioning is fast and is less susceptible to interference. Furthermore, each LED lamp has a unique corresponding identification information, allowing the second mobile phone to accurately determine the location of each LED lamp during the positioning process, improving the accuracy of the positioning process.

[0181] In some embodiments of the present application, after obtaining the positioning location, the second mobile phone can make corresponding prompts or linkage operations based on the positioning location.

[0182] In one implementation, in a home scenario, if the second mobile phone locates Room A based on the identification information of LED lamp 1, a location prompt message can be displayed to indicate that the current location is Room A. In an indoor scenario with a more complex spatial environment, if the second mobile phone locates Store B based on the identification information of LED lamp 2, a location prompt message can also be displayed to indicate that the current location is Store B.

[0183] For example, referring to (A) in FIG7 , after the user moves to room A, the second mobile phone obtains the identification information corresponding to the LED lamp 1 based on the light signal emitted by the LED lamp 1. Then, the second mobile phone obtains the positioning position of the LED lamp 1 based on the identification information corresponding to the LED lamp 1, and displays the corresponding position prompt information. In one implementation method, the second mobile phone can display the position prompt information on the main screen. Referring to (B) in FIG7 , the second mobile phone can display a position prompt control on the main screen. The position prompt control can be implemented as the text "Current location is in room A". In another implementation method, the second mobile phone can also display a position prompt control in a drop-down menu bar or a negative one screen.

[0184] As another example, referring to Figure 8 (A), after a user moves to Store B in a shopping mall, a second mobile phone obtains the identification information corresponding to LED lamp 2 based on the light signal emitted by LED lamp 2. The second mobile phone then determines the location of LED lamp 2 based on the identification information and displays the corresponding location prompt information. Similarly, the second mobile phone can display location prompt information on the screen. Referring to Figure 8 (B), the second mobile phone can display a location prompt control on the home screen. The location prompt control can be implemented as the text "Current location is Store B."

[0185] In another possible implementation, the second mobile phone determines that the location is Room A based on the identification information of LED lamp 1 and can display first service information, which prompts whether to control other associated electronic devices in Room A to perform a corresponding task. Then, after detecting the user's operation on the service prompt information, the second mobile phone can trigger the other associated electronic devices in Room A to perform the corresponding task.

[0186] For example, referring to (A) in Figure 9 , after a user moves to room A, a second mobile phone obtains identification information corresponding to LED lamp 1 based on the light signal emitted by LED lamp 1. The second mobile phone then determines the location of LED lamp 1, such as room A, based on the identification information. The second mobile phone can then identify electronic devices associated with room A and display the first service information corresponding to the electronic devices.

[0187] Referring to (B) in Figure 9, the first service information can be implemented in the form of a service card. For example, the electronic device associated with room A is a smart speaker. The second mobile phone can find the smart speaker service card 901 on the screen. The smart speaker service card 901 can display information corresponding to the smart speaker bound to the smart home APP (such as the icon corresponding to the smart speaker, the switch control corresponding to the smart speaker, the song playback information corresponding to the smart speaker, and the working time information corresponding to the smart speaker, etc.). The smart speaker service card 901 can be used to trigger the second mobile phone to jump to display the control interface for controlling the smart speaker. The user can click on the switch control in the smart speaker service card 901, and the second mobile phone detects the click operation on the switch control and controls the smart speaker to play the corresponding music. The user can also click on the smart speaker service card 901 to trigger the control interface for controlling the smart speaker. Then, in the control interface of the smart speaker, the smart speaker is controlled to perform the task of playing music.

[0188] In another possible implementation, the second mobile phone can locate the user's location in real time and control the flow of services between multiple electronic devices based on the location. It is understood that during the flow of services between multiple electronic devices, the multiple electronic devices can be the same device or different devices with the same functions. For example, the multiple electronic devices can all have the functions of playing audio, playing video, and displaying documents.

[0189] For example, if the second phone determines that the location is Room A based on the identification information of LED lamp 1, it can trigger the smart speaker in Room A to play Music A. Then, when the user moves from Room A to Room B, the second phone can determine that the location is Room B based on the identification information of LED lamp 2 and trigger the smart speaker in Room B to continue playing Music A. This allows for the functionality of music following the user's movements and music flow / continuation.

[0190] In another possible implementation, the second mobile phone determines that the location obtained based on the identification information of LED lamp 1 is room A, and can display a device list including one or more electronic devices in room A. Then, after detecting a user operation on the device list, the second mobile phone can control the electronic devices in the device list to perform corresponding tasks.

[0191] For example, referring to (A) in FIG10 , after the user moves to room A, the second mobile phone obtains the location of the LED lamp 1, such as room A, based on the light signal emitted by the LED lamp 1. The second mobile phone can determine the electronic devices associated with room A based on room A, and display a device list on the screen, in which the electronic devices in room A are displayed. Referring to (B) in FIG10 , the device list 1001 includes controls corresponding to the smart speaker, controls corresponding to the smart humidifier, and controls corresponding to the smart desk lamp. The device list 1001 can be used to trigger the second mobile phone to jump to display the control interface for controlling the electronic devices in room A. For example, the user clicks on the control corresponding to the smart humidifier, and the second mobile phone detects the click on the control corresponding to the smart humidifier and displays the control interface corresponding to the smart humidifier. The user can then control the smart humidifier to perform corresponding tasks on the control interface corresponding to the smart humidifier.

[0192] In another possible implementation, in a complex indoor environment, a second mobile phone can obtain identification information corresponding to the LED lamp based on the light signal emitted by the LED lamp. The second mobile phone then determines the location based on this identification information and displays a second service message indicating whether to jump to the target application corresponding to the location. Target applications can include navigation apps, instant messaging apps, calendar apps, and memo apps, among others.

[0193] Then, after detecting the triggering operation on the second service information, the second mobile phone calls the interface of the target application and jumps to the target application to display the target interface corresponding to the positioning position through the target application.

[0194] For example, referring to (A) in FIG11 , after the user moves to store B in a shopping mall, the second mobile phone obtains the location of LED lamp 2, such as store B, based on the light signal emitted by LED lamp 2, and displays the corresponding second service information. Referring to (B) in FIG11 , the second service information may include a location control 1101 corresponding to the location, a geographic control 1102 corresponding to the geographic location, and a navigation control 1103 corresponding to the navigation application. Location control 1101 is used to indicate the current location of the shopping mall, and geographic control 1102 is used to indicate the geographic location corresponding to the location. Navigation control 1103 is used to trigger the second mobile phone to jump to display the navigation interface corresponding to the location.

[0195] For example, if the user wants to move to another location, he or she can click on the navigation control 1103 to trigger a jump to the navigation application. The second mobile phone detects the click operation on the navigation control 1103, can jump to the navigation application and display the navigation interface corresponding to the positioning position. Referring to (C) in Figure 11, the navigation interface may include a start control 1104 and a destination control 1105. The start control 1104 is used to display the positioning position, and the destination control 1105 is used to display the destination position. This allows the user to navigate directly based on the positioning position obtained by the second mobile phone.

[0196] Based on the above, the embodiment of the present application can directly use the light signal emitted by the LED lamp to carry the identification information relative to the indoor position, and hide the identification information corresponding to the LED lamp. Then, the ambient light sensor of the second mobile phone can be cleverly used to receive the light signal and parse the identification information corresponding to the LED lamp to obtain the position information corresponding to the LED lamp. Then, the position information corresponding to the user is obtained to realize the positioning process. The user does not need to perform tedious operations, and the positioning process is simple. At the same time, in the process of analyzing the light signal, there is no need for complex algorithm processing. The ambient light sensor has low power consumption, high sampling rate and accuracy, high recognition accuracy, and can save power consumption of electronic equipment.

[0197] Furthermore, the second mobile phone can further interact with other electronic devices based on location information, enabling them to perform corresponding tasks. This can provide users with humanized features such as voice tracking and service transfer / continuation, making interactions more natural and streamlined, and enhancing the user experience.

[0198] FIG12 is an interactive diagram of a positioning method provided in an embodiment of the present application, which includes:

[0199] S1201: A first electronic device modulates an optical signal based on a first modulation parameter to obtain a first target optical signal; and emits the modulated first target optical signal.

[0200] In some embodiments of the present application, the first electronic device may be the LED lamp in the above example, and the number of the first electronic device may be one or more.

[0201] That is, the LED lamp can modulate the light signal based on the first modulation parameter to obtain the first target light signal; and emit the modulated first target light signal.

[0202] S1202: The second electronic device receives a first target optical signal and demodulates the first target optical signal to obtain a first modulation parameter.

[0203] S1203: The second electronic device obtains identification information of the first electronic device according to the first modulation parameter.

[0204] In some embodiments of the present application, the second electronic device may be a mobile phone used by the user in the above example, and the number of the second electronic devices may be one or more.

[0205] The second electronic device stores a second correspondence between the identification information of the first electronic device and the first modulation parameter. Thus, the second electronic device can obtain the identification information of the first electronic device based on the second correspondence and the first modulation parameter.

[0206] That is, after receiving the first target light signal, the mobile phone can demodulate the first target light signal in advance to obtain the first modulation parameter, and then obtain the identification information corresponding to the LED lamp based on the second corresponding relationship and the first modulation parameter.

[0207] S1204: The second electronic device determines a first location of the second electronic device according to the identification information of the first electronic device.

[0208] In some embodiments of the present application, a second electronic device stores a first correspondence between the identification information of the first electronic device and the location information. Thus, the second electronic device can determine the location information corresponding to the first electronic device based on the first correspondence and the identification information of the first electronic device. The second electronic device can then determine the first location of the second electronic device based on the location information corresponding to the first electronic device.

[0209] In other words, after obtaining the identification information corresponding to the LED lamp, the mobile phone can determine the location information corresponding to the LED lamp based on the first correspondence and the identification information corresponding to the LED lamp. The mobile phone can then determine the first location of the mobile phone based on the location information corresponding to the LED lamp. It is understandable that the location information corresponding to the LED lamp is equivalent to the first location of the mobile phone. In this way, the mobile phone can also determine the first location of the mobile phone based on the first correspondence and the identification information corresponding to the LED lamp.

[0210] In some embodiments of the present application, the first positioning location may be a location within a certain spatial range. For example, if the location information corresponding to the LED lamp is Room A, then the first positioning location is also Room A. For another example, if the location information corresponding to the LED lamp is Room A, the first positioning location may be a location within Room A that is a certain distance away from the LED lamp.

[0211] As shown in FIG13 , it is a schematic diagram of a process of a second electronic device receiving a first target optical signal provided by an embodiment of the present application.

[0212] S1301: A second electronic device receives at least one group of first optical signals within a preset time period; different groups of first optical signals are sent by different first electronic devices.

[0213] S1302: The second electronic device obtains at least one group of second optical signals from at least one group of first optical signals, where each group of second optical signals includes at least two optical signals that appear repeatedly.

[0214] S1303: The second electronic device obtains at least one group of third optical signals from the at least one group of second optical signals, wherein the time interval between two adjacent occurrences of optical signals in each group of third optical signals is the same.

[0215] S1304: The second electronic device converts each group of third optical signals into a corresponding electrical signal, obtains the signal strength of each electrical signal, and determines the third optical signal corresponding to the electrical signal with the largest signal strength as the first target optical signal.

[0216] In some embodiments of the present application, a second electronic device can receive multiple optical signals from different devices within a preset duration. For ease of description, a single set of optical signals will be used as an example. After receiving at least one set of first optical signals within the preset duration, the second electronic device can derive at least one set of second optical signals from the at least one set of first optical signals, with each set of second optical signals comprising at least two repeating optical signals. In other words, after receiving multiple sets of optical signals, the mobile phone can exclude optical signals that appear only once.

[0217] Next, the second electronic device obtains at least one third optical signal from the at least one second optical signal. Within each third optical signal, the time interval between two adjacent optical signals is identical. The second device then converts each third optical signal into a corresponding electrical signal, obtains the signal strength of each electrical signal, and identifies the third optical signal corresponding to the electrical signal with the highest signal strength as the first target optical signal. In other words, after receiving multiple optical signals, the mobile phone can exclude optical signals with different time intervals between two adjacent optical signals. The mobile phone then performs photoelectric conversion and identifies the optical signal corresponding to the electrical signal with the highest signal strength as the first target optical signal.

[0218] In some embodiments of the present application, after determining a first location, the second electronic device may determine a first linkage device based on the first location. The first linkage device is a device associated with the first location. Subsequently, the second electronic device detects a first trigger operation and sends a first trigger instruction to the first linkage device, instructing the first linkage device to execute a first task.

[0219] Furthermore, the second electronic device may further display the first linkage device and at least one function identifier corresponding to the first linkage device. A user may trigger the function identifier corresponding to the first linkage device. The second electronic device detects the triggering operation on the function identifier and sends a first trigger instruction to the first linkage device, causing the first linkage device to execute a first task corresponding to the function identifier.

[0220] For example, when the location information of the LED lamp is room A, the first positioning location is room A. The mobile phone can find the first smart speaker in room A. The user can control the first smart speaker to play the first song through the mobile phone.

[0221] In some embodiments of the present application, the second electronic device may also receive a second target optical signal, which is modulated by another first electronic device based on a second modulation parameter. Similarly, the second electronic device demodulates the second target optical signal to obtain the second modulation parameter. Next, the second electronic device obtains identification information of the other first electronic device based on the second modulation parameter. The second electronic device then determines a second location of the second electronic device based on the identification information of the other first electronic device. It is understood that the second location is different from the first location described above.

[0222] The second electronic device sends a second trigger instruction to the second linkage device based on the second positioning location. The second linkage device is a device associated with the second positioning location. The second trigger instruction is used to instruct the second linkage device to execute the first task.

[0223] For example, the first location is Room A, and the phone controls the first smart speaker to play the first song. When the user moves, the location of another LED lamp is Room B. The phone then determines the second location is Room B, locates the second smart speaker in Room B, and controls it to continue playing the first song. This enables the first task transfer / continuation function, such as audio following the user's movement and music transfer / continuation.

[0224] In some embodiments of the present application, after sending the second trigger instruction to the second linkage device, the second electronic device sends a third trigger instruction to the first linkage device, wherein the third trigger instruction is used to instruct the first linkage device to stop executing the first task.

[0225] That is, after the mobile phone controls the second smart speaker to continue playing the first song, it can control the first smart speaker to stop playing the first song. This can further improve the flow / continuation process of achieving the first task and provide users with a better experience.

[0226] For other contents of this example, please refer to the relevant descriptions in other examples above, which will not be repeated here.

[0227] An embodiment of the present application also provides an electronic device, such as the above-mentioned mobile phone. As shown in FIG14 , the electronic device may include one or more processors 1001 , a memory 1002 and a communication interface 1003 .

[0228] The memory 1002 and the communication interface 1003 are coupled to the processor 1001. For example, the memory 1002, the communication interface 1003 and the processor 1001 may be coupled together via the communication interface 1004.

[0229] The communication interface 1003 is used to transmit data with other devices. The memory 1002 stores computer program code. The computer program code includes computer instructions. When the computer instructions are executed by the processor 1001, the wearable device executes the method of the embodiment of the present application.

[0230] The processor 1001 may be a processor or a controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0231] The communication interface 1004 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication interface 1004 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, FIG14 shows only one thick line, but this does not imply that there is only one bus or only one type of bus.

[0232] An embodiment of the present application further provides a positioning system, which includes a sending device and a receiving device. The positioning system can execute the relevant method steps in the above method embodiment.

[0233] An embodiment of the present application further provides a computer-readable storage medium, in which computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the above method embodiment.

[0234] An embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the relevant method steps in the above method embodiment.

[0235] Among them, the electronic device, positioning system, computer storage medium or computer program product provided in this application is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0236] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0237] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0238] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, located in one place or distributed across multiple locations. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0239] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0240] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the contributing part or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0241] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A positioning method, characterized in that: Applied to a receiving device, the method comprises: receiving a first target optical signal, where the first target optical signal is modulated by a first sending device based on a first modulation parameter; Demodulating the first target optical signal to obtain the first modulation parameter; Obtaining identification information of the first sending device according to the first modulation parameter; A first positioning position of a receiving device is determined according to the identification information of the first sending device.

2. The method according to claim 1, characterized in that The method further comprises: Determine a first linkage device according to the first positioning position; the first linkage device is a device associated with the first positioning position; A first trigger operation is detected, and a first trigger instruction is sent to the first linkage device, where the first trigger instruction is used to instruct the first linkage device to execute a first task.

3. The method according to claim 2, characterized in that The method further comprises: Displaying the first linkage device and at least one function identifier corresponding to the first linkage device; The detecting a first trigger operation and sending a first trigger instruction to the first linkage device includes: A trigger operation for the function identifier is detected, and a first trigger instruction is sent to the first linkage device, so that the first linkage device executes the first task corresponding to the function identifier.

4. The method according to claim 2 or 3, characterized in that: There is a first corresponding relationship between the identification information of the sending device and the position information, and determining the first positioning position of the receiving device according to the identification information of the first sending device includes: Determine, according to the first corresponding relationship and the identification information of the first sending device, the location information corresponding to the first sending device; The first positioning position of the receiving device is determined according to the position information corresponding to the first sending device.

5. The method according to claim 4, characterized in that The method further comprises: receiving a second target optical signal, where the second target optical signal is modulated by a second sending device based on a second modulation parameter; Demodulating the second target optical signal to obtain the second modulation parameter; Obtaining identification information of the second sending device according to the second modulation parameter; Determine a second positioning position of the receiving device according to the identification information of the second sending device; the second positioning position is different from the first positioning position; According to the second positioning position, a second trigger instruction is sent to a second linkage device; the second linkage device is a device associated with the second positioning position, and the second trigger instruction is used to instruct the second linkage device to execute the first task.

6. The method according to claim 5, characterized in that The method further comprises: After sending the second trigger instruction to the second linkage device, sending a third trigger instruction to the first linkage device; the third trigger instruction is used to instruct the first linkage device to stop executing the first task.

7. The method according to any one of claims 1 to 6, characterized in that: The receiving a first target optical signal comprises: receiving at least one group of first optical signals within a preset time period; different groups of the first optical signals are sent by different sending devices; Obtaining at least one group of second optical signals from the at least one group of first optical signals, each group of the second optical signals comprising at least two optical signals that appear repeatedly; The first target light signal is determined based on the at least one set of second light signals.

8. The method according to claim 7, characterized in that The determining the first target optical signal based on the at least one second optical signal comprises: Obtain at least one group of third optical signals from the at least one group of second optical signals, wherein the time interval between two adjacent occurrences of optical signals in each group of the third optical signals is the same; Convert each group of the third optical signals into corresponding electrical signals; The signal strength of each of the electrical signals is acquired, and the third optical signal corresponding to the electrical signal with the largest signal strength is determined as the first target optical signal.

9. The method according to any one of claims 1 to 8, characterized in that: There is a second corresponding relationship between the identification information of the sending device and the modulation parameter; and obtaining the identification information of the first sending device according to the first modulation parameter includes: Obtaining identification information of the first sending device according to the second corresponding relationship and the first modulation parameter; The modulation parameters include one or more of a light intensity parameter, a color temperature parameter, a color parameter, a spectral power distribution parameter or a high-frequency flicker frequency parameter.

10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: Output location prompt information; The position prompt information is used to prompt the first positioning position, and the position prompt information includes one or more of text prompt information, voice prompt information and video prompt information.

11. A positioning method, characterized in that: Applied to a first issuing device, the method comprises: Modulating the optical signal based on a first modulation parameter to obtain a first target optical signal; The first target optical signal after modulation is emitted; the first target optical signal after modulation is used by a receiving device to obtain identification information of a first emitting device according to the first modulation parameter, and to determine a first positioning position of a receiving device according to the identification information of the first emitting device.

12. A positioning system, characterized in that: The positioning system includes a sending device and a receiving device; The sending device is configured to modulate the optical signal based on a first modulation parameter to obtain a first target optical signal; The emitting device is further configured to emit the modulated first target optical signal; The receiving device is configured to receive the first target optical signal; The receiving device is further configured to demodulate the first target optical signal to obtain the first modulation parameter; The receiving device is further configured to obtain identification information of the sending device according to the first modulation parameter; The receiving device is also configured to determine a first positioning position of the receiving device according to the identification information of the sending device.

13. An electronic device, characterized in that: The electronic device includes a memory and one or more processors; the memory is coupled to the processor; wherein the memory stores a computer program code, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the positioning method as described in any one of claims 1 to 10, or the positioning method as described in claim 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer can execute the positioning method according to any one of claims 1 to 10, or the positioning method according to claim 11.

Citation Information

Patent Citations

  • LED array imaging positioning system employing color temperature modulation

    CN105471500A

  • Method and system for cooperative work of visible light positioning and bluetooth communication

    CN105979472A

  • Visible light-based positioning method and system, and mobile terminal

    CN106483527A

  • Positioning method, device and system based on visible light communication

    CN107105408A

  • Positioning method based on visible light communication system, transmitter and receiver

    CN108663656A

Cited By

  • Information sending method, identification method and related system of unmanned aerial vehicle

    CN121096180A