Measurement method, system and related device

By determining unique time and frequency offsets based on device identification in electronic devices, the problem of signal interference when multiple electronic devices are measured in the same scenario is solved, and high-accurate depth measurement is achieved.

CN119861377APending Publication Date: 2025-04-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311371393.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the same scenario, when multiple electronic devices emit light signals at the same time, the signals will interfere with each other, affecting the accuracy of measurement.

Method used

By determining different time and frequency offsets in each electronic device based on its unique device identification, each electronic device operates at different times and frequencies, thereby avoiding signal interference.

Benefits of technology

It is realized that when multiple electronic devices simultaneously measure the depth of the target object in the same scenario, avoid signal interference and improve measurement accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119861377A_ABST
    Figure CN119861377A_ABST
Patent Text Reader

Abstract

The invention discloses a measurement method, a measurement system and a related device. The electronic equipment comprises a first time of flight (TOF) module. The method comprises: determining a first moment based on a first device identifier of the electronic device; at the first moment, controlling the first TOF module to transmit a first signal; the first TOF module is controlled to receive a second signal, and a second moment when the second signal is received is recorded, and the second signal is a signal obtained after the first signal is reflected by the target object; and determining a first distance between the electronic equipment and the target object based on the first moment and the second moment. Therefore, the working time of each electronic device is different, and mutual interference can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a measurement method, system and related devices. Background Art

[0002] With the continuous development of communication technology, more and more electronic devices are equipped with devices for measuring distance, such as time of flight (TOF) cameras, etc. Electronic devices can use these devices to transmit light signals to target objects. According to the time difference between the time when the light signal reflected by the target object is received and the time when it is transmitted, the electronic device can determine the distance between the electronic device and the target object, or determine the depth of the target scene.

[0003] However, in the same scenario, if electronic device A and electronic device B simultaneously transmit the same type of optical signal, the optical signal emitted by electronic device A will be received by electronic device B after being reflected by the target object, which will interfere with the measurement of electronic device B. Similarly, the optical signal emitted by electronic device B will also interfere with electronic device A. Summary of the invention

[0004] The present application provides a measurement method, system and related devices, which enable multiple electronic devices to measure the depth of a target object in the same scene and avoid mutual interference between signals emitted by different electronic devices.

[0005] In a first aspect, the present application provides a measurement method, which is applied to an electronic device, wherein the electronic device includes a first time-of-flight TOF module; the method includes: determining a first moment based on a first device identifier of the electronic device; at the first moment, controlling the first TOF module to transmit a first signal; controlling the first TOF module to receive a second signal, and recording a second moment when the second signal is received, wherein the second signal is a signal after the first signal is reflected by a target object; and determining a first distance between the electronic device and the target object based on the first moment and the second moment.

[0006] In this way, different electronic devices can work at different times, and mutual interference between signals transmitted by different electronic devices can be avoided.

[0007] In one possible implementation, determining the first moment based on the first device identifier of the electronic device specifically includes: determining a first time offset based on the first device identifier, the first time offset being used to indicate the time interval between the first moment and a preset standard transmission moment; determining the first moment based on the first time offset and the standard transmission moment.

[0008] In this way, each electronic device may correspond to a different time offset, so that the working time of different electronic devices is different.

[0009] In a possible implementation manner, the method further includes: determining a first frequency based on a first device identifier of the electronic device, where the first frequency is a modulation frequency of the first signal.

[0010] In this way, the electronic device can modulate the transmission signal and transmit the signal at a specified modulation frequency (ie, the first frequency). Different electronic devices can correspond to different modulation frequencies, which can avoid mutual interference between signals transmitted by different electronic devices.

[0011] Moreover, different electronic devices may correspond to different transmission times and modulation frequencies, so that more electronic devices can work in the same scenario. It should be noted that in the present application, the first signal is transmitted after being modulated, so the modulation frequency of the first signal refers to the frequency of the first signal actually transmitted by the electronic device, which can also be called the transmission frequency of the first signal.

[0012] In one possible implementation, determining the first frequency based on a first device identifier of the electronic device specifically includes: determining a first frequency offset based on the first device identifier, the first frequency offset being used to indicate a frequency difference between the first frequency and a preset transmission frequency; and determining the first frequency based on the first frequency offset and the preset transmission frequency.

[0013] In this way, different electronic devices can work at different times, and mutual interference between signals transmitted by different electronic devices can be avoided. Moreover, different electronic devices can correspond to different transmission times and transmission frequencies, so that more electronic devices can work in the same scene.

[0014] In a second aspect, the present application provides another measurement method, which is applied to an electronic device, wherein the electronic device includes a first TOF module; the method includes: determining a first frequency based on a first device identifier of the electronic device; at a first moment, controlling the first TOF module to transmit a first signal, wherein the modulation frequency of the first signal is the first frequency; controlling the first TOF module to receive a second signal, and recording a second moment of receiving the second signal, wherein the second signal is a signal after the first signal is reflected by the target object; determining a first distance between the electronic device and the target object based on the first moment and the second moment.

[0015] In this way, the electronic device can modulate the transmission signal and transmit the signal at a preset transmission frequency. Different electronic devices can correspond to different frequencies, which can avoid mutual interference between signals transmitted by different electronic devices.

[0016] In one possible implementation, determining the first frequency based on a first device identifier of the electronic device specifically includes: determining a first frequency offset based on the first device identifier, the first frequency offset being used to indicate a frequency difference between the first frequency and a preset transmission frequency; and determining the first frequency based on the first frequency offset and the transmission frequency.

[0017] In this way, each electronic device may correspond to a different frequency offset, so that the frequencies of signals transmitted by different electronic devices are different.

[0018] In a third aspect, the present application provides another measurement method, which is applied to an electronic device, wherein the electronic device includes a first TOF module; the method includes: determining a first frequency based on a first device identifier of the electronic device; controlling the first TOF module to transmit a first signal, wherein the modulation frequency of the first signal is the first frequency; controlling the first TOF module to receive a second signal, and determining a first phase difference between the second signal and the first signal, wherein the second signal is a signal after the first signal is reflected by the target object; determining a first distance between the electronic device and the target object based on the first frequency and the first phase difference.

[0019] In this way, the electronic device can also determine the distance to the target object based on the phase difference between the transmitted signal and the reflected signal.

[0020] In one possible implementation, determining the first frequency based on a first device identifier of the electronic device specifically includes: determining a first frequency offset based on the first device identifier, the first frequency offset being used to indicate a frequency difference between the first frequency and a preset transmission frequency; and determining the first frequency based on the first frequency offset and the transmission frequency.

[0021] In this way, each electronic device may correspond to a different frequency offset, so that the frequencies of signals transmitted by different electronic devices are different.

[0022] In a possible implementation manner, the method further includes: determining a first moment based on a first device identifier of the electronic device, the first moment being a moment of transmitting the first signal.

[0023] In this way, different electronic devices can work at different times, and mutual interference between signals transmitted by different electronic devices can be avoided. Moreover, different electronic devices can correspond to different transmission times and transmission frequencies, so that more electronic devices can work in the same scene.

[0024] In one possible implementation, determining the first moment based on the first device identifier of the electronic device specifically includes: determining a first time offset based on the first device identifier, the first time offset being used to indicate the time interval between the first moment and a preset standard transmission moment; determining the first moment based on the first time offset and the standard transmission moment.

[0025] In this way, each electronic device may correspond to a different time offset, so that the working time of different electronic devices is different.

[0026] In a fourth aspect, the present application provides another measurement method, which is applied to an electronic device, wherein the electronic device includes a first TOF module; the method includes: determining a first moment based on a first device identifier of the electronic device; at the first moment, controlling the first TOF module to transmit a first signal; controlling the first TOF module to receive a second signal, and determining a first phase difference between the second signal and the first signal, wherein the second signal is a signal after the first signal is reflected by the target object; determining a first distance between the electronic device and the target object based on the first frequency and the first phase difference.

[0027] In this way, the electronic device can also determine the distance to the target object based on the phase difference between the transmitted signal and the reflected signal.

[0028] In one possible implementation, determining the first moment based on the first device identifier of the electronic device specifically includes: determining a first time offset based on the first device identifier, the first time offset being used to indicate the time interval between the first moment and a preset standard transmission moment; determining the first moment based on the first time offset and the standard transmission moment.

[0029] In this way, each electronic device may correspond to a different time offset, so that the working time of different electronic devices is different.

[0030] In a fifth aspect, the present application provides another measurement method, which is applied to a router, wherein a first communication connection is established between the router and a first electronic device, and a second communication connection is established between the router and a second electronic device; the method includes: obtaining a first device identification of the first electronic device; determining a first working instruction based on the first device identification, the first working instruction being used to indicate a first moment and / or a first frequency, the first moment being the moment when the first electronic device transmits a first signal, and the first frequency being the modulation frequency of the first signal; sending the first working instruction to the first electronic device through the first communication connection; obtaining a second device identification of the second electronic device; determining a second working instruction based on the second device identification, the second working instruction being used to indicate a third moment and / or a second frequency, the third moment being the moment when the second electronic device transmits a third signal, and the second frequency being the modulation frequency of the third signal; sending the second working instruction to the second electronic device through the second communication connection.

[0031] In this way, a working instruction can be sent to the electronic device through the router, indicating the transmission time and transmission frequency of the electronic device.

[0032] In another possible implementation, the router may also be replaced by other electronic devices.

[0033] In one possible implementation, the first working instruction includes a first time offset and / or a first frequency offset, the first time offset indicates the time interval between a first moment and a preset standard transmission moment, and the first frequency offset is the frequency difference between the first frequency and the preset transmission frequency; the second working instruction includes a second time offset and / or a second frequency offset, the second time offset indicates the time interval between a third moment and the preset standard transmission moment, and the second frequency offset is the frequency difference between the second frequency and the preset transmission frequency.

[0034] In a possible implementation, the first working instruction includes a first time and / or a first frequency; the second working instruction includes a third time and / or a second frequency.

[0035] In a sixth aspect, the present application provides a measurement system, including a router, a first electronic device, and a second electronic device; the first electronic device includes a first time-of-flight TOF module, and the second electronic device includes a second TOF module; the router establishes a first communication connection with the first electronic device, and the router establishes a second communication connection with the second electronic device; wherein:

[0036] The router is used to obtain a first device identifier and a second device identifier, the first device identifier is used to identify the first electronic device, and the second device identifier is used to identify the second electronic device; the router is also used to determine a first working instruction based on the first device identifier, the first working instruction is used to indicate a first moment and / or a first frequency, the first moment is the moment when the first electronic device controls the first TOF module to transmit a first signal to the target object, and the first frequency is the modulation frequency of the first signal; the router is also used to send the first working instruction to the first electronic device based on the first communication connection; the router is also used to determine a second working instruction based on the second device identifier, the second working instruction is used to indicate a third moment and a second frequency, the third moment is the moment when the second electronic device controls the second TOF module to transmit a third signal to the target object, and the second frequency is the modulation frequency of the third signal; the router is also used to send the second working instruction to the second electronic device based on the second communication connection;

[0037] The first electronic device is used to determine the first time and / or the first frequency based on the first working instruction; the first electronic device is also used to control the first TOF module to transmit a first signal; the first electronic device is also used to control the first TOF module to receive a second signal, where the second signal is a signal after the first signal is reflected by the target object; the first electronic device is also used to determine a first distance between the first electronic device and the target object based on the first signal and the second signal;

[0038] The second electronic device is used to determine the third time and the second frequency based on the second working instruction; the second electronic device is also used to control the second TOF module to transmit a third signal; the second electronic device is also used to control the second TOF module to receive a fourth signal, and the fourth signal is a signal after the third signal is reflected by the target object; the second electronic device is also used to determine the second distance between the second electronic device and the target object based on the third signal and the fourth signal.

[0039] In one possible implementation, determining a first distance between a first electronic device and a target object based on a first signal and a second signal specifically includes: determining the first distance between the first electronic device and the target object based on a transmission time of the first signal and a reception time of the second signal; or determining the first distance between the first electronic device and the target object based on a first phase difference between the second signal and the first signal.

[0040] In a seventh aspect, the present application provides an electronic device, comprising one or more processors, one or more memories, and a TOF module. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the measurement method in any possible implementation of the first to fourth aspects above.

[0041] In an eighth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the measurement method in any possible implementation of the first to fourth aspects above.

[0042] In a ninth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device executes the measurement method in any possible implementation of the first to fourth aspects above.

[0043] In a tenth aspect, the present application provides a router, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the router executes the measurement method in any possible implementation of the fifth to sixth aspects.

[0044] In an eleventh aspect, an embodiment of the present application provides a computer storage medium, comprising computer instructions. When the computer instructions are executed on a router, the router executes the measurement method in any possible implementation of the fifth to sixth aspects above.

[0045] In a twelfth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a router, the router executes the measurement method in any possible implementation of the fifth to sixth aspects above.

[0046] The beneficial effects of the sixth to twelfth aspects can refer to the corresponding beneficial effects in the first to fifth aspects mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1A A schematic diagram of the system architecture of a measurement system 10 provided in an embodiment of the present application;

[0048] Figure 1B A schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;

[0049] Figure 1C A schematic diagram of the hardware structure of a router 300 provided in an embodiment of the present application;

[0050] Figure 2A A schematic diagram of signal propagation when multiple electronic devices use TOF technology to measure distance in the same scenario provided by an embodiment of the present application;

[0051] Figure 2B A transmission signal x provided in an embodiment of the present application t Waveform diagram of ;

[0052] Figure 2C A reflection signal x provided in an embodiment of the present application r Waveform diagram of ;

[0053] Figure 2D A transmission signal y provided in an embodiment of the present application t Waveform diagram of ;

[0054] Figure 2E A reflection signal y provided in the embodiment of the present application r Waveform diagram of ;

[0055] Figure 3A A schematic diagram of signal propagation when multiple devices use TOF ranging in different time periods provided in an embodiment of the present application;

[0056] Figure 3B A transmission signal x provided in an embodiment of the present application t Waveform diagram of ;

[0057] Figure 3C A transmission signal y provided in an embodiment of the present application t Waveform diagram of ;

[0058] Figure 3D A reflection signal x provided in an embodiment of the present application r Waveform diagram of ;

[0059] Figure 4 A flow chart of a measurement method provided in an embodiment of the present application;

[0060] Figure 5A A schematic diagram of signal propagation when multiple devices use TOF ranging in frequency bands provided in an embodiment of the present application;

[0061] Figure 5B A transmission signal x provided in an embodiment of the present application t Waveform diagram of ;

[0062] Figure 5C A transmission signal y provided in an embodiment of the present application t Waveform diagram of ;

[0063] Figure 5D A reflection signal x provided in an embodiment of the present application r Waveform diagram of ;

[0064] Figure 5E A reflection signal y provided in the embodiment of the present application r Waveform diagram of ;

[0065] Figure 6 A schematic diagram of another measurement method provided in an embodiment of the present application;

[0066] Fig. 7A A transmission signal x provided in an embodiment of the present application t Waveform diagram of ;

[0067] Figure 7B A transmission signal y provided in an embodiment of the present application t Waveform diagram of ;

[0068] Figure 7C A reflection signal x provided in an embodiment of the present application r Waveform diagram of ;

[0069] Fig.7D A reflection signal y provided in the embodiment of the present application r Waveform diagram of ;

[0070] Figure 8 A schematic diagram of another measurement method provided in an embodiment of the present application;

[0071] Fig. 9 A schematic diagram of another application scenario provided for an embodiment of the present application;

[0072] Fig.10 A schematic diagram of another measurement method provided in an embodiment of the present application;

[0073] Fig.11 A schematic diagram of functional modules of a measurement system 20 provided in an embodiment of the present application;

[0074] Fig.12 A schematic diagram of functional modules of a measurement system 30 provided in an embodiment of the present application;

[0075] Fig.13 A flow chart of a measurement method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0076] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0077] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0078] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0079] Some terms involved in the embodiments of the present application are introduced below.

[0080] Time-of-flight (TOF) technology is a technology that actively measures the depth of a scene. A device that measures distance using TOF technology can be called a TOF module. A TOF module can be a separate electronic device or a module in an electronic device. A TOF module can include a transmitter (TX) and a receiver (RX). The transmitter can send an infrared band (such as 940 nanometers or 850 nanometers) light signal to illuminate the surface of an object, and the receiver can receive the light signal reflected from the surface of the object. TOF technology can include direct time-of-flight (DTOF) technology and indirect time-of-flight (ITOF) technology.

[0081] Direct time-of-flight (DTOF) technology: DTOF technology is a technology that estimates the distance between the reflection point and the TOF module based on the flight time of photons. When the TOF module uses DTOF technology to measure the distance, the receiving end can directly measure the time difference between the reflected light signal and the transmitted light signal to determine the flight time of the light, and then determine the distance between the reflection point and the TOF module based on the speed of light and the flight time of light. For example, if the flight time of the light signal from the time of emission to the time of receiving the reflected light signal is T, and the speed of light is c, then the distance between the reflection point and the TOF module can be d=c*T / 2.

[0082] Indirect time-of-flight (ITOF) technology: ITOF technology is a technology that estimates the distance between the reflection point and the TOF module based on the phase difference between the received reflected light signal and the transmitted light signal. When the TOF module uses ITOF technology to measure the distance, the transmitter can emit a square wave or a sine wave with a certain modulation frequency f, and the receiver can measure the phase difference between the reflected light signal and the transmitted light signal. If the phase difference between the reflected echo and the transmitted wave is Then the distance between the reflection point and the TOF module can be

[0083] Cyclic error calibration (also known as CEC calibration): Cyclic error calibration is a method used to calibrate the errors of sensors or measuring devices. During the measurement process, the sensor or measuring device may produce some systematic errors, such as drift or nonlinear response. These errors will cause the measurement results to deviate, so calibration is required to improve the accuracy of the measurement. CEC calibration mainly solves the periodic difference between the modulated signal and the ideal signal. The basic principle of cyclic error calibration is to estimate and compensate the error by measuring the same physical quantity multiple times and comparing and analyzing the measurement results. Cyclic error calibration can include the following steps: 1. Initialization: Ensure that the sensor or measuring device is in a suitable working state and record the initial measurement value. 2. Cyclic measurement: Perform multiple consecutive measurements, and try to keep the same working conditions between each measurement. 3. Data processing: Compare and analyze the multiple measurement results to calculate the error value. 4. Calibration compensation: Correct the subsequent measurement results based on the estimated error value. 5. Verification: Verify the calibration effect and ensure that the calibrated measurement results are within the acceptable error range.

[0084] Figure 1A A schematic diagram of the system structure of a measurement system 10 provided in an embodiment of the present application is shown.

[0085] like Figure 1A As shown, the measurement system 10 may include one or more electronic devices, such as electronic device 100 and electronic device 200. The one or more electronic devices are equipped with a TOF module, and the TOF technology may be used to measure the distance or the depth of the target scene.

[0086] In some embodiments, the electronic device 100 may be Figure 1A The mobile phone shown, the electronic device 200 may be Figure 1A In some other embodiments, the electronic device 100 and the electronic device 200 may also be other types of electronic devices, and the present application does not limit the specific types of the electronic device 100 and the electronic device 200.

[0087] Optionally, the measurement system 10 may further include a main device, such as a router 300. The router 300 may also be replaced by other types of electronic devices. The router 300 may establish wireless communication connections with the electronic device 100 and the electronic device 200, respectively, and these wireless communication connections may be wireless fidelity (Wi-Fi) connections. In other embodiments, these wireless communication connections may also be other types of wireless communication connections such as Bluetooth connections, infrared technology (IR) connections, or near field communication technology (NFC).

[0088] Understandably, Figure 1A The embodiment shown is only an example. In the embodiment of the present application, the measurement system 10 may also include Figure 1A The embodiments shown are more, less or more Figure 1A The present application does not limit the different types of devices in the illustrated embodiments.

[0089] Figure 1B A schematic diagram of the hardware structure of the electronic device 100 is shown.

[0090] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.

[0091] The electronic device 100 may include a processor 110, an internal memory 121, a charging management module 140, a power management module 141, a battery 142, a wireless communication module 160, and a TOF module 195. Optionally, the electronic device 100 may also include any one or more of the following: an antenna 1, an antenna 2, a mobile communication module 150, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, etc. Among them, the sensor module 180 may include a touch sensor 180K. Optionally, the sensor module 180 may also include any one or more of the following: a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc.

[0092] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0093] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.

[0094] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0095] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0096] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0097] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input via a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device via the power management module 141.

[0098] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0099] The TOF module 195 can be a transmitter (TX) and a receiver (RX), the transmitter can transmit a signal, and the receiver can receive the reflected signal. The signal transmitted by the transmitter can be an infrared signal, such as a light signal with a wavelength of 940 nanometers (nm) or 850nm. In other embodiments, the signal transmitted by the transmitter can also be other signals, which is not limited in this application.

[0100] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. In some embodiments, the wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0101] In other embodiments, the wireless communication function of the electronic device 100 may also be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0102] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0103] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0104] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device, or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0105] In some embodiments, the antenna 1 of the electronic device 100 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 100 can communicate with the network and other 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).

[0106] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0107] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), and the display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0108] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0109] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0110] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0111] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0112] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0113] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0114] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The non-volatile memory can also store executable programs and store user and application data, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 110.

[0115] The electronic device 100 can implement audio functions through the audio module 170 and the application processor, etc. For example, music playing, recording, etc. The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0116] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0117] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0118] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0119] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0120] It should be noted that the hardware structure of the electronic device 200 can also refer to the above Figure 1B The relevant description in the illustrated embodiment will not be repeated here.

[0121] The following introduces the hardware structure of a router 300 provided in an embodiment of the present application.

[0122] like Figure 1CAs shown, the router 300 may include a processor 310, an internal memory 321, a charging management module 340, a power management module 341, a battery 342, and a wireless communication module 360. Optionally, the router 300 may also include any one or more of the following: an antenna 3, an antenna 4, a mobile communication module 350, a button 390, an indicator 392, etc.

[0123] The functional description of each device in the router 300 can refer to the above Figure 1B The functional description of the corresponding components in the illustrated embodiment will not be repeated here.

[0124] Understandably, Figure 1C The embodiment shown is only an example. In the embodiment of the present application, the router 300 may also include Figure 1C The illustrated embodiment may have more, fewer or different devices than the above-described embodiment, and the present application does not make any limitation thereto.

[0125] Figure 2A The figure shows a schematic diagram of signal propagation when multiple electronic devices use TOF technology to measure distance in the same scenario.

[0126] like Figure 2A As shown, the electronic device 100 may be provided with a transmitter 11a and a receiver 11b, and the electronic device 200 may be provided with a transmitter 21a and a receiver 21b. The distance between the electronic device 100 and the target object is L1, and the distance between the electronic device 200 and the target object is L2, and L1>L2.

[0127] The signal transmitted by the electronic device 100 to the target object through the transmitter 11a may be referred to as the transmission signal x t , Figure 2B A transmission signal x provided in an embodiment of the present application is shown t Waveform diagram of . Figure 2B As shown, the horizontal axis is time and the vertical axis is amplitude. t The transmission time is t0, and the transmission signal x t Can be a periodic signal, and the transmitted signal x t The waveform can be a square wave or a pulse wave.

[0128] Transmit signal x t After reaching the target object and being reflected by the target object, the reflected signal received by the electronic device 100 through the receiver 11b can be called the reflected signal x r . Figure 2C shows a reflection signal x provided by an embodiment of the present application r Waveform diagram of . Figure 2CAs shown, the horizontal axis is time and the vertical axis is amplitude. At time t1, the receiver 11b receives the reflected signal x reflected by the target object. r , reflected signal x r The period, frequency and waveform of the transmitted signal x t The period, frequency and waveform are the same.

[0129] According to the transmitted signal x t The emission time t0 and the reflected signal x r From the reception time t1, it can be known that during the time period from t0 to t1, the optical signal propagates twice between the electronic device 100 and the target object, that is, the propagation distance of the optical signal is 2L1. Therefore, in theory, the electronic device 100 can receive the reflected signal x r At time t1, the transmitted signal x t The distance L1 between the electronic device 100 and the target object is determined by using the following formula (1) based on the time t0 and the propagation speed c of light:

[0130]

[0131] The signal transmitted by the electronic device 200 to the target object through the transmitter 21a may be referred to as the transmission signal y t , if the transmitted signal y t The emission time and the emission signal x t The emission time is the same (or close), then the emission signal y t The waveform can be referenced Figure 2D The embodiment shown. Figure 2D As shown, the horizontal axis is time and the vertical axis is amplitude. t The emission time is t0, and the emission signal y t Can be a periodic signal, and the transmitted signal y t The waveform can be a square wave or a pulse wave.

[0132] Transmit signal y t After reaching the target object and being reflected by the target object, the signal received by the electronic device 100 through the receiver 11b can be called the reflected signal y r . Figure 2E A reflection signal y provided in an embodiment of the present application is shown r Waveform diagram of . Figure 2E As shown, the horizontal axis is time and the vertical axis is amplitude. At time t2, the receiver 11b receives the reflected signal y reflected by the target object. r , reflected signal y r The period, frequency and waveform of the transmitted signal y thave the same period, frequency, and waveform. Since the distance between the electronic device 100 and the target object is greater than the distance between the electronic device 200 and the target object, when the transmission times of the transmission signal x t and the transmission signal y t are the same, compared with the reflected signal x r , the receiver 11b in the electronic device 100 will receive the reflected signal y r first, that is, t2 < t1. In this case, the electronic device 100 will regard the time t2 when the reflected signal y r is received as the time when the reflected signal x r is received, and use the following formula (2) to determine the distance L1 between the electronic device 100 and the target object:

[0133]

[0134] Analyzing formula (2), it can be seen that within the time period (t1 - t0), the optical signal propagates from the electronic device 200 to the target object and then from the target object to the electronic device 100, that is, the propagation distance of the optical signal is (L1 + L2). Therefore, what formula (2) actually calculates is not L1, but

[0135] It should be noted that even if the transmission times of the signals emitted by the electronic device 100 are different, if the electronic device 100 and the electronic device 200 are both in the working state within the same time period, the signals emitted by the electronic device 100 and the electronic device 200 will still interfere with each other and affect the measurement results.

[0136] According to FIG. 2A to FIG. 2E the embodiments shown, when multiple electronic devices use the TOF technology to measure distances within the same time period, they are easily interfered by the signals emitted by other electronic devices, affecting the measurement results.

[0137] An embodiment of the present application provides a measurement method. The electronic device 100 can determine the offset (time offset and / or frequency offset) corresponding to the electronic device 100 based on the device identifier of the electronic device 100. The electronic device 100 can determine the working time of the TOF module in the electronic device 100 and the frequency of the transmitted signal based on the preset time and frequency, and the offset. The electronic device 100 can transmit a signal of this frequency to the target object during this working time and determine the distance from the target object based on the time when the reflected signal is received and the time when the transmitted signal is sent.

[0138] In this way, by staggering the working time in the time domain and / or by transmitting signals of different frequencies, the electronic device 100 can determine the reflected signal of the signal it emits, thereby avoiding interference from the signals emitted by other electronic devices.

[0139] The following is a schematic diagram of signal propagation of a measurement method provided in an embodiment of the present application.

[0140] Figure 3A A schematic diagram of signal propagation when multiple devices use TOF ranging in different time periods provided in an embodiment of the present application.

[0141] like Figure 3A As shown, the electronic device 100 may be provided with a transmitter 11a and a receiver 11b, and the electronic device 200 may be provided with a transmitter 21a and a receiver 21b.

[0142] The electronic device 100 may correspond to a time offset Δt 100 , the electronic device 200 may correspond to a time offset Δt 200 , Δt 100 With Δt 200 The electronic device 100 can be based on the time offset Δt 100 Determine the emission time t0+Δt of the transmitter 11a 100 The electronic device 200 may also be configured based on the time offset Δt 200 Determine the emission time t0+Δt of the transmitter 11a 200 In this case, the transmission signal x transmitted by the electronic device 100 is t The waveform can be referenced Figure 3B In the embodiment shown, the transmission signal y transmitted by the electronic device 200 t The waveform can be referenced Figure 3C The embodiment shown. Figure 3B As shown, the horizontal axis is time and the vertical axis is amplitude. t The emission time is t0+Δt 100 At time x, the signal is emitted t Can be a periodic signal, and the transmitted signal x t The waveform can be a square wave. Figure 3C As shown, the horizontal axis is time and the vertical axis is amplitude. t The emission time is t0+Δt 200 At time y, the signal y is emitted t Can be a periodic signal, and the transmitted signal y t The waveform may be a square wave.

[0143] According to the transmitted signal x t The emission time and emission signal y t From the emission time, we can know that at t0+Δt 100 to t0+Δt 200During the time period, only the transmitter 11a and the receiver 11b of the electronic device 100 are in working state, and the transmitter 21a and the receiver 21b of the electronic device 200 are not in working state. Therefore, the transmission signal x transmitted by the electronic device 100 to the target object t , after being reflected by the target object, the electronic device 200 will not transmit a signal when it is reflected back to the electronic device 100. The signal received by the electronic device 100 during this period is the transmission signal x t The reflected signal x r . Reflected signal x r The waveform can be referenced Figure 3D The embodiment shown. Figure 3D As shown, the horizontal axis is time and the vertical axis is amplitude. 100 At time 1, the receiver 11b receives the reflected signal x from the target object. r , reflected signal x r The period, frequency and waveform of the signal x t The period, frequency and waveform are the same.

[0144] At t0+Δt 200 After the time, since the transmitter 11a and the receiver 11b of the electronic device 100 are both in an inoperative state, the transmission signal y transmitted by the electronic device 200 t And the transmitted signal y t The reflected signal y r will not affect the TOF measurement of the electronic device 100. Similarly, the transmission signal x transmitted by the electronic device 100 t And the transmitted signal x t The reflected signal x r It also will not affect the TOF measurement of the electronic device 200 .

[0145] In this way, the mutual influence between the signals transmitted by multiple devices can be avoided by working in different time periods, thereby improving the accuracy of measurement.

[0146] Figure 4 A flow chart of a measurement method provided in an embodiment of the present application is shown.

[0147] like Figure 4 As shown, a specific process of a measurement method may include the following steps:

[0148] S401, the electronic device 100 obtains a device identification of the electronic device 100.

[0149] The device identification of the electronic device 100 is used to identify the electronic device 100. In the embodiment of the present application, the device identification can be a device name, a device identity document (ID), a device product serial number (SN), a media access control (MAC) address, or an Internet Protocol (IP) address, etc., which is used to identify the device, and the present application does not limit this.

[0150] The electronic device 100 may obtain the identification of the electronic device 100 after being powered on, or may obtain the identification of the electronic device 100 when receiving a measurement operation from the user.

[0151] S402, the electronic device 100 obtains the working parameters of the TOF module, where the working parameters include working frame rate, working duration and duty cycle.

[0152] In some embodiments, the operating parameters of the TOF module may be preset. In other embodiments, the electronic device 100 may also receive and respond to user operations (or instructions sent by other devices) to change the operating parameters of the TOF module.

[0153] In some embodiments, the operating parameters may also include any one or more of the following: operating voltage and exposure time, etc.

[0154] The operating voltage refers to the voltage required by the TOF module when it is working. The duty cycle refers to the ratio of the time occupied by the pulse to the total time during a continuous working period.

[0155] The working frame rate is used to indicate the number of refreshes of the distance measurement results of the TOF module within one second, and can also be understood as the number of times the TOF module transmits a signal within one second, etc. Each transmitted signal may contain one or more cycles of light waves (or one or more pulsed light waves). For example, if the working frame rate is 15 frames per second (fps), the TOF module transmits 15 signals within one second, and determines 15 distance measurement results based on each received reflection signal. In some embodiments, the TOF module can be used in conjunction with a camera module to obtain a depth image of the target object. In this case, the working frame rate can also be used to indicate the number of depth images of the target object obtained by the TOF module within one second.

[0156] The working time is used to indicate the single working time of the TOF module.

[0157] When the TOF module is used in conjunction with the camera module, the operating parameters may further include exposure time, where the exposure time refers to the time a shutter needs to be open in order to project light onto a photosensitive surface of a photographic photosensitive material.

[0158] S403: The electronic device 100 determines the time offset Δt corresponding to the electronic device 100 from the mapping relationship between the device identification, the working parameters and the time offset based on the device identification and the working parameters. 100 .

[0159] In the embodiment of the present application, the time offset Δt 100 It can be used to determine the moment when the electronic device 100 transmits a signal to the target object through the TOF module. The specific determination method can refer to the relevant content in the following step S404, which will not be described in detail here.

[0160] In some embodiments, the electronic device 100 may determine a time offset set corresponding to the current working parameter based on the working parameter, and then determine the time offset Δt corresponding to the electronic device 100 in the time offset set from the mapping relationship between the device identification and the time offset based on the device identification. 100 In this case, the electronic device 100 determines the time offset Δt 100 The specific process may include the following steps:

[0161] 1. The electronic device 100 determines the total duration of a single measurement based on the working frame rate.

[0162] The following takes a working frame rate of 15fps, a working duration of 5ms, and a duty cycle of 50% as an example to illustrate the parameter calculation involved in each step.

[0163] Since the working frame rate is 15fps, the total available time for a single measurement is approximately 1 / 15=66ms.

[0164] 2. The electronic device 100 determines the actual power-on duration of the TOF module of the electronic device 100 during a single measurement based on the working duration and the duty cycle.

[0165] Since the working time is 5 ms and the duty cycle is 50%, the actual power-on time of the TOF module is 5*50%=2.5 ms.

[0166] 3. The electronic device 100 determines a set of time offsets based on the actual power-on duration of the TOF module and the total duration of a single measurement.

[0167] According to the above steps, the total available time for a single measurement is 66ms, and the actual power-on time of the TOF module of the electronic device 100 is 2.5ms. Within the total time of the single measurement, a maximum of about 66 / 2.5=26 electronic devices can be supported to complete a measurement, and the working parameters of the TOF module of the electronic device are the same as the working parameters of the TOF module of the electronic device 100. At this time, the set of time offsets may include 26 and the time offset, and the set of time offsets is an arithmetic progression with a difference of 2.5ms.

[0168] 4. The electronic device 100 determines the time offset Δt corresponding to the electronic device 100 in the time offset set based on the mapping relationship between the device identification of the electronic device 100 and the time offset. 100 .

[0169] In some embodiments, the electronic device 100 may store a mapping relationship between the device identification and the time offset in the above-mentioned time offset set.

[0170] Exemplarily, Table 1 shows a mapping relationship between a device identifier and a time offset.

[0171] Table 1

[0172] Equipment identification Time offset ID1 2.5ms ID2 5.0ms ID3 10.0ms

[0173] As shown in Table 1, there may be a mapping relationship between the device identification and the time offset. For example, when the device identification is ID1, the corresponding time offset may be 2.5ms; when the device identification is ID2, the corresponding time offset may be 5.0ms; when the device identification is ID3, the corresponding time offset may be 10.0ms, etc. The time offsets in Table 1 all belong to the time offset set determined in step 3 above.

[0174] It can be understood that the embodiment shown in Table 1 is only an illustrative example of the mapping relationship that may exist between the device identifier and the time offset. In the embodiments of the present application, the mapping relationship between the device identifier and the time offset may also include more, less or different mapping relationships than those in Table 1, and the present application does not limit this.

[0175] The electronic device 100 may determine the time offset Δt corresponding to the electronic device 100 in the above time offset set based on the device identification of the electronic device 100 and the mapping relationship between the device identification and the time offset stored in the electronic device 100. 100 .

[0176] In other embodiments, after determining the time offset set corresponding to the working parameters, the electronic device 100 can obtain the time offset Δt corresponding to the device identification based on the device identification of the electronic device 100 through a hash algorithm (or other algorithm) stored in the electronic device 100. 100 , the time offset Δt 100 Belongs to the above time offset set.

[0177] It is understandable that the above process is only an example. In the embodiments of the present application, the working parameters may also be parameters different from those in the above embodiments, and the present application does not limit them here.

[0178] In some embodiments, the electronic device 100 may store a mapping relationship between a device identification, an operating parameter, and a time offset.

[0179] Exemplarily, Table 2 shows a mapping relationship between a device identifier, an operating parameter, and a time offset.

[0180] Table 2

[0181]

[0182] As shown in Table 2, there is a mapping relationship between device identification, working parameters and time offset. For example, when the device identification is ID1, the working frame rate is 15fps, the working duration is 5ms and the duty cycle is 50%, the time offset is 2.5ms; when the device identification is ID1, the working frame rate is 5fps, the working duration is 10ms and the duty cycle is 50%, the time offset is 5.0ms; when the device identification is ID1, the working frame rate is 30fps, the working duration is 5ms and the duty cycle is 50%, the time offset is 7.5ms; when the device identification is ID2, the working frame rate is 15fps, the working duration is 5ms and the duty cycle is 50%, the time offset is 5.0ms; when the device identification is ID2, the working frame rate is 5fps, the working duration is 1 When the device is identified as ID2, the working frame rate is 30fps, the working duration is 5ms and the duty cycle is 50%, the time offset is 20.0ms; when the device is identified as ID2, the working frame rate is 30fps, the working duration is 5ms and the duty cycle is 50%, the time offset is 17.5ms; when the device is identified as ID3, the working frame rate is 15fps, the working duration is 5ms and the duty cycle is 50%, the time offset is 10.0ms; when the device is identified as ID3, the working frame rate is 5fps, the working duration is 10ms and the duty cycle is 50%, the time offset is 40.0ms; when the device is identified as ID3, the working frame rate is 30fps, the working duration is 5ms and the duty cycle is 50%, the time offset is 25.0ms.

[0183] It can be understood that Table 2 is only an illustrative example of the mapping relationship that may exist between the device identifier, operating parameters and time offset. In the embodiments of the present application, the mapping relationship between the device identifier, operating parameters and time offset may include more, fewer or different mapping relationships than the embodiment shown in Table 2, and the present application does not limit this herein.

[0184] The electronic device 100 can determine the corresponding time offset Δt when the electronic device 100 uses the current working parameters from the mapping relationship between the device identification, the working parameters and the time offset based on the device identification and the working parameters. 100 In some embodiments, the electronic device 100 may first determine one or more corresponding time offsets based on the device identification, and then determine the time offset Δt corresponding to the electronic device 100 in the current situation based on the current working parameters. 100 .

[0185] S404, the electronic device 100 generates a time offset based on the time offset Δt 100 Determine the launch time of the TOF module.

[0186] The transmission time of the TOF module is the time when the TOF module transmits a signal to the target object.

[0187] In some embodiments, the electronic device 100 only needs to transmit the transmission signal once through the TOF module, that is, the TOF module has only one transmission time.

[0188] When the TOF module has only one emission moment, the time offset Δt 100 It is used to indicate the time interval between the actual emission time of the TOF module and the standard emission time, that is, the emission time of the TOF module is the standard emission time and the time offset Δt 100 Therefore, in determining the standard launch time and time offset Δt 100 Afterwards, the electronic device 100 can obtain the emission time of the TOF module. The electronic device 100 can store the standard emission time.

[0189] In some embodiments, the electronic device 100 stores one or more standard times, and the electronic device 100 can determine a standard time from the one or more standard times as the standard transmission time based on the current time. For example, Table 3 shows a standard time table stored in an electronic device 100 provided in an embodiment of the present application, and the standard time table includes multiple standard times.

[0190] Table 3

[0191] Standard time 09:00:01 09:00:03 09:00:05 09:00:07

[0192] As shown in Table 3, the standard timetable may include a plurality of standard times, for example, 09:00:01, 09:00:03, 09:00:05, and 09:00:07.

[0193] It is understandable that the embodiment shown in Table 3 is only an example. In the embodiment of the present application, the electronic device 100 may also store more, less or different standard times than those in Table 3, and the present application does not limit this.

[0194] The electronic device 100 can select a standard time closest to the current time from the unreached standard time as the standard transmission time based on the current time. For example, if the current time is 09:00:02, and the multiple standard times stored in the electronic device 100 are the multiple standard times in the embodiment shown in Table 3, the electronic device 100 can determine the standard transmission time as 09:00:03 based on the current time.

[0195] After determining the standard transmission time, the electronic device 100 can use the standard transmission time and the time offset Δt to generate a signal. 100 Determine the emission time of TOF. The actual emission time of the TOF module is the standard emission time and the time offset Δt 100 For example, when the time offset Δt 100 When Δt is 0, the emission time of the TOF module in the electronic device 100 is the standard emission time. 100 When the standard transmission time is 2 ms, the transmission time of the TOF module in the electronic device 100 is the time corresponding to 2 ms after the standard transmission time.

[0196] In other embodiments, the electronic device 100 needs to transmit multiple transmission signals through the TOF module multiple times, that is, the TOF module corresponds to multiple transmission times.

[0197] When the TOF module corresponds to multiple emission times, the time offset Δt 100 It is used to indicate the time interval between the actual emission time of the first emission signal of the TOF module and the standard emission time, that is, the first emission time of the TOF module is the time offset Δt from the standard emission time. 100 Therefore, in determining the standard launch time and time offset Δt 100 Afterwards, the electronic device 100 can obtain the first emission time of the TOF module. The determination method of the standard emission time can refer to the relevant content in the above embodiment, which will not be repeated here.

[0198] In addition, since the transmission cycle of the TOF module is fixed, that is, the time interval between two adjacent transmission moments is the same, after determining the first transmission moment and the transmission cycle, the electronic device 100 can obtain all the transmission moments of the TOF module based on the first transmission moment and the transmission cycle. It should be noted that the transmission cycle can be obtained based on the working frame rate in the above steps. For example, if the working frame rate is 30fps, the TOF module needs to transmit 30 transmission signals in one second, and the transmission cycle is approximately 1 / 30 = 33 milliseconds.

[0199] S405, the electronic device 100 determines the power-on time and the power-off time of the TOF module based on the transmission time and the working duration.

[0200] The power-on time of the TOF module is the time when the electronic device 100 starts to supply power to the TOF module, and the power-off time is the time when the electronic device 100 stops supplying power to the TOF module.

[0201] The electronic device 100 stores the time interval between the emission time and the power-on time, which can be 0 or other preset time intervals (e.g., 1 ms, 1 microsecond, etc. before the emission time). After determining the power-on time of the TOF module, the electronic device 100 can power the TOF module when the power-on time is detected.

[0202] The electronic device 100 can determine the power-off time based on the power-on time and the working time, that is, the sum of the power-on time and the working time is the power-off time of the TOF module. The electronic device 100 can stop powering the TOF module when it detects that the power-off time has arrived. In some embodiments, after the TOF module of the electronic device 100 is powered on, the electronic device 100 can start timing, and when it is detected that the power-on time reaches the working time, the electronic device 100 can stop powering the TOF module.

[0203] It should be noted that, when the TOF module has only one transmission moment, the TOF module has only one power-on moment and only one power-off moment. In some embodiments, if the TOF module corresponds to multiple transmission moments, the number of power-on moments of the TOF module can be the same as the number of transmission moments, and the number of power-off moments can also be the same as the number of transmission moments. In this case, after each power-on, the electronic device 100 can transmit a transmission signal to the target object through the TOF module, receive the reflected signal through the TOF module, and stop supplying power to the TOF module when the power-off moment arrives.

[0204] S406, at the transmitting time, the electronic device 100 transmits a transmitting signal of a specified frequency to the target object through the TOF module.

[0205] The electronic device 100 may store a preset signal frequency (eg, 20 MHz or 100 MHz, etc.), which is also referred to as a standard frequency in the embodiment of the present application.

[0206] When the transmission time arrives, the electronic device 100 can transmit a transmission signal of a standard frequency to the target object through the transmitter 11a in the TOF module.

[0207] S407: During working hours, the electronic device 100 receives the reflected signal through the TOF module and records the receiving time.

[0208] The working time refers to the working time of the TOF module, that is, the time period between the power-on time and the power-off time of the TOF module.

[0209] During the working time, the electronic device 100 can receive the reflected signal of the target object through the receiver 11b of the TOF module. Since only the TOF module of the electronic device 100 is in working state during this time period, and the TOF modules of other devices are not powered on, it can be considered that the signal received by the receiver 11b is the transmission signal reflected by the target object.

[0210] When receiving the reflected signal, the electronic device 100 may also record the time when the reflected signal is received, that is, the receiving time.

[0211] It should be noted that, in some embodiments, the electronic device 100 requires a period of time to receive the reflected signal (optical signal). In this case, the electronic device 100 can divide the receiving time into multiple different smaller time periods (for example, 1 microsecond, 1 millisecond, etc.), and count the number of photons received in each time period, and determine any moment (for example, the middle moment) in the time period with the largest number of received photons as the reception moment of the reflected signal.

[0212] S408, the electronic device 100 determines the distance between the electronic device 100 and the target object based on the transmitting time and the receiving time.

[0213] In some embodiments, the manner in which the electronic device 100 can determine the distance between the electronic device 100 and the target object (or the depth of the target object) based on the transmission time and the reception time can refer to the relevant content in the above-mentioned DTOF technology and will not be repeated here.

[0214] In other embodiments, the electronic device 100 may also determine the phase difference based on the transmitted signal and the transmitted signal, and use the above-mentioned ITOF technology to calculate the distance between the electronic device 100 and the target object, which is not limited in the present application.

[0215] In some embodiments, the electronic device 100 may also calibrate some parameters (eg, transmission frequency, phase of the transmission signal, etc.) in combination with the calibration data so that the error remains within a controllable range.

[0216] In some embodiments, the electronic device 100 may also be provided with a camera, which may also generate a depth image of the target object based on the received reflection signal (light signal) combined with the distance information measured by the TOF module, which is not limited in the present application.

[0217] By adopting the measurement method provided in the embodiment of the present application, different working times can be set for different electronic devices based on device identification and working parameters, so that the TOF module of each electronic device works at different working times, thereby avoiding mutual interference of measurement signals and ensuring the accuracy of measurement results.

[0218] The following is a schematic diagram of signal propagation of another measurement method provided in an embodiment of the present application.

[0219] Figure 5A A schematic diagram of signal propagation when multiple devices use TOF ranging in divided frequency bands provided in an embodiment of the present application.

[0220] like Figure 5A As shown, the electronic device 100 may be provided with a transmitter 11a and a receiver 11b, and the electronic device 200 may be provided with a transmitter 21a and a receiver 21b.

[0221] The electronic device 100 may correspond to a frequency offset Δf 100 , the electronic device 200 may correspond to a frequency offset Δf 200 , Δf 100 With Δf 200 The electronic device 100 can be based on the frequency offset Δf 100 Determine the frequency f0+Δf of the transmission signal of the transmitter 11a 100 The electronic device 200 may also be configured based on the frequency offset Δf 200 Determine the frequency f0+Δf of the transmission signal of the transmitter 11a 200 In this case, the transmission signal x transmitted by the electronic device 100 is t The waveform can be referenced Figure 5B In the embodiment shown, the transmission signal x transmitted by the electronic device 100 t The waveform can be referenced Figure 5C The embodiment shown. Figure 5B As shown, the horizontal axis is time and the vertical axis is amplitude. t The emission time is t0, and the frequency can be f0+Δf 100 , transmit signal xt Can be a periodic signal, and the transmitted signal x t The waveform can be a square wave. Figure 5C As shown, the horizontal axis is time and the vertical axis is amplitude. t The emission time is t0, and the frequency can be f0+Δf 200 , transmit signal y t Can be a periodic signal, and the transmitted signal y t The waveform may be a square wave.

[0222] Since the transmitted signal x t The frequency and transmission signal y t The frequency of the reflected signal x r The frequency and reflected signal y r The frequency of the reflected signal x r The waveform can be referenced Figure 5D The embodiment shown. Figure 5D As shown, the horizontal axis is time and the vertical axis is amplitude. At time t1, the receiver 11b receives the reflected signal x reflected by the target object. r , reflected signal x r The period, frequency and waveform of the signal x t The period, frequency and waveform are the same, and the reflected signal x r The frequency is f0+Δf 100 The reflected signal y received by the electronic device 100 r The waveform can be referenced Figure 5E The embodiment shown. Figure 5E As shown, the horizontal axis is time and the vertical axis is amplitude. At time t2, the receiver 11b receives the reflected signal y reflected by the target object. r , reflected signal y r The period, frequency and waveform of the signal y t The period, frequency and waveform are the same, and the reflected signal y r The frequency is f0+Δf 200 .

[0223] According to the above Figure 5D and Figure 5E It can be seen from the embodiment shown that the reflected signal x r The frequency of the transmitted signal x t Same, reflected signal y r The frequency of the transmitted signal x t After receiving the reflected signal, the electronic device 100 can determine whether the frequency of the reflected signal is different from the transmitted signal x. t The frequency of the reflected signal is the same as that of the target object to determine whether the reflected signal is the target object's response to the transmitted signal x. t The reflected signal xr .

[0224] In this way, the mutual influence between the signals transmitted by multiple devices can be avoided by operating multiple devices in different frequency bands, thereby improving the accuracy of measurement.

[0225] Figure 6 A schematic flow chart of another measurement method provided in an embodiment of the present application is shown.

[0226] like Figure 6 As shown, a specific process of a measurement method may include the following steps:

[0227] S601, the electronic device 100 obtains a device identification of the electronic device 100.

[0228] For details on the device identification, please refer to the above Figure 4 The relevant description in step S401 is shown.

[0229] S602, the electronic device 100 obtains the working parameters of the TOF module, where the working parameters include working frame rate, working duration and duty cycle.

[0230] For the specific contents of step S601 to step S602, reference may be made to the related descriptions in the above-mentioned step S401 to step S402.

[0231] S603: The electronic device 100 determines the frequency offset Δf corresponding to the electronic device 100 from the mapping relationship between the device identification, the operating parameters and the frequency offset based on the device identification and the operating parameters. 100 .

[0232] In the embodiment of the present application, the frequency offset Δf 100 It can be used to determine the frequency of the signal transmitted by the electronic device 100 through the TOF module. The specific determination method can refer to the relevant content in the following step S604, which will not be described in detail here.

[0233] In some embodiments, the electronic device 100 may store a mapping relationship between a device identification, an operating parameter, and a frequency offset.

[0234] Exemplarily, Table 4 shows a mapping relationship between a device identifier, an operating parameter, and a frequency offset.

[0235] Table 4

[0236]

[0237]

[0238] As shown in Table 4, there is a mapping relationship between device identification, working parameters and frequency offset. For example, when the device identification is ID1, the working frame rate is 15fps, the working duration is 5ms and the duty cycle is 50%, the frequency offset is 10kHz; when the device identification is IDl, the working frame rate is 5fips, the working duration is 10ms and the duty cycle is 50%, the frequency offset is 15kHz; when the device identification is ID1, the working frame rate is 30fps, the working duration is 5ms and the duty cycle is 50%, the frequency offset is 40kHz; when the device identification is ID2, the working frame rate is 15fps, the working duration is 5ms and the duty cycle is 50%, the frequency offset is 20kHz; when the device identification is ID2, the working frame rate is 5fps, the working duration is 5ms and the duty cycle is 50%, the frequency offset is 20kHz; When the working frame rate is 10ms and the duty cycle is 50%, the frequency offset is 30kHz; when the device is identified as ID2, the working frame rate is 30fps, the working duration is 5ms and the duty cycle is 50%, the frequency offset is 80kHz; when the device is identified as ID3, the working frame rate is 15fps, the working duration is 5ms and the duty cycle is 50%, the frequency offset is 35kHz; when the device is identified as ID3, the working frame rate is 5fps, the working duration is 10ms and the duty cycle is 50%, the frequency offset is 70kHz; when the device is identified as ID3, the working frame rate is 30fps, the working duration is 5ms and the duty cycle is 50%, the frequency offset is 140kHz.

[0239] It can be understood that Table 4 is only an illustrative example of the mapping relationship that may exist between the device identifier, operating parameters and frequency offset. In the embodiments of the present application, the mapping relationship between the device identifier, operating parameters and frequency offset may include more, fewer or different mapping relationships than the embodiment shown in Table 4, and the present application does not limit this.

[0240] The electronic device 100 can determine the corresponding frequency offset Δt when the electronic device 100 uses the current operating parameters from the mapping relationship between the device identification, the operating parameters and the frequency offset based on the device identification and the operating parameters. 100 In some embodiments, the electronic device 100 may first determine one or more corresponding frequency offsets based on the device identification, and then determine the corresponding frequency offset Δf of the electronic device 100 under the current situation based on the current working parameters. 100 .

[0241] S604, the electronic device 100 generates a signal based on the frequency offset Δf 100 Determine the frequency f1 of the transmission signal of the TOF module.

[0242] Frequency offset Δf 100It is used to indicate the frequency difference between the frequency of the transmitted signal and the center frequency f0, that is, the frequency f1 of the transmitted signal is the center frequency f0 minus the frequency offset Δf 100 Therefore, when determining the center frequency f0 and the frequency offset Δf 100 Afterwards, the electronic device 100 can obtain the frequency of the transmission signal of the TOF module, wherein the center frequency f0 can be a frequency pre-stored in the electronic device 100, such as 20 MHz, or 50 MHz.

[0243] For example, if the center frequency f0 is 20 MHz and the frequency offset Δf of the electronic device 100 is 100 is 1kHz, then the frequency of the transmission signal of the electronic device 100 is f1=f0+Δf 100 =20.001MHz.

[0244] S605, the electronic device 100 transmits a transmission signal with a frequency of f1 to the target object through the TOF module.

[0245] S606: When the electronic device 100 receives a reflected signal with a frequency of f1 through the TOF module, a phase difference between the reflected signal and the transmitted signal is determined.

[0246] The electronic device 100 may receive the reflected signal through the receiver 11 b of the TOF module.

[0247] In some embodiments, after receiving a signal, the electronic device 100 may sample the signal and determine whether the frequency of the signal is the same as the transmission frequency based on the sampling result of the signal.

[0248] In the case of the same frequency, the electronic device 100 can confirm that the signal is a reflected signal of the transmitted signal reflected by the target object, and the electronic device 100 can also determine the phase difference between the reflected signal and the transmitted signal based on the sampling result of the reflected signal.

[0249] In the case of different frequencies, it can be confirmed that the signal is not a reflected signal of the transmitted signal reflected by the target object, and the signal is not processed.

[0250] S607, the electronic device 100 determines the distance between the electronic device 100 and the target object based on the phase difference and the transmission frequency.

[0251] After determining the phase difference between the transmitted signal and the reflected signal, the electronic device 100 may determine the distance between the electronic device 100 and the target object based on the phase difference and the transmitted frequency in the manner described in the above ITOF technology.

[0252] In another possible implementation, the electronic device 100 may also record the transmission time when transmitting a signal, record the reception time when the electronic device 100 receives a signal, and sample the signal, and determine whether the frequency of the received signal is the same as the transmission frequency based on the sampling result. If the frequencies are the same, it can be confirmed that the signal is a reflected signal reflected by the target object from the transmitted signal. At this time, the electronic device 100 can also determine the distance between the electronic device 100 and the target object based on the reception time and the transmission time.

[0253] By adopting the measurement method provided in the embodiment of the present application, different signal frequencies can be set for different electronic devices based on device identification and working parameters, so that the TOF module of each electronic device transmits signals of different frequencies, thereby avoiding mutual interference of measurement signals and ensuring the accuracy of measurement results.

[0254] In some embodiments, each electronic device may also have a unique time offset and frequency offset corresponding to the device based on the device identification and current operating parameters.

[0255] Exemplarily, the electronic device 100 may correspond to a time offset Δt 100 and frequency offset Δf 100 , the electronic device 200 may correspond to a time offset Δt 200 and frequency offset Δf 200 Δt 100 With Δt 200 The value of Δf 100 With Δf 200 The same when the value of is different, that is, when Δt 100 With Δt 200 When the same, Δf 100 With Δf 200 The value of is different; when Δt 100 With Δt 200 Different, Δf 100 With Δf 200 The values ​​can be the same or different.

[0256] The electronic device 100 may be configured based on the time offset Δt 100 Determine the emission time t0+Δt of the transmitter 11a 100 The electronic device 200 may also be configured based on the time offset Δt 200 Determine the emission time t0+Δt of the transmitter 11a 200 The electronic device 100 may be configured based on the frequency offset Δf 100 Determine the frequency f0+Δf of the transmission signal of the transmitter 11a 100 The electronic device 200 may also be configured based on the frequency offset Δf 200Determine the frequency f0+Δf of the transmission signal of the transmitter 11a 200 .

[0257] In this case, the transmission signal x transmitted by the electronic device 100 t The waveform can be referenced Fig. 7A In the embodiment shown, the transmission signal y transmitted by the electronic device 200 t The waveform can be referenced Figure 7B The embodiment shown. Fig. 7A As shown, the horizontal axis is time and the vertical axis is amplitude. t The emission time is t0+Δt 100 At time x, the signal is emitted t It can be a periodic signal, and the frequency can be f0+Δf 100 , and transmit signal x t The waveform can be a square wave. Figure 7B As shown, the horizontal axis is time and the vertical axis is amplitude. t The emission time is t0+Δt 200 At time y, the signal y is emitted t It can be a periodic signal, and the frequency can be f0+Δf 200 , and transmits signal y t The waveform can be a square wave. 100 With Δt 200 The values ​​of can be the same or different; Δf 100 With Δf 200 The values ​​of can be the same or different; it should be noted that in Δt 100 With Δt 200 When the values ​​are the same, Δf 100 With Δf 200 The value of is different, and in Δf 100 With Δf 200 When the values ​​are the same, Δt 100 With Δt 200 The value of is different.

[0258] In Δt 100 With Δt 200 When the value of is different, according to the transmitted signal x t The emission time and emission signal y t From the emission time, we can know that at t0+Δt 100 to t0+Δt 200 During the time period, only the transmitter 11a and the receiver 11b of the electronic device 100 are in working state, and the transmitter 21a and the receiver 21b of the electronic device 200 are not in working state. Therefore, the transmission signal x transmitted by the electronic device 100 to the target object t, after being reflected by the target object, the electronic device 200 will not transmit a signal when it is reflected back to the electronic device 100. The signal received by the electronic device 100 during this period is the transmission signal x t The reflected signal x r . Reflected signal x r The waveform can be referenced Figure 7C The embodiment shown. Figure 7C As shown, the horizontal axis is time and the vertical axis is amplitude. 100 At time 1, the receiver 11b receives the reflected signal x from the target object. r , reflected signal x r The period, frequency and waveform can be Fig. 7A The signal x t The period, frequency and waveform are the same. 200 After the time, since the transmitter 11a and the receiver 11b of the electronic device 100 are both in an inoperative state, the transmission signal y transmitted by the electronic device 200 t And the transmitted signal y t The reflected signal y r will not affect the TOF measurement of the electronic device 100. Similarly, the transmission signal x transmitted by the electronic device 100 t And the transmitted signal x t The reflected signal x r Nor will it affect the TOF measurement of the electronic device 200.

[0259] In Δf 100 With Δf 200 When the value of is different, due to the transmitted signal x t The frequency and transmission signal y t The frequency of the reflected signal x r The frequency and reflected signal y r The frequency of the reflected signal x r The waveform can be referenced Figure 7C The embodiment shown, and the reflected signal x r The frequency is f0+Δf 100 The reflected signal y received by the electronic device 100 r The waveform can be referenced Fig.7D The embodiment shown. Fig.7D As shown, the horizontal axis is time and the vertical axis is amplitude. At time t2, the receiver 11b receives the reflected signal y reflected by the target object. r , reflected signal y r The period, frequency and waveform of the signal y t The period, frequency and waveform are the same, and the reflected signal y rThe frequency is f0+Δf 200 .

[0260] In this way, the mutual influence between signals transmitted by multiple devices can be avoided by operating multiple devices in different time periods and frequency bands, thereby improving the accuracy of measurement and supporting more electronic devices to use TOF technology in the same scenario.

[0261] Figure 8 A schematic flow chart of another measurement method provided in an embodiment of the present application is shown.

[0262] like Figure 8 As shown, a specific process of a measurement method may include the following steps:

[0263] S801, the electronic device 100 obtains a device identification of the electronic device 100.

[0264] S802, the electronic device 100 obtains the working parameters of the TOF module, where the working parameters include working frame rate, working duration and duty cycle.

[0265] For the specific contents of step S801 to step S802, reference may be made to the related descriptions in the above-mentioned step S401 to step S402.

[0266] S803, the electronic device 100 determines the offset corresponding to the electronic device 100 based on the device identification and the working parameters, including the time offset Δt 100 and frequency offset Δf 100 .

[0267] The electronic device 100 may store a mapping relationship between a device identifier, an operating parameter, and an offset. It should be noted that each electronic device may correspond to a unique set of offsets under different operating parameters, and each set of offsets may include a time offset and a frequency offset. Under the same operating parameters, the time offsets and frequency offsets corresponding to different electronic devices cannot be the same at the same time.

[0268] The electronic device 100 determines the time offset Δt corresponding to the electronic device 100 based on the device identification and the operating parameters. 100 For specific methods, please refer to the above Figure 4 The relevant contents in step S403 are not repeated here.

[0269] The electronic device 100 determines the frequency offset Δf corresponding to the electronic device 100 based on the device identification and the operating parameters. 100 For specific methods, please refer to the above Figure 6 The relevant contents in step S603 are not repeated here.

[0270] S804, the electronic device 100 generates a signal based on the frequency offset Δf100 Determine the frequency f1 of the transmission signal of the TOF module.

[0271] The specific content of step S804 can refer to the above Figure 6 The relevant content of step S604 is shown.

[0272] S805, the electronic device 100 generates a time offset based on the time offset Δt 100 Determine the launch time of the TOF module.

[0273] S806, the electronic device 100 determines the power-on time and power-off time of the TOF module based on the transmission time and the working duration.

[0274] The specific contents of step S805 to step S806 can refer to the above Figure 4 The relevant contents in step S404 to step S405 are shown.

[0275] S807, at the transmitting time, the electronic device 100 transmits a transmitting signal with a frequency of f1 to the target object through the TOF module.

[0276] S808, when the electronic device 100 receives a reflected signal with a frequency of f1 through the TOF module, a phase difference between the reflected signal and the transmitted signal is determined.

[0277] S809, the electronic device 100 determines the distance between the electronic device 100 and the target object based on the phase difference and the transmission frequency.

[0278] The specific contents of steps S807 to S809 can refer to the above Figure 6 The relevant contents of step S605 to step S607 are shown.

[0279] By adopting the measurement method provided in the embodiment of the present application, different signal frequencies and / or different working times can be set for different electronic devices based on the device identification and working parameters, so that the TOF module of each electronic device transmits signals of different frequencies, thereby avoiding mutual interference of the measurement signals and ensuring the accuracy of the measurement results.

[0280] Fig. 9 A schematic diagram of another application scenario provided by an embodiment of the present application is shown.

[0281] like Fig. 9 As shown, the electronic device 100 may be provided with a transmitter 11a and a receiver 11b, and the electronic device 200 may be provided with a transmitter 21a and a receiver 21b. The router 300 may establish communication connections with the electronic device 100 and the electronic device 200, respectively, and the communication connections may be Wi-Fi connections.

[0282] The router 300 may send a work instruction 1 to the electronic device 100 and a work instruction 2 to the electronic device 200. The work instruction 1 is used to indicate the working time and transmission frequency of the electronic device 100. The work instruction 2 is used to indicate the working time and transmission frequency of the electronic device 200.

[0283] The electronic device 100 may transmit a signal based on the working instruction 1 sent by the router 300, receive a reflected signal, and determine the distance between the electronic device 100 and the target object.

[0284] The electronic device 200 may transmit a signal based on the working instruction 2 sent by the router 300, receive a reflected signal, and determine the distance between the electronic device 100 and the target object.

[0285] In this way, the working time periods and working frequency bands of multiple measuring devices can be controlled by the router 300 to avoid mutual influence between signals emitted by multiple devices, improve the accuracy of measurement, and support more electronic devices to use TOF technology in the same scenario.

[0286] It is understandable that in the embodiment of the present application, the router 300 may also be replaced with other types of electronic devices, which is not limited in the present application.

[0287] Fig.10 A schematic flow chart of another measurement method provided in an embodiment of the present application is shown.

[0288] like Fig.10 As shown, the specific process of another measurement method may include the following steps:

[0289] S1001: The router 300 establishes a communication connection with the electronic device 100.

[0290] The communication connection between the router 300 and the electronic device 100 may be a Wi-Fi connection, or may be other wireless communication connections such as a Bluetooth connection.

[0291] S1002 , the router 300 establishes a communication connection with the electronic device 200 .

[0292] For the specific content of step S1002, reference may be made to the relevant content of the above-mentioned step S1001.

[0293] In an embodiment of the present application, the electronic device 100 may execute step S1001 first, or may execute step S1002 first, or may execute step S1001 and step S1002 simultaneously. The present application does not limit the execution order of the above two steps.

[0294] S1003 , the electronic device 100 sends the device identification of the electronic device 100 to the router 300 .

[0295] The router 300 may obtain the device identification of the electronic device 100 through the communication connection between the router 300 and the electronic device 100 .

[0296] Step S1003 may be executed after step S1001 is executed, and there is no restriction on the execution order between step S1003 and step S1002 and step S1004.

[0297] S1004 , the electronic device 200 sends the device identification of the electronic device 200 to the router 300 .

[0298] The router 300 may obtain the device identification of the electronic device 200 through the communication connection between the router 300 and the electronic device 200 .

[0299] Step S1004 may be executed after step S1002 is executed, and there is no restriction on the execution order between step S1004 and step S1001 and step S1003.

[0300] S1005 , the router 300 determines a working instruction 1 based on the device identification of the electronic device 100 , where the working instruction 1 is used to indicate the working time and transmission frequency of the electronic device 100 .

[0301] In some embodiments, the work instruction 1 may include an offset corresponding to the electronic device 100, and the offset may include a time offset and / or a frequency offset. The specific method of determining the offset of the electronic device 100 based on the device identification can refer to the above Figure 4 , Figure 6 The relevant contents in the illustrated embodiment will not be repeated here.

[0302] In some embodiments, the working instruction 1 may include the working time and transmission frequency of the electronic device 100. The router 300 may first determine the offset of the electronic device 100 based on the device identification of the electronic device 100, and then determine the working time and transmission frequency of the electronic device 100 based on the preset standard transmission time, center frequency and offset. The working time may include the power-on time, power-off time and transmission time of the TOF module in the electronic device 100, and the transmission frequency is the frequency of the signal transmitted by the electronic device 100.

[0303] In some embodiments, the work instruction 1 may include a start instruction. After determining the power-on time of the TOF module in the electronic device 100, the router 300 may also send a start instruction to the electronic device 100 when the power-on time arrives (or is about to arrive), and the start instruction is used to trigger the electronic device 100 to start powering the TOF module and transmit a signal to the target object through the TOF module. In this case, optionally, the work instruction 1 may also include a transmission frequency (or frequency offset), which is not limited in this application.

[0304] S1006 , the router 300 determines a working instruction 2 based on the device identification of the electronic device 200 , where the working instruction 2 is used to indicate the working time and transmission frequency of the electronic device 200 .

[0305] For the specific content of step S1006, reference may be made to the relevant description in the above step S1005.

[0306] S1007 , the router 300 sends a work instruction 1 to the electronic device 100 .

[0307] S1008 , the router 300 sends a work instruction 2 to the electronic device 200 .

[0308] S1009 , the electronic device 100 determines the working time and transmission frequency of the electronic device 100 based on the working instruction 1 .

[0309] In the case where the working instruction 1 includes an offset corresponding to the electronic device 100 , the electronic device 100 can determine the working time and transmission frequency of the electronic device 100 based on the offset and the preset marked transmission time, center frequency, etc.

[0310] In the case where the working instruction 1 includes the working time and the transmission frequency of the electronic device 100 , the electronic device 100 can acquire the working time and the transmission frequency of the electronic device 100 from the working instruction 1 .

[0311] In the case where the working instruction 1 includes a start-up instruction, the electronic device 100 can determine the working time of the electronic device 100 based on the moment when the working instruction 1 is received. For example, the moment when the working instruction 1 is received is determined as the power-on moment and the transmission moment (or the first transmission moment). The electronic device 100 can also determine the power-off moment based on the preset working duration and the power-on moment. If the working instruction 1 also includes a transmission frequency (or a frequency offset), the electronic device 100 can determine the transmission frequency of the electronic device 100 based on the working instruction 1. In other embodiments, if the working instruction 1 does not include a transmission frequency, the electronic device 100 can also use the preset center frequency as the transmission frequency of the electronic device 100.

[0312] S1010 , the electronic device 100 measures the distance between the electronic device 100 and a target object based on the working time and the transmission frequency of the electronic device 100 .

[0313] After determining the working time of the electronic device 100, the electronic device 100 can start powering the TOF module at the power-on time, stop powering the TOF module at the power-off time, and transmit a signal to the target object at the transmission time, and the frequency of the transmitted signal is the transmission frequency of the electronic device 100.

[0314] In some embodiments, the electronic device 100 may use the above-mentioned DTOF technology to transmit a pulse signal to the target object, and measure the distance between the electronic device 100 and the target object based on the emission time of the pulse signal and the reception time of the reflected signal. In other embodiments, the electronic device 100 may also use the above-mentioned ITOF technology to determine the distance between the electronic device 100 and the target object based on the phase difference and the transmission frequency between the reflected signal and the transmitted signal after receiving the reflected signal.

[0315] S1011 , the electronic device 200 determines the working time and transmission frequency of the electronic device 200 based on the working instruction 2 .

[0316] S1012, the electronic device 200 measures the distance between the electronic device 200 and the target object based on the working time and the transmission frequency of the electronic device 200.

[0317] The specific contents of step S1011 to step S1012 can refer to the relevant contents of the above-mentioned step S1009 to step S1010, which will not be repeated here.

[0318] By adopting the measurement method provided in the embodiment of the present application, the working time periods and working frequency bands of multiple measuring devices can be controlled through the router 300, so as to avoid the mutual influence between the signals emitted by multiple devices, improve the accuracy of the measurement, and support more electronic devices to use TOF technology in the same scenario.

[0319] The following introduces the functional modules of a measurement system 20 provided in an embodiment of the present application.

[0320] like Fig.11 As shown, the measurement system 20 may include an electronic device 100 and an electronic device 200 .

[0321] The electronic device 100 may include a TOF module 11, a resource module 12, a depth calculation module 13, etc. Optionally, the electronic device 100 may also include any one or more of the following: a calibration parameter module 14, a camera 15, a Wi-Fi module 16, and one or more sensors.

[0322] The TOF module 11 may include a transmitter 11a and a receiver 11b. The transmitter 11a may transmit a signal, and the receiver 11b may receive a signal. The TOF module 11 may receive the resource configuration information sent by the resource module 12, and transmit a signal at a specified time and / or frequency band based on the resource configuration information. In some embodiments, the TOF module 11 may record the reception time when the receiver 11b receives the reflected signal, and send the reception time and the transmission time to the depth calculation module 13 together. In other embodiments, the TOF module 11 may also send the transmission signal and the reception signal to the depth calculation module 13 together.

[0323] The resource module 12 may include a resource decision module 12a and a resource configuration module 12b. The resource decision module 12a may determine the offset (including time offset and / or frequency offset) corresponding to the electronic device 100 based on the device identification. The resource decision module 12a may also determine the working time and transmission frequency of the TOF module 11 based on the offset corresponding to the electronic device 100, and the working time may include power-on time, power-off time and transmission time. The resource decision module 12a may also send the working time and transmission frequency of the TOF module 11 to the resource configuration module 12b. The resource configuration module 12b may send resource configuration information to the TOF module 11 based on the working time and transmission frequency of the TOF module 11, and the resource configuration information is used to indicate the working time and transmission frequency of the TOF module 11.

[0324] The depth calculation module 13 can calculate the depth of the target object (or calculate the distance between the electronic device 100 and the target object, etc.). In some embodiments, the depth calculation module 13 can determine the depth of the target object based on the transmission time and the reception time sent by the TOF module 11. In other embodiments, the depth calculation module 13 can also calculate the depth of the target object based on the phase difference between the transmission signal and the reception signal sent by the TOF module 11 and the transmission frequency. In some embodiments, the depth calculation module 13 can also receive the calibration data sent by the calibration parameter module 14, and perform calibration compensation on the calculation result based on the calibration data.

[0325] The calibration parameter module 14 can calibrate one or more parameters of the TOF module 11 to determine the calibration data. For example, the calibration parameter module 14 calibrates the modulation frequency of the transmission signal to ensure that the error between the actual transmission signal frequency and the preset transmission frequency is within an acceptable range. In the case of using ITOF technology to measure distance (or measure depth), the calibration parameter module 14 can also calibrate the phase difference between the waveform of the actual transmission signal and the standard signal waveform (such as the actual transmitted sine wave and the standard sine wave), and determine the phase compensation, etc. In some embodiments, the calibration parameter module 14 can also perform cyclic error calibration, which can be used to calibrate sensor or measurement equipment errors. It can be understood that these are just some examples. In the embodiment of the present application, the calibration parameter module 14 can also calibrate the shooting parameters, temperature parameters and other parameters of the camera 15, and the present application is not limited here.

[0326] The camera 15 can photograph the target object to obtain an image of the target object, and can also determine a depth image of the target object in combination with the measurement result of the TOF module 11 .

[0327] The Wi-Fi module 16 can establish a communication connection with other electronic devices. In some embodiments, the Wi-Fi module 16 can also be replaced by a Bluetooth module or other wireless communication module, which is not limited in this application.

[0328] The electronic device 200 may include a TOF module 21, a resource module 22, a depth calculation module 23, a calibration parameter module 24, etc. Optionally, the electronic device 200 may also include a camera 25 and a Wi-Fi module 26. The TOF module may include a transmitter 21a and a receiver 21b; the resource module may include a resource decision module 22a and a resource configuration module 22b.

[0329] The functions of each module in the electronic device 200 can refer to the functional description of each module in the electronic device 100, which will not be repeated here.

[0330] Understandably, Fig.11 The illustrated embodiment is only an example. In the embodiment of the present application, the measurement system 20 may include more, fewer or different functional modules than the above embodiment, and any multiple modules mentioned above may be combined into one module, and any module may be divided into multiple modules. The present application does not limit this.

[0331] It should be noted that in the embodiments of the present application, the above Figure 1A The functional modules of the measurement system 10 shown can be referred to Fig.11 Functional modules of the measuring system 20 are shown.

[0332] In some embodiments, if multiple electronic devices in the measurement system 20 are all provided with cameras, and the cameras of different electronic devices need to be aligned in the time domain, the electronic devices can also calibrate the time parameters of the cameras through the calibration parameter module. Since the time offset of each electronic device is fixed, only a single calibration is required when calibrating the time parameters of the cameras.

[0333] The following introduces the functional modules of a measurement system 30 provided in an embodiment of the present application.

[0334] like Fig.12 As shown, the measurement system 30 may include an electronic device 100 , an electronic device 200 , and a router 300 .

[0335] The electronic device 100 may include a TOF module 11, a resource module 12, a depth calculation module 13, etc. Optionally, the electronic device 100 may also include a calibration parameter module 14, a camera 15, and a Wi-Fi module 16. The TOF module 11 may include a transmitter 11a and a receiver 11b; the resource module 12 may include a resource decision module 12a and a resource configuration module 12b.

[0336] The electronic device 200 may include a TOF module 21, a resource module 22, a depth calculation module 23, etc. Optionally, the electronic device 200 may also include a calibration parameter module 24, a camera 25, and a Wi-Fi module 26. The TOF module may include a transmitter 21a and a receiver 21b; the resource module may include a resource decision module 22a and a resource configuration module 22b.

[0337] The router 300 may include a device identification module 31 , a resource decision module 32 , a resource configuration module 33 , and a Wi-Fi module 34 .

[0338] The device identification module 31 can obtain and store the device identification of the electronic device 100 and the device identification of the electronic device 200. In some embodiments, the router 300 can obtain the device identification of the electronic device 100 during the process of establishing a communication connection with the electronic device 100; and obtain the device identification of the electronic device 200 during the process of establishing a communication connection with the electronic device 200. In other embodiments, the router 300 can also obtain the device identification of the electronic device 100 through the communication connection after establishing a communication connection with the electronic device 100; and obtain the device identification of the electronic device 200 through the communication connection after establishing a communication connection with the electronic device 200.

[0339] The resource decision module 32 can determine the offset (including time offset and / or frequency offset) corresponding to the electronic device 100 based on the device identification of the electronic device 100; and can also determine the offset corresponding to the electronic device 200 based on the device identification of the electronic device 200. In some embodiments, after determining the offset, the resource decision module 32 can also determine the working time and / or transmission frequency of the TOF module in each electronic device based on the offset. The resource decision module 32 can also send the offset of each electronic device (or the working time and / or transmission frequency of each electronic device) to the resource configuration module 33.

[0340] The resource configuration module 33 can determine the resource configuration information of each electronic device, and determine the work instructions corresponding to each electronic device based on the resource configuration information, for example, the work instruction 1 corresponding to the electronic device 100 and the work instruction 2 corresponding to the electronic device 200. The resource configuration module 33 can send the work instruction 1 and the work instruction 2 to the Wi-Fi module 34. The work instruction 1 is used to indicate the working time and transmission frequency of the TOF module 11 in the electronic device 100. The work instruction 2 is used to indicate the working time and transmission frequency of the TOF module 21 in the electronic device 200.

[0341] The Wi-Fi module 34 can establish communication connections with the electronic device 100 and the electronic device 200 respectively, and communicate with the electronic device 100 through the communication connection with the electronic device 100, and communicate with the electronic device 200 through the communication connection with the electronic device 200. The Wi-Fi module 34 can send the work instruction 1 to the electronic device 100 and send the work instruction 2 to the electronic device 200.

[0342] In the electronic device 100 , the Wi-Fi module 16 can receive the working instruction 1 sent by the router 300 , and send the working instruction 1 to the TOF module 11 .

[0343] Similarly, in the electronic device 200 , the Wi-Fi module 26 can receive the working instruction 2 sent by the router 300 , and send the working instruction 2 to the TOF module 21 .

[0344] The functional description of other modules in the electronic device 100 and the electronic device 200 can refer to the above Fig.11 The functional description of the corresponding modules in the illustrated embodiment will not be repeated here.

[0345] Understandably, Fig.12 The illustrated embodiment is only an example. In the embodiment of the present application, the measurement system 30 may include more, fewer or different functional modules than the above embodiment, and any multiple modules mentioned above may be combined into one module, and any module may be divided into multiple modules. The present application does not limit this.

[0346] In some embodiments, the router 300 may also be replaced by other types of electronic devices, which is not limited in this application.

[0347] It should be noted that in the embodiments of the present application, the above Figure 1A The functional modules of the measurement system 10 shown can be referred to Fig.12 Functional modules of the measuring system 30 are shown.

[0348] Fig.13 A flow chart of a measurement method provided in an embodiment of the present application is shown.

[0349] S1301: The electronic device determines a first time based on a first device identifier of the electronic device.

[0350] The electronic device may be the electronic device 100 in the above embodiment, or the electronic device 200, etc.

[0351] The electronic device may further include a first TOF module. For the function of the first TOF module, reference may be made to the functional description of the TOF module 11 in the above embodiment.

[0352] The first device identification may be a device identification of the electronic device 100 , and the first moment may be a moment when the electronic device transmits a signal.

[0353] In some embodiments, determining the first moment based on the first device identifier of the electronic device specifically includes: determining a first time offset based on the first device identifier, the first time offset being used to indicate the time interval between the first moment and a preset standard transmission moment; determining the first moment based on the first time offset and the standard transmission moment. The first time offset may be the above Figure 4 The time offset Δt in the embodiment shown 100 .

[0354] The specific method for the electronic device to determine the first time offset based on the first device identifier can refer to the above Figure 4 Related steps in the illustrated embodiment. It is understandable that in some embodiments, the operating parameters of the electronic device may be preset, and after the operating parameters are determined, the mapping relationship between the device identification and the time offset is determined.

[0355] S1302: At a first moment, the electronic device controls the first TOF module to transmit a first signal.

[0356] The first signal may be a signal transmitted by the electronic device to the target object, such as a transmission signal transmitted by the electronic device 100 to the target object in the above embodiment.

[0357] The transmission frequency (also referred to as the modulation frequency) of the first signal may be the first frequency. In some embodiments, the first frequency may be a preset transmission frequency, and the electronic device may transmit the first signal based on the preset transmission frequency. For details, please refer to the above Figure 4 In some other embodiments, the first frequency may also be determined based on the first device identifier, and the electronic device may determine the first frequency offset (eg, Figure 6 The frequency offset Δf in the embodiment shown is 100 ), and determining the first frequency based on the first frequency offset and the preset transmission frequency. For details, please refer to the above Figure 6 The embodiments shown will not be described in detail here.

[0358] S1303, the electronic device controls the first TOF module to receive a second signal, and records a second time when the second signal is received, where the second signal is a signal obtained after the first signal is reflected by the target object.

[0359] The second signal may be the reflected signal in the above embodiment.

[0360] The second time may be the time of receiving the reflected signal in the above embodiment.

[0361] S1304: The electronic device determines a first distance between the electronic device and the target object based on the first moment and the second moment.

[0362] The method for the electronic device to determine the first distance can refer to the above Figure 4 The relevant description in step S408 is not repeated here.

[0363] In this way, different electronic devices can correspond to different transmission times based on different device identifiers, so that different electronic devices work at different times to avoid mutual interference of signals.

[0364] An embodiment of the present application provides another measurement method, which is applied to an electronic device, wherein the electronic device includes a first TOF module; the method includes: determining a first frequency based on a first device identifier of the electronic device; at a first moment, controlling the first TOF module to transmit a first signal, wherein the modulation frequency of the first signal is the first frequency; controlling the first TOF module to receive a second signal, and recording a second moment of receiving the second signal, wherein the second signal is a signal after the first signal is reflected by a target object; and determining a first distance between the electronic device and the target object based on the first moment and the second moment.

[0365] In this way, the electronic device can modulate the transmission signal and transmit the signal at a preset transmission frequency. Different electronic devices can correspond to different frequencies, which can avoid mutual interference between signals transmitted by different electronic devices.

[0366] In one possible implementation, determining the first frequency based on a first device identifier of the electronic device specifically includes: determining a first frequency offset based on the first device identifier, the first frequency offset being used to indicate a frequency difference between the first frequency and a preset transmission frequency; and determining the first frequency based on the first frequency offset and the transmission frequency.

[0367] In this way, each electronic device may correspond to a different frequency offset, so that the frequencies of signals transmitted by different electronic devices are different.

[0368] An embodiment of the present application also provides another measurement method, which is applied to an electronic device, wherein the electronic device includes a first TOF module; the method includes: determining a first frequency based on a first device identifier of the electronic device; controlling the first TOF module to transmit a first signal, wherein the modulation frequency of the first signal is the first frequency; controlling the first TOF module to receive a second signal, and determining a first phase difference between the second signal and the first signal, wherein the second signal is a signal after the first signal is reflected by a target object; and determining a first distance between the electronic device and the target object based on the first frequency and the first phase difference.

[0369] The specific method of determining the first distance between the electronic device and the target object based on the first frequency and the first phase difference can refer to the above Figure 6 The content in step S607 is shown.

[0370] In this way, the electronic device can also determine the distance to the target object based on the phase difference between the transmitted signal and the reflected signal.

[0371] An embodiment of the present application provides another measurement method, which is applied to an electronic device, wherein the electronic device includes a first TOF module; the method includes: determining a first moment based on a first device identifier of the electronic device; at the first moment, controlling the first TOF module to transmit a first signal; controlling the first TOF module to receive a second signal, and determining a first phase difference between the second signal and the first signal, wherein the second signal is a signal after the first signal is reflected by a target object; and determining a first distance between the electronic device and the target object based on the first frequency and the first phase difference.

[0372] In this way, when different electronic devices operate in different time periods, the electronic devices can also determine the distance to the target object based on the phase difference between the transmitted signal and the reflected signal.

[0373] An embodiment of the present application provides another measurement method, which is applied to a router, wherein a first communication connection is established between the router and a first electronic device, and a second communication connection is established between the router and a second electronic device; the method includes: obtaining a first device identification of the first electronic device; determining a first working instruction based on the first device identification, the first working instruction is used to indicate a first moment and / or a first frequency, the first moment is the moment when the first electronic device transmits a first signal, and the first frequency is the modulation frequency of the first signal; sending the first working instruction to the first electronic device through the first communication connection; obtaining a second device identification of the second electronic device; determining a second working instruction based on the second device identification, the second working instruction is used to indicate a third moment and / or a second frequency, the third moment is the moment when the second electronic device transmits a third signal, and the second frequency is the modulation frequency of the third signal; sending the second working instruction to the second electronic device through the second communication connection.

[0374] In this embodiment, the router may be the above Fig. 9 and Fig.10 In the router 300 of the illustrated embodiment, the first electronic device may be Fig. 9 and Fig.10 In the electronic device 100 of the embodiment shown, the second electronic device may be Fig. 9 and Fig.10 The electronic device 200 in the illustrated embodiment. The first working instruction may be Fig.10 In the embodiment shown, the work instruction 1 and the second work instruction can be Fig.10 The working instruction 2 in the illustrated embodiment. The first signal may be a signal transmitted by the electronic device 100 , and the third signal may be a signal transmitted by the electronic device 200 .

[0375] In one possible implementation, the first working instruction includes a first time offset and / or a first frequency offset, the first time offset indicates the time interval between a first moment and a preset standard transmission moment, and the first frequency offset is the frequency difference between the first frequency and the preset transmission frequency; the second working instruction includes a second time offset and / or a second frequency offset, the second time offset indicates the time interval between a third moment and the preset standard transmission moment, and the second frequency offset is the frequency difference between the second frequency and the preset transmission frequency.

[0376] In a possible implementation, the first working instruction includes a first time and / or a first frequency; the second working instruction includes a third time and / or a second frequency.

[0377] In this way, the router can send a work instruction to the electronic device, indicating the transmission time and transmission frequency of the electronic device. It should be noted that the router can also be replaced by other electronic devices, and this application does not limit this.

[0378] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0379] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.

[0380] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0381] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.

Claims

1. A measurement method, characterized in that: Applied to an electronic device, the electronic device comprises a first time-of-flight TOF module; the method comprises: Determining a first time based on a first device identifier of the electronic device; At the first moment, controlling the first TOF module to transmit a first signal; Controlling the first TOF module to receive a second signal, and recording a second time when the second signal is received, where the second signal is a signal obtained after the first signal is reflected by a target object; A first distance between the electronic device and the target object is determined based on the first time and the second time.

2. The method according to claim 1, characterized in that The determining the first time based on the first device identification of the electronic device specifically includes: Determine a first time offset based on the first device identifier, where the first time offset is used to indicate a time interval between the first moment and a preset standard transmission moment; The first time is determined based on the first time offset and the standard transmission time.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: A first frequency is determined based on a first device identifier of the electronic device, where the first frequency is a modulation frequency of the first signal.

4. The method according to claim 3, characterized in that The determining the first frequency based on the first device identifier of the electronic device specifically includes: determining a first frequency offset based on the first device identifier, where the first frequency offset is used to indicate a frequency difference between the first frequency and a preset transmission frequency; The first frequency is determined based on the first frequency offset and the preset transmission frequency.

5. A measurement method, characterized in that: Applied to an electronic device, the electronic device includes a first TOF module; the method includes: determining a first frequency based on a first device identifier of the electronic device; At a first moment, controlling the first TOF module to transmit a first signal, wherein a modulation frequency of the first signal is the first frequency; Controlling the first TOF module to receive a second signal, and recording a second time when the second signal is received, where the second signal is a signal obtained after the first signal is reflected by a target object; A first distance between the electronic device and the target object is determined based on the first time and the second time.

6. A measurement method, characterized in that: Applied to an electronic device, the electronic device includes a first TOF module; the method includes: determining a first frequency based on a first device identifier of the electronic device; Controlling the first TOF module to transmit a first signal, wherein a modulation frequency of the first signal is the first frequency; Controlling the first TOF module to receive a second signal, and determining a first phase difference between the second signal and the first signal, where the second signal is a signal obtained after the first signal is reflected by a target object; A first distance between the electronic device and the target object is determined based on the first frequency and the first phase difference.

7. The method according to claim 6, characterized in that The determining the first frequency based on the first device identifier of the electronic device specifically includes: determining a first frequency offset based on the first device identifier, where the first frequency offset is used to indicate a frequency difference between the first frequency and a preset transmission frequency; The first frequency is determined based on the first frequency offset and the transmit frequency.

8. The method according to claim 6 or 7, characterized in that: The method further comprises: A first time is determined based on a first device identifier of the electronic device, where the first time is a time when the first signal is transmitted.

9. The method according to claim 8, characterized in that The determining the first time based on the first device identification of the electronic device specifically includes: Determine a first time offset based on the first device identifier, where the first time offset is used to indicate a time interval between the first moment and a preset standard transmission moment; The first time is determined based on the first time offset and the standard transmission time.

10. A measurement method, characterized in that: Applied to an electronic device, the electronic device includes a first TOF module; the method includes: Determining a first time based on a first device identifier of the electronic device; At the first moment, controlling the first TOF module to transmit a first signal; Controlling the first TOF module to receive a second signal, and determining a first phase difference between the second signal and the first signal, where the second signal is a signal obtained after the first signal is reflected by a target object; A first distance between the electronic device and the target object is determined based on the first frequency and the first phase difference.

11. A measurement method, characterized in that: Applied to a router, the router establishes a first communication connection with the first electronic device, and the router establishes a second communication connection with the second electronic device; the method includes: Acquire a first device identification of the first electronic device; Determine a first working instruction based on the first device identifier, where the first working instruction is used to indicate a first time and / or a first frequency, where the first time is a time when the first electronic device transmits a first signal, and the first frequency is a modulation frequency of the first signal; sending the first working instruction to the first electronic device through the first communication connection; Acquire a second device identification of the second electronic device; Determine a second working instruction based on the second device identifier, where the second working instruction is used to indicate a third time and / or a second frequency, where the third time is the time when the second electronic device transmits a third signal, and the second frequency is a modulation frequency of the third signal; The second work instruction is sent to the second electronic device through the second communication connection.

12. The method according to claim 11, characterized in that The first working instruction includes a first time offset and / or a first frequency offset, wherein the first time offset indicates a time interval between the first moment and a preset standard transmission moment, and the first frequency offset indicates a frequency difference between the first frequency and a preset transmission frequency; The second working instruction includes a second time offset and / or a second frequency offset, wherein the second time offset indicates the time interval between the third moment and a preset standard emission moment, and the second frequency offset is the frequency difference between the second frequency and a preset emission frequency.

13. The method according to claim 11, characterized in that The first working instruction includes the first time and / or the first frequency; the second working instruction includes the third time and / or the second frequency.

14. A measurement system, characterized in that: The device comprises a router, a first electronic device and a second electronic device; the first electronic device comprises a first time-of-flight TOF module, and the second electronic device comprises a second TOF module; a first communication connection is established between the router and the first electronic device, and a second communication connection is established between the router and the second electronic device; The router is used to obtain a first device identifier and a second device identifier, wherein the first device identifier is used to identify the first electronic device, and the second device identifier is used to identify the second electronic device; The router is further used to determine a first working instruction based on the first device identifier, where the first working instruction is used to indicate a first time and / or a first frequency, where the first time is a time when the first electronic device controls the first TOF module to transmit a first signal to the target object, and the first frequency is a modulation frequency of the first signal; The router is further used to send the first working instruction to the first electronic device based on the first communication connection; The router is further used to determine a second working instruction based on the second device identifier, the second working instruction is used to indicate a third time and a second frequency, the third time is the time when the second electronic device controls the second TOF module to transmit a third signal to the target object, and the second frequency is a modulation frequency of the third signal; The router is further used to send the second working instruction to the second electronic device based on the second communication connection; The first electronic device is used to determine the first time and / or the first frequency based on the first working instruction; The first electronic device is further used to control the first TOF module to transmit a first signal; The first electronic device is further used to control the first TOF module to receive a second signal, where the second signal is a signal of the first signal after being reflected by the target object; The first electronic device is further used to determine a first distance between the first electronic device and the target object based on the first signal and the second signal; The second electronic device is used to determine a third time and a second frequency based on the second working instruction; The second electronic device is further used to control the second TOF module to transmit a third signal; The second electronic device is further used to control the second TOF module to receive a fourth signal, where the fourth signal is a signal obtained by reflecting the third signal from the target object; The second electronic device is further configured to determine a second distance between the second electronic device and the target object based on the third signal and the fourth signal.

15. The system according to claim 14, characterized in that The determining a first distance between the first electronic device and the target object based on the first signal and the second signal specifically includes: Determine a first distance between the first electronic device and the target object based on a transmission time of the first signal and a reception time of the second signal; or, A first distance between the first electronic device and the target object is determined based on a first phase difference between the second signal and the first signal.

16. An electronic device, which is an electronic device, characterized in that: include: One or more processors, one or more memories, and a TOF module; the one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method described in any one of claims 1 to 10.

17. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method described in any one of claims 1 to 10.

18. A router, characterized in that: include: One or more processors and one or more memories; the one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the router executes the method described in any one of claims 11 to 13.

19. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on a router, the router is caused to execute the method according to any one of claims 11 to 13.