Method, apparatus, and storage medium for detecting a moving direction of an object

By utilizing a combination of multiple transmitting units and a single receiving unit within the detection cycle to construct a sampling signal and perform differential processing, the problem of the inability to identify the direction of object movement in existing technologies is solved, achieving accurate, low-cost, and low-energy object movement direction detection.

CN122362360APending Publication Date: 2026-07-10SHENZHEN GOODIX TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610721943.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-22
Publication Date
2026-07-10

Smart Images

  • Figure CN122362360A_ABST
    Figure CN122362360A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and storage medium for detecting the direction of movement of an object. The method includes: within each detection cycle, controlling multiple transmitting units at different positions to sequentially transmit detection signals according to preset multiple time windows, wherein the multiple transmitting units form at least two transmitting unit modules; obtaining detection data for each time window through a receiving unit located between the multiple transmitting units; obtaining a sampling signal corresponding to each time window based on the detection data obtained within multiple consecutive detection cycles; determining a target sampling signal corresponding to each transmitting unit module based on the sampling signals corresponding to each time window; performing differential processing on at least one pair of target sampling signals to obtain corresponding differential signals; determining whether a moving object appears in the target area based on the amplitude of the differential signal; and determining the direction of movement of the object based on the changing trend of the differential signal in response to the appearance of a moving object in the target area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of detection technology, and in particular to a method, apparatus, electronic device, and storage medium for detecting the direction of movement of an object. Background Technology

[0002] In fields such as intelligent control and human-computer interaction, technologies based on detecting the movement of objects using reflected signals have been gradually applied. In a typical solution, an electronic device transmits a detection signal to a target area via a transmitting unit and captures the echo signal reflected by the object using a receiving unit. The strength of the echo signal is then used to determine whether an object has passed through the target area. However, existing technologies typically only determine whether a moving object exists within the target area, but cannot further identify the object's specific direction of movement. For example, in a gesture control scenario, the system can sense a hand gesture, but it struggles to distinguish the direction of the wave, limiting the richness and accuracy of interactive control.

[0003] Therefore, there is an urgent need for a technology to detect the direction of an object's movement, which can identify the specific direction of the object's movement. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method, apparatus, electronic device, and storage medium for detecting the direction of movement of an object, which at least partially solves the above-mentioned problems.

[0005] This application provides a method for detecting the direction of object movement, comprising: within each detection cycle, controlling multiple transmitting units at different positions to sequentially transmit detection signals to a target area according to multiple preset time windows, wherein the multiple transmitting units constitute at least two transmitting unit modules; receiving a signal to be tested in each time window through a receiving unit located between the multiple transmitting units, and obtaining detection data for each time window; wherein the signal to be tested includes an echo signal formed by the detection signal being reflected by an object; obtaining a sampling signal corresponding to each time window based on the detection data obtained in each of the multiple consecutive detection cycles; determining a target sampling signal corresponding to each transmitting unit module based on the sampling signal corresponding to each time window, performing differential processing on at least one pair of target sampling signals to obtain a corresponding differential signal; determining whether a moving object appears in the target area based on the amplitude of the differential signal; and determining the changing trend of the differential signal and the direction of object movement based on the changing trend of the differential signal in response to the appearance of a moving object in the target area.

[0006] In some optional embodiments, determining the variation trend of the differential signal based on the filtered signal obtained by the filtering process includes: determining the DC component of the filtered signal based on the target band where the absolute value of the slope in the filtered signal is less than a predetermined threshold; removing the DC component from the filtered signal to obtain a DC removed signal; and determining the variation trend of the differential signal based on the DC removed signal.

[0007] In some optional embodiments, determining the variation trend of the differential signal based on the DC removal signal includes: mapping the signal value of the DC removal signal to a corresponding target value according to a discrete mapping relationship to obtain a discrete signal; wherein the discrete mapping relationship is used to indicate the mapping relationship between the amplitude range to which the signal value belongs and the target value; and determining the variation trend of the differential signal based on the discrete signal.

[0008] In some optional embodiments, determining the trend of the differential signal based on the discrete signal includes: for the (i+1)th sampling point in the discrete signal, determining a trend parameter for the (i+1)th sampling point based on the difference between the target value of the (i+1)th sampling point and the target value of the ith sampling point; wherein, when the difference is greater than zero, the trend parameter is a first parameter, which indicates an upward trend; when the difference is equal to zero, the trend parameter is a second parameter, which indicates a stable trend; when the difference is less than zero, the trend parameter is a third parameter, which indicates a downward trend, where i is a positive integer greater than zero and less than the number of sampling points; and determining the trend of the differential signal based on the trend parameter.

[0009] In some optional embodiments, the plurality of transmitting units includes a first transmitting unit and a second transmitting unit, the plurality of time windows includes a first time window and a second time window, and the transmitting unit module includes a first module and a second module, the first module including a first transmitting unit and the second module including a second transmitting unit; the step of controlling the plurality of transmitting units at different positions to sequentially transmit detection signals to the target area according to the preset plurality of time windows in each detection cycle includes: controlling the first transmitting unit to transmit the detection signal to the target area in the first time window and controlling the second transmitting unit to transmit the detection signal to the target area in the second time window in each detection cycle; the step of determining the target sampling corresponding to each transmitting unit module based on the sampling signal corresponding to each of the time windows. The method for processing at least one pair of target sampling signals to obtain a differential signal includes: determining the sampling signal corresponding to the first time window as a first target sampling signal corresponding to the first module; determining the sampling signal corresponding to the second time window as a second target sampling signal corresponding to the second module; performing differential processing on the first target sampling signal and the second target sampling signal to obtain a first differential signal; and determining the changing trend of the differential signal and the moving direction of the object in response to the appearance of a moving object in the target area includes: determining the changing trend of the first differential signal and determining a first moving direction of the object in response to the appearance of a moving object in the target area.

[0010] In some optional embodiments, within each detection cycle, the plurality of transmitting units further includes a third transmitting unit, and the plurality of time windows further includes a third time window. The transmitting unit module includes a third module and at least one of the following modules: a fourth module, a fifth module, and a sixth module, wherein the third module includes the third transmitting unit, the fourth module includes the first transmitting unit and the second transmitting unit, the fifth module includes the first transmitting unit and the third transmitting unit, and the sixth module includes the second transmitting unit and the third transmitting unit. The method of controlling multiple transmitting units at different positions to sequentially transmit detection signals to the target area according to multiple preset time windows within each detection cycle further includes: controlling the third transmitting unit to transmit the detection signal to the target area in a third time window; determining the target sampling signal corresponding to each transmitting unit module based on the sampling signals corresponding to each of the time windows; performing differential processing on at least one pair of the target sampling signals to obtain a differential signal, further includes: determining the sampling signal corresponding to the third time window as the third target sampling signal corresponding to the third module, and at least one of the following three steps: averaging the sampling signal corresponding to the first time window and the sampling signal corresponding to the second time window to obtain the fourth target sampling signal corresponding to the fourth module; performing differential processing on the third target sampling signal and the fourth target sampling signal to obtain a second differential signal; averaging the sampling signal corresponding to the first time window and the sampling signal corresponding to the third time window to obtain the third target sampling signal. The fifth target sampling signal corresponding to the fifth module; differential processing is performed on the second target sampling signal and the fifth target sampling signal to obtain a third differential signal; average processing is performed on the sampling signal corresponding to the second time window and the sampling signal corresponding to the third time window to obtain a sixth target sampling signal corresponding to the sixth module; differential processing is performed on the first target sampling signal and the sixth target sampling signal to obtain a fourth differential signal; the step of determining the changing trend of the differential signal and determining the moving direction of the object in response to the appearance of a moving object in the target area further includes at least one of the following three steps: determining the changing trend of the second differential signal and determining the second moving direction of the object based on the changing trend of the second differential signal; determining the changing trend of the third differential signal and determining the third moving direction of the object based on the changing trend of the third differential signal; determining the changing trend of the fourth differential signal and determining the fourth moving direction of the object based on the changing trend of the fourth differential signal.

[0011] In some alternative embodiments, the method is used for an electronic device including a screen, the screen having a dimensional orientation including a width direction, a height direction, and a thickness direction, and the line connecting the first transmitting unit and the second transmitting unit is parallel to the width direction or the height direction of the screen.

[0012] In some alternative embodiments, the third transmitting unit is located on the perpendicular bisector of the line connecting the first transmitting unit and the second transmitting unit.

[0013] This application embodiment also provides an apparatus for detecting the direction of object movement, comprising: a transmission control module, configured to control multiple transmitting units at different positions to sequentially transmit detection signals to a target area according to multiple preset time windows in each detection cycle, wherein the multiple transmitting units constitute at least two transmitting unit modules; a receiving control module, configured to receive a signal to be tested in each time window through a receiving unit located between the multiple transmitting units, and obtain detection data for each time window; wherein the signal to be tested includes an echo signal formed by the detection signal being reflected by an object; a sampling control module, configured to obtain a sampling signal corresponding to each time window based on the detection data obtained in each of the multiple consecutive detection cycles; a differential module, configured to determine a target sampling signal corresponding to each transmitting unit module based on the sampling signal corresponding to each time window; perform differential processing on at least one pair of target sampling signals to obtain a corresponding differential signal; a judgment module, configured to determine whether a moving object appears in the target area based on the amplitude of the differential signal; and a direction determination module, configured to determine the changing trend of the differential signal in response to the appearance of a moving object in the target area, and determine the direction of object movement based on the changing trend of the differential signal.

[0014] This application also provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to any of the methods described in the above embodiments.

[0015] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any of the above embodiments.

[0016] In this embodiment, by setting multiple time windows within each detection cycle and utilizing multiple transmitting units at different locations to sequentially transmit detection signals within different time windows, coupled with a single receiving unit to receive the signal to be tested, detection data corresponding to different transmitting units can be acquired in different time windows. Furthermore, by constructing sampling signals corresponding to each time window, sampling signals corresponding to the corresponding transmitting units can be constructed, and the target sampling signal corresponding to the transmitting unit module composed of the transmitting units can be determined based on the sampling signals. By performing differential processing on at least one pair of target sampling signals, static background noise and environmental interference in the target sampling signals can be effectively suppressed, highlighting signal changes caused by object movement and improving the signal-to-noise ratio. The amplitude of the differential signal can sensitively determine whether a moving object exists in the target area. If no moving object appears in the target area, the operation to determine the object's movement direction can be skipped, thereby reducing energy consumption. Only when a moving object appears in the target area is the subsequent operation to determine the object's movement direction performed. When determining the object's movement direction, the fixed relationship between the changing trend of the differential signal and the object's movement direction can be used to accurately determine the object's movement direction, achieving object movement direction identification. In addition, in this embodiment, only a single receiving unit is needed to identify the direction of object movement, which can effectively reduce the hardware cost and algorithm complexity of identifying the direction of object movement. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0018] Figure 1 This is a schematic diagram of a detection system provided in an optional embodiment of this application; Figure 2 This is a schematic diagram of another detection system provided in an optional embodiment of this application; Figure 3 This is a flowchart of a method for detecting the direction of movement of an object provided in an optional embodiment of this application; Figure 4 This is provided by an optional embodiment of this application. Figure 1 A schematic diagram of step S110 in the process; Figure 5 This is provided by an optional embodiment of this application. Figure 1 A schematic diagram of step S140 in the process; Figure 6 This is provided by an optional embodiment of this application. Figure 1 A schematic diagram of step S160 in the process; Figure 7 This is a schematic diagram of an object moving between a first launching unit and a second launching unit, provided in an optional embodiment of this application; Figure 8 This is another schematic diagram of an object moving between the first and second launching units, provided in an optional embodiment of this application; Figure 9 This is a schematic diagram of a sampling signal provided in an optional embodiment of this application; Figure 10 This is a schematic diagram of a first differential signal provided in an optional embodiment of this application; Figure 11 This is a schematic diagram of a filtered signal and a DC removal signal provided in an optional embodiment of this application; Figure 12 This is a schematic diagram of a discrete signal provided in an optional embodiment of this application; Figure 13 This is a schematic diagram of the corresponding curves of sampling points and trend parameters provided in an optional embodiment of this application; Figure 14 This is a schematic diagram of the structure of a device for detecting the direction of movement of an object provided in an optional embodiment of this application; Figure 15 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of this application. Detailed Implementation

[0019] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.

[0020] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “an,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0021] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0022] This application provides a method, apparatus, electronic device, and storage medium for detecting the direction of movement of an object, so as to at least partially solve the above-mentioned problems existing in the prior art.

[0023] Figure 1 and Figure 2 A schematic diagram of a detection system 10 applying the method for detecting the direction of object movement according to this application is shown. The system 10 may include multiple transmitting units 110 located at different positions and a receiving unit 120 located among the multiple transmitting units 110. For example, as... Figure 1 As shown, the system includes two transmitting units 110 and a receiving unit 120 located between the two transmitting units 110. For example... Figure 2 As shown, the system includes three transmitting units 110 and a receiving unit 120 located between the three transmitting units 110. It should be understood that the specific number of transmitting units 110 and receiving units 120 is not limited in this embodiment. The transmitting units 110 are used to transmit detection signals to a target area, and the receiving units 120 are used to receive signals of a specific frequency and wavelength to be measured. Of course, the signals to be measured include echo signals formed by the reflection of the detection signals by an object. The receiving units 120 are located between the multiple transmitting units 110 to facilitate the reception of echo signals formed by the detection signals transmitted by each transmitting unit 110. The target area is a predetermined area faced by the transmitting units 110 and the receiving units 120, and the extent of the predetermined area can be determined based on the performance and arrangement of the transmitting units 110 and the receiving units 120.

[0024] like Figure 3 As shown in the embodiments of this application, the method for detecting the direction of object movement includes: S110. In each detection cycle, according to multiple preset time windows, multiple transmitting units at different positions are controlled to transmit detection signals to the target area in sequence, wherein the multiple transmitting units form at least two transmitting unit modules.

[0025] The detection period for detecting the direction of object movement can include multiple non-overlapping time windows. Each time window represents a time interval during which the receiving unit samples the received signal to be tested. A predetermined correspondence can exist between the transmitting unit and the time window; specifically, one transmitting unit can correspond to one time window. For example, when multiple transmitting units include a first transmitting unit and a second transmitting unit, the detection period can include two time windows: a first time window and a second time window. The first transmitting unit transmits a detection signal to the target area during the first time window, and the second transmitting unit transmits a detection signal to the target area during the second time window; that is, the first transmitting unit corresponds to the first time window, and the second transmitting unit corresponds to the second time window.

[0026] Based on multiple preset time windows and the correspondence between time windows and transmitting units, multiple transmitting units can be controlled to sequentially transmit detection signals to the target area according to the time order of the time windows. Specifically, the transmitting unit corresponding to the time window can transmit the detection signal within the time window, or it can transmit the detection signal at a predetermined time before the time window. The predetermined time can be determined based on the wave velocity of the detection signal and the distance from the transmitting unit and the receiving unit to the target area, as long as it ensures that the receiving unit can receive the echo signal formed by the reflection of the detection signal of the corresponding transmitting unit by the object when there is an object in the target area within the time window.

[0027] The number of transmitting units can be two, three, four, six, or other suitable numbers, and the number of time windows can be equal to or greater than the number of transmitting units. Each transmitting unit module can include one or more transmitting units, and the same transmitting unit can belong to only one transmitting unit module or to multiple transmitting unit modules simultaneously.

[0028] S120. The receiving unit, located among multiple transmitting units, receives the signal to be tested in each time window to obtain the detection data for each time window. The signal to be tested includes the echo signal formed by the reflection of the detection signal by the object.

[0029] The receiving unit, located among multiple transmitting units, can form a sensor module for detecting the direction of object movement together with the multiple transmitting units. An electronic device employing the method of this application can have one sensor module or multiple sensor modules; this embodiment does not impose any limitation on this. Preferably, a sensor module contains one receiving unit to reduce hardware costs. However, a sensor module can also contain multiple receiving units to improve the flexibility of receiving the signal to be measured in various time windows. It should be noted that "located among multiple transmitting units" can be understood as being located between any two transmitting units; that is, for any two transmitting units, the receiving unit is located in the area between those two transmitting units.

[0030] When there is only one receiving unit, the signal to be tested can be received in each time window through time division multiplexing.

[0031] It should be understood that the end time of the time window should be later than the time when the target echo signal of the time window arrives at the receiving unit. The target echo signal of the time window is the echo signal formed by the reflection of the detection signal emitted by the transmitting unit corresponding to the time window by the object located in the target area.

[0032] In some optional embodiments, the detection signal emitted by the transmitting unit can be an infrared signal, a laser / visible light signal, an acoustic signal, or a radio frequency signal, etc. Correspondingly, the receiving unit can be a sensor for detecting infrared signals, laser / visible light signals, acoustic signals, or radio frequency signals. This embodiment does not limit the specific types of the transmitting unit and the receiving unit.

[0033] Optionally, in the embodiments of this application, the spacing between the transmitting unit and the receiving unit satisfies the following formula:

[0034] In the formula, v is a preset velocity threshold, used to limit the upper limit of the object's velocity to ensure that the detection of the direction of movement can achieve a predetermined accuracy. D is the distance between the transmitting unit and the receiving unit. For detection frequency, The value is the reciprocal of the detection period. N is a preset sampling threshold, representing the minimum number of samples required to achieve the predetermined accuracy.

[0035] According to the above formula, by adjusting D and The value should be set to ensure the accuracy of the method implemented in this embodiment.

[0036] S130. Based on the detection data obtained in each time window within multiple consecutive detection cycles, obtain the sampling signal corresponding to each time window.

[0037] Within each detection cycle, multiple time windows can be included, each corresponding to the detection data reflected by different transmitting units. Each detection cycle can obtain a set of detection data corresponding to a sampling point. The detection data of each time window corresponds to the echo signal after reflection by the object from the detection signal emitted by different transmitting units. For example, the detection data obtained in the first time window corresponds to the echo signal after reflection by the object from the detection signal emitted by the first transmitting unit. Arranging the detection data of the same time window in multiple detection cycles according to the sampling time sequence yields the sampling signal corresponding to that type of time window. It should be understood that the sampling signal is a data sequence formed by the detection data within multiple detection cycles. For example, when the multiple transmitting units include two transmitting units (a first transmitting unit and a second transmitting unit), and the detection cycle includes two time windows (a first time window and a second time window), the sampling signal 143 corresponding to the first time window and the sampling signal 144 corresponding to the second time window can be as follows: Figure 9 As shown. It should be noted that, Figures 9-13 The horizontal axis represents the serial number of the sampling point, which is the serial number of the sampling points sorted according to the order of sampling time. Figures 9-12 The vertical axis represents the signal amplitude corresponding to the signal. Figure 13 The vertical axis represents the value of the trend parameter corresponding to the sampling point, which will not be elaborated further below.

[0038] S140. Based on the sampling signals corresponding to each time window, determine the target sampling signal corresponding to each transmitting unit module, and perform differential processing on at least one pair of target sampling signals to obtain the corresponding differential signal.

[0039] When the transmitting unit module includes only one transmitting unit, the sampling signal corresponding to the time window of that transmitting unit can be determined as the target sampling signal corresponding to the transmitting unit module. The time window of the transmitting unit is simply the time window corresponding to that transmitting unit. When the transmitting unit module includes two or more transmitting units, the sampling signals corresponding to the time windows of each transmitting unit can be averaged, and the resulting average signal can be used as the target sampling signal corresponding to the transmitting unit module. It should be understood that each pair of target sampling signals includes two different target sampling signals. In this embodiment, a pair of target sampling signals can be differentially processed to obtain a differential signal. Alternatively, multiple pairs of target sampling signals can be differentially processed separately to obtain multiple differential signals. For the two transmitting unit modules corresponding to a pair of target sampling signals undergoing differential processing, the transmitting units of these two transmitting unit modules may not overlap, thereby ensuring that the pair of target sampling signals undergoing differential processing has sufficient difference, so that the differential signal obtained can more significantly reflect the influence of object movement.

[0040] S150. Based on the amplitude of the differential signal, determine whether there is a moving object in the target area.

[0041] In some optional embodiments, an amplitude threshold can be preset to determine whether a moving object exists. The presence of a moving object in the target area is determined by whether the maximum amplitude of the differential signal exceeds the preset amplitude threshold. When the maximum amplitude exceeds the preset amplitude threshold, it can be determined that a moving object exists in the target area; when the maximum amplitude does not exceed the preset amplitude threshold, it can be determined that no moving object exists in the target area. The amplitude threshold can be determined through experiments iterating through various thresholds, or it can be calculated using relevant formulas; this embodiment does not impose any limitations on this.

[0042] S160. In response to the appearance of a moving object in the target area, determine the changing trend of the differential signal, and determine the direction of the object's movement based on the changing trend of the differential signal.

[0043] The receiving unit is located between any two of the multiple transmitting units. For any two transmitting units, when an object moves between them, the sampled signals received within the corresponding time windows of those two units gradually change, causing changes in the corresponding differential processing. This results in a one-to-one correspondence between the changing trend of the differential signal and the object's direction of movement. For details, please refer to the description of step S161 in this embodiment. This application embodiment can determine the object's direction of movement based on the changing trend of the differential signal and its correspondence with the object's direction of movement.

[0044] In some optional embodiments, mapping information for representing the correspondence between the changing trend of the differential signal and the direction of movement of the object can be preset according to the correspondence between the trend of the differential signal and the direction of movement of the object.

[0045] Determining the direction of an object's movement based on the changing trend of the differential signal can include: mapping the changing trend of the differential signal to the object's direction of movement based on the pre-defined mapping information. This allows for a simple and quick determination of the object's direction of movement based on the pre-defined mapping information.

[0046] In this embodiment, in response to the absence of a moving object in the target area, subsequent operations on the direction of movement of the detected object can be stopped, thereby releasing the computing resources occupied by subsequent operations and saving corresponding computing power.

[0047] The following example illustrates the method of this application embodiment using the following example: multiple transmission units including a first transmission unit and a second transmission unit, multiple time windows including a first time window and a second time window, a transmission unit module including a first module and a second module, the first module including a first transmission unit, and the second module including a second transmission unit.

[0048] like Figure 4-6 As shown, step S110 may include: S111. During each detection cycle, the first transmitting unit is controlled to transmit a detection signal to the target area in the first time window, and the second transmitting unit is controlled to transmit a detection signal to the target area in the second time window.

[0049] Step S140 may include: S141. The sampling signal corresponding to the first time window is determined as the first target sampling signal corresponding to the first module; the sampling signal corresponding to the second time window is determined as the second target sampling signal corresponding to the second module; the first target sampling signal and the second target sampling signal are differentially processed to obtain the first differential signal.

[0050] For example, the sampling signal 143 corresponding to the first time window and the sampling signal 144 corresponding to the second time window can be seen in... Figure 9 When the sampling signal 143 corresponding to the first time window is used as the first target sampling signal and the sampling signal 144 corresponding to the second time window is used as the second target sampling signal, the obtained first differential signal 145 can be found in [reference needed]. Figure 10 As shown.

[0051] Step S150 may include: determining whether a moving object appears in the target area based on the amplitude of the first differential signal.

[0052] Step S160 may include: S161. In response to the appearance of a moving object in the target area, determine the changing trend of the first differential signal, and determine the first moving direction of the object based on the changing trend of the first differential signal. Optionally, the straight line containing the first moving direction may be parallel to the line connecting the first transmitting unit and the second transmitting unit, or there may be an angle greater than 0 and less than a predetermined angle threshold between the straight line containing the first moving direction and the line connecting the first transmitting unit and the second transmitting unit. For example, the angle threshold may be 5 degrees, 10 degrees, or 15 degrees, etc., and this embodiment does not limit the specific range of the angle threshold.

[0053] like Figure 7 and Figure 8As shown, since the receiving unit 120 is located between the first transmitting unit 111 of the first module and the second transmitting unit 112 of the second module, when the object 130 moves from the first transmitting unit 111 to the second transmitting unit 112, the echo signal 142 formed by the reflection of the detection signal 141 by the object 130 will change with the movement of the object 130. Based on the change of the echo signal 142, when the object 130 moves from the first transmitting unit 111 to the receiving unit 120, the detection data obtained by the receiving unit 120 in the first window will first increase and then decrease, while the detection data obtained by the receiving unit 120 in the second window will remain basically unchanged. When the object 130 moves from the receiving unit 120 to the first transmitting unit 111, the detection data obtained by the receiving unit 120 in the first window remains basically unchanged, while the detection data obtained by the receiving unit 120 in the second window will first increase and then decrease. Therefore, when the object 130 moves from the first transmitting unit 111 to the second transmitting unit 112, the first differential signal will show a trend of first increasing and then decreasing. Similarly, when object 130 moves from the second transmitting unit 112 to the first transmitting unit 111, the first differential signal will exhibit a trend of first decreasing and then increasing. Based on this, mapping information can be set to include first mapping information: the trend of the first differential signal increasing and then decreasing maps to the direction from the first transmitting unit 111 to the second transmitting unit 112, and the trend of the first differential signal decreasing and then increasing maps to the direction from the second transmitting unit 112 to the first transmitting unit 111. Thus, based on the trend of the first differential signal and this first mapping information, the first direction of movement of object 130 can be quickly determined.

[0054] As can be seen from the above embodiments, which include multiple transmitting units (including a first transmitting unit and a second transmitting unit), multiple time windows (including a first time window and a second time window), and a transmitting unit module (including a first module and a second module), where the first module includes a first transmitting unit and the second module includes a second transmitting unit, this application only requires two transmitting units and one receiving unit to realize the detection of the object's movement direction. The hardware structure is simple and the cost is low, which can reduce the power consumption and hardware space occupied by the method implementation. It is suitable for compact portable electronic devices, such as mobile phones, tablets, and smartwatches.

[0055] In this embodiment, by setting multiple time windows within each detection cycle and utilizing multiple transmitting units at different locations to sequentially transmit detection signals within different time windows, coupled with a single receiving unit to receive the signal to be tested, detection data corresponding to different transmitting units can be acquired in different time windows. Furthermore, by constructing sampling signals corresponding to each time window, sampling signals corresponding to the corresponding transmitting units can be constructed, and the target sampling signal corresponding to the transmitting unit module composed of the transmitting units can be determined based on the sampling signals. By performing differential processing on at least one pair of target sampling signals, static background noise and environmental interference in the target sampling signals can be effectively suppressed, highlighting signal changes caused by object movement and improving the signal-to-noise ratio. The amplitude of the differential signal can sensitively determine whether a moving object exists in the target area. If no moving object appears in the target area, the operation to determine the object's movement direction can be skipped, thereby reducing energy consumption. Only when a moving object appears in the target area is the subsequent operation to determine the object's movement direction performed. When determining the object's movement direction, the fixed relationship between the changing trend of the differential signal and the object's movement direction can be used to accurately determine the object's movement direction, achieving object movement direction identification. In addition, in this embodiment, only a single receiving unit is needed to identify the direction of object movement, which can effectively reduce the hardware cost and algorithm complexity of identifying the direction of object movement.

[0056] In some optional embodiments, the plurality of transmitting units further includes a third transmitting unit, the plurality of time windows further includes a third time window, and the transmitting unit module includes a third module and at least one of the following modules: a fourth module, a fifth module, and a sixth module, wherein the third module includes a third transmitting unit, the fourth module includes a first transmitting unit and a second transmitting unit, the fifth module includes a first transmitting unit and a third transmitting unit, and the sixth module includes a second transmitting unit and a third transmitting unit.

[0057] By setting a third transmitting unit, the number of transmitting unit modules can be greatly expanded, such as a third, fourth, fifth, and sixth module, thus forming multiple pairs of target sampling signal combinations. Using the differential signals corresponding to these target sampling signal combinations, object movement detection in different directions can be performed separately. This significantly increases the directional dimension of detected object movement directions without adding a single transmitting unit or a receiving unit. Compared to a scheme with only two transmitting units, the three-transmitter scheme in this embodiment can detect object movement in multiple predetermined directions, expanding multi-directional detection and significantly improving the flexibility and applicability of object movement detection. Furthermore, the multi-directional detection results obtained from the three transmitting units can be redundant. When detection in one direction is interfered with, normal detection results can be obtained using detections in other directions, effectively improving the robustness and anti-interference capability of detecting object movement directions.

[0058] like Figure 4 As shown, step S110 may further include: S112. During each detection cycle, control the third transmitting unit to transmit a detection signal to the target area in the third time window.

[0059] like Figure 5 As shown, step S140 may further include: determining the sampling signal corresponding to the third time window as the third target sampling signal corresponding to the third module, and at least one of S142-S144 below. Exemplarily, step S140 may include any one, any two, or all three of S142-S144.

[0060] S142. Average the sampling signals corresponding to the first time window and the second time window to obtain the fourth target sampling signal corresponding to the fourth module; perform differential processing on the third target sampling signal and the fourth target sampling signal to obtain the second differential signal.

[0061] S143. The sampling signals corresponding to the first time window and the sampling signals corresponding to the third time window are averaged to obtain the fifth target sampling signal corresponding to the fifth module; the second target sampling signal and the fifth target sampling signal are differentially processed to obtain the third differential signal.

[0062] S144. The sampling signals corresponding to the second time window and the third time window are averaged to obtain the sixth target sampling signal corresponding to the sixth module; the first target sampling signal and the sixth target sampling signal are differentially processed to obtain the fourth differential signal.

[0063] By averaging the sampling signals corresponding to the first and second time windows, the sampling signal acquired based on the transmission detection signal of a virtual transmission unit when a virtual transmission unit is set at the midpoint between the first and second transmission units can be equivalently simulated. Similarly, by averaging the sampling signals corresponding to the first and third time windows, the sampling signal acquired based on the transmission detection signal of a virtual transmission unit when a virtual transmission unit is set at the midpoint between the first and third transmission units can be equivalently simulated. By averaging the sampling signals corresponding to the second and third time windows, the sampling signal acquired based on the transmission detection signal of a virtual transmission unit when a virtual transmission unit is set at the midpoint between the second and second transmission units can be equivalently simulated. Therefore, the embodiments of this application can simulate the sampling signal corresponding to an additional transmission unit without adding an actual transmission unit, effectively increasing the number of sampling signals without changing the hardware structure, thereby more comprehensively capturing the changes in sampling signals caused by object movement, and providing a sufficient and reliable signal basis for subsequently determining the direction of object movement.

[0064] like Figure 6 As shown, step S160 may also include at least one of the following S162-S164.

[0065] S162. Determine the changing trend of the second differential signal, and determine the second direction of movement of the object based on the changing trend of the second differential signal. Similar to the first direction of movement, the straight line containing the second direction of movement can be parallel to the line connecting the midpoint of the first and second transmitting units and the third transmitting unit, or, there can be an angle greater than zero and less than a predetermined angle threshold between the straight line containing the second direction of movement and the line connecting the midpoint of the first and second transmitting units and the third transmitting unit.

[0066] S163. Determine the trend of change of the third differential signal, and determine the third direction of movement of the object based on the trend of change of the third differential signal. The straight line containing the third direction of movement can be parallel to the line connecting the midpoint of the first and third transmitting units to the second transmitting unit, or there can be an angle greater than zero and less than a predetermined angle threshold between the straight line containing the third direction of movement and the line connecting the midpoint of the first and third transmitting units to the second transmitting unit.

[0067] S164. Determine the trend of the fourth differential signal, and determine the fourth direction of movement of the object based on the trend of the fourth differential signal. The straight line containing the fourth direction of movement can be parallel to the line connecting the midpoint of the second and third transmitting units to the first transmitting unit, or there can be an angle greater than zero and less than a predetermined angle threshold between the straight line containing the fourth direction of movement and the line connecting the midpoint of the second and third transmitting units to the first transmitting unit.

[0068] Similar to the embodiments above, the preset mapping information in this embodiment may include second mapping information, third mapping information, and fourth mapping information. The second mapping information represents the correspondence between the changing trend of the second differential signal and the second direction of movement; the third mapping information represents the correspondence between the changing trend of the third differential signal and the third direction of movement; and the fourth mapping information represents the correspondence between the changing trend of the fourth differential signal and the fourth direction of movement. Thus, the changing trend of the second differential signal is mapped to the corresponding second direction of movement according to the second mapping information, the changing trend of the third differential signal is mapped to the corresponding third direction of movement according to the third mapping information, and the changing trend of the fourth differential signal is mapped to the corresponding fourth direction of movement according to the fourth mapping information.

[0069] Specifically, when step S140 includes S142, step S160 may include S162. When step S140 includes S143, step S160 may include S163. When step S140 includes S144, step S160 may include S164.

[0070] In this embodiment, the multiple transmitting units further include a third transmitting unit, and the multiple time windows further include a third time window. The transmitting unit module includes a third module and at least one of the following modules: a fourth module, a fifth module, and a sixth module. The third module includes a third transmitting unit, the fourth module includes a first transmitting unit and a second transmitting unit, the fifth module includes a first transmitting unit and a third transmitting unit, and the sixth module includes a second transmitting unit and a third transmitting unit. A fourth target sampling signal corresponding to the fourth module is obtained by averaging the sampling signals corresponding to the first and second time windows. A second differential signal is obtained by differentially averaging the third and fourth target sampling signals. A fifth target sampling signal corresponding to the fifth module is obtained by averaging the sampling signals corresponding to the first and third time windows. A third differential signal is obtained by differentially averaging the second and fifth target sampling signals. A sixth target sampling signal corresponding to the sixth module is obtained by averaging the second and third target sampling signals. A fourth differential signal is obtained by differentially averaging the first and sixth target sampling signals. The second differential signal reflects the direction of movement of the object along the line connecting the midpoint between the first and second transmitting units and the third transmitting unit; the third differential signal reflects the direction of movement of the object along the line connecting the midpoint between the first and third transmitting units and the second transmitting unit; and the fourth differential signal reflects the direction of movement of the object along the line connecting the midpoint between the second and third transmitting units and the first transmitting unit. Through the combination and complementarity of these multiple sets of differential signals, this application can achieve movement direction detection on multiple predetermined straight lines using only three transmitting units and one receiving unit without adding additional receiving units, significantly reducing hardware cost and complexity. Furthermore, there are constraint relationships between the multiple differential signals, from the first to the fourth differential signal, allowing for mutual verification and fusion. When a signal in one direction is subject to local interference or obstruction, the remaining directional signals can still assist in the judgment, thereby significantly improving the anti-interference capability for detecting the object's movement direction.

[0071] In some alternative embodiments, step S140 may include: The sampling signals corresponding to the first time window and the sampling signals corresponding to the third time window are differentially processed to obtain the fifth differential signal.

[0072] Step S150 may include: determining whether a moving object appears in the target area based on the amplitude of the fifth differential signal.

[0073] Step S160 may include: in response to the appearance of a moving object in the target area, determining the changing trend of the fifth differential signal, and determining the fifth moving direction of the object based on the changing trend of the fifth differential signal, wherein the fifth moving direction is parallel to the line connecting the first transmitting unit and the third transmitting unit.

[0074] In some optional embodiments, step S140 may include: performing differential processing on the sampled signal corresponding to the second time window and the sampled signal corresponding to the third time window to obtain a sixth differential signal.

[0075] Step S150 may include: determining whether a moving object appears in the target area based on the amplitude of the sixth differential signal.

[0076] Step S160 may include: in response to the appearance of a moving object in the target area, determining the changing trend of the sixth differential signal, and determining the sixth moving direction of the object based on the changing trend of the sixth differential signal, wherein the sixth moving direction is parallel to the line connecting the second and third transmitting units. The specific methods for determining the fifth and sixth moving directions can be referred to the above embodiments, and will not be repeated here.

[0077] The two embodiments above can further expand the number of movement directions that can be detected in this embodiment, providing more evidence for detecting the movement direction of objects, and enabling cross-validation between multiple directions to improve the robustness and reliability of detection.

[0078] In some alternative embodiments, the method is used for an electronic device including a screen, the screen's dimensions including a width direction, a height direction, and a thickness direction. The line connecting the first transmitting unit and the second transmitting unit is parallel to either the width direction or the height direction of the screen.

[0079] It should be understood that the width direction of the screen is the direction parallel to the line connecting the user's eyes when the screen is used in the default display orientation. The height direction of the screen is the direction perpendicular to the line connecting the user's eyes when the screen is used in the default display orientation. The thickness direction of the screen is the direction perpendicular to both the width and height directions. The line connecting the first and second transmitting units can also be in other directions, such as a 45-degree angle or a 135-degree angle with the width direction of the screen.

[0080] Optionally, the transmitting and receiving units can be integrated within the screen of the electronic device to avoid the need for separate openings or other structures for mounting the transmitting and receiving units. Alternatively, the transmitting and receiving units can be located in the cover or back panel of the electronic device; this embodiment does not limit the specific location of the transmitting and receiving units. The transmitting and receiving units can be located on the same side of the electronic device to facilitate the receiving unit's reception of echo signals.

[0081] In this embodiment, the line connecting the first transmitting unit and the second transmitting unit is parallel to the width or height direction of the screen. This allows the method of this embodiment to detect the movement direction of an object in the width or height direction of the screen through the first transmitting unit and the second transmitting unit. This helps to improve the accuracy of recognizing the user's left and right swipes along the width direction of the screen or the up and down swipes along the height direction of the screen, thereby improving the user experience.

[0082] In some alternative embodiments, the third transmitting unit is located on the perpendicular bisector of the line connecting the first and second transmitting units.

[0083] In this embodiment, the first and second transmitting units can be used to detect the movement direction along the line connecting them. The third transmitting unit is located on the perpendicular bisector of the line connecting the first and second transmitting units. The first, second, and third transmitting units can be used to detect the movement direction in the orthogonal direction of the line connecting the first and second transmitting units. By combining these two movement direction detection methods, the detection of any movement direction in the two-dimensional plane can be achieved. Thus, only three transmitting units and one receiving unit are needed to achieve movement detection in any direction in the two-dimensional plane, without the need for additional receiving units or complex sensor arrays, which can effectively reduce the corresponding hardware costs.

[0084] In some optional embodiments, determining the trend of the differential signal includes: The differential signal is filtered to reduce high-frequency noise. Based on the filtered signal, the trend of the differential signal is determined.

[0085] Optionally, the filtering process performed on the differential signal can be moving average filtering or low-pass filtering, etc., and this embodiment does not limit the specific method of filtering. For example, for... Figure 10 The first differential signal 145 in the signal is filtered to obtain the following result. Figure 11 The filtered signal is 146.

[0086] As a feasible approach, the changing trend of the filtered signal can be directly determined as the changing trend of the differential signal, or the filtered signal can be processed in other ways, and the changing trend of the differential signal can be determined based on the changing trend of the processed signal.

[0087] In this embodiment, filtering the differential signal effectively removes high-frequency noise components, making the signal smoother and more stable. Based on this, determining the trend of the differential signal according to the filtered signal avoids interference from noise in trend judgment and improves the accuracy of movement direction detection.

[0088] In some optional embodiments, determining the changing trend of the differential signal based on the filtered signal obtained from the filtering process includes: The DC component of the filtered signal is determined based on the target band where the absolute value of the slope in the filtered signal is less than a predetermined threshold. The DC component is removed from the filtered signal to obtain a DC-removed signal, and the changing trend of the differential signal is determined based on the DC-removed signal. For example, from... Figure 11 After removing the corresponding DC component from the filtered signal 146 shown, the obtained DC-removed signal can be found in [reference needed]. Figure 11 DC removal signal 147 in the middle.

[0089] The aforementioned predetermined threshold is used to filter out bands with stable fluctuations in the filtered signal. For example, the predetermined threshold can be 0.1, 0.15, 0.2, etc.

[0090] In some optional embodiments, a mean operation can be performed on the target band to determine the average value of the target band signal, and this average value can be determined as the DC component. After determining the DC component, the DC component can be subtracted from the signal value of the filtered signal to obtain the DC-removed signal.

[0091] In some optional embodiments, the changing trend of the DC removal signal can be directly determined as the changing trend of the differential signal, or the DC removal signal can be subjected to other processing, and the changing trend of the differential signal can be determined based on the changing trend of the processed signal.

[0092] In this embodiment, the DC component of the filtered signal is determined based on the target band where the absolute value of the slope in the filtered signal is less than a predetermined threshold. This accurately extracts the static or quasi-static components from the filtered signal, avoiding misjudgments of the changing trend caused by slow signal drift or overall offset. After removing the DC component from the filtered signal, the resulting DC-removed signal more prominently displays dynamic change characteristics, thus more clearly and accurately reflecting the direction of object movement. Determining the changing trend of the differential signal based on the DC-removed signal can further improve the accuracy of determining the changing trend of the corresponding differential signal.

[0093] In some optional embodiments, determining the trend of the differential signal based on the DC removal signal includes: Based on the discrete mapping relationship, the signal value of the DC removal signal is mapped to the corresponding target value to obtain a discrete signal. The variation trend of the differential signal is then determined based on the discrete signal. The discrete mapping relationship indicates the mapping relationship between the amplitude range of the DC removal signal value and the target value.

[0094] Specifically, the amplitude range to which the signal value belongs can be determined from multiple amplitude ranges. Based on the discrete mapping relationship, a target value that maps to the amplitude range to which the signal value belongs can be determined, and the signal value can be mapped to the target value.

[0095] The amplitude range can be divided according to the maximum amplitude of the DC removal signal. For example, the maximum amplitude of the DC removal signal can be divided into multiple amplitude ranges. Preferably, the number of amplitude ranges can be 5 to 10.

[0096] The discrete mapping relationship can be positively correlated, meaning that the larger the signal value within the amplitude range, the larger the target value mapped to that amplitude range, thus making the trend of the discrete signal the same as that of the differential signal. For example, based on the discrete mapping relationship, [the following is a possible interpretation:] ... Figure 11 After the signal value of DC removal signal 147 is mapped to the corresponding target value, the discrete signal obtained can be found in [reference needed]. Figure 12 The discrete signal 148 is shown in the example. Exemplarily, the discrete mapping relationship can be used to indicate: the target value mapped to each amplitude range is the minimum signal value within that amplitude range; or, the target value mapped to each amplitude range is the maximum or average signal value within that amplitude range; or, the target value mapped to each amplitude range is the order of signal values ​​within that amplitude range across all amplitude ranges. Of course, the discrete mapping relationship can also be other suitable relationships, and this embodiment does not limit this.

[0097] In some optional embodiments, the trend of the discrete signal can be directly determined as the trend of the differential signal, or the discrete signal can be processed in other ways, and the trend of the differential signal can be determined based on the trend of the processed signal.

[0098] In this embodiment, a continuous DC-removed signal can be transformed into a discrete signal by using a discrete mapping relationship, thereby eliminating minor fluctuations in the DC-removed signal and highlighting the main changing characteristics of the signal. Determining the changing trend of the differential signal based on the discrete signal allows for a more intuitive and convenient identification of rising and falling trends, avoiding misjudgments caused by minor fluctuations in the continuous signal.

[0099] In some optional embodiments, determining the variation trend of the differential signal based on the discrete signal includes: For the (i+1)th sampling point in a discrete signal, the trend parameter of the (i+1)th sampling point is determined based on the difference between the target value of the (i+1)th sampling point and the target value of the ith sampling point. Specifically, when the difference is greater than zero, the first trend parameter is used, indicating an upward trend. When the difference is equal to zero, the second trend parameter is used, indicating a stable trend. When the difference is less than zero, the third trend parameter is used, indicating a downward trend. i is a positive integer greater than zero and less than the number of sampling points.

[0100] The trend of the differential signal is determined based on the trend parameters.

[0101] Specifically, if the trend parameter of a certain sampling point is the first parameter, then the trend of the differential signal at that sampling point can be determined to be an upward trend; if the trend parameter of a certain sampling point is the second parameter, then the trend of the differential signal at that sampling point can be determined to be a stable trend; and if the trend parameter of a certain sampling point is the third parameter, then the trend of the differential signal at that sampling point can be determined to be a downward trend.

[0102] Optionally, the first parameter can be 1, the second parameter can be 0, and the third parameter can be -1. For example, according to... Figure 12 The correspondence between the trend parameters obtained from the discrete signal 148 shown and the above sampling points can be found in [reference]. Figure 13 The curve shown is 149. When the trend parameter is first 1 and then -1, the trend of the differential signal is first rising and then falling. When the trend parameter is first -1 and then 1, the trend of the differential signal is first falling and then rising.

[0103] In this embodiment, by calculating the difference between the target values ​​of adjacent sampling points of the discrete signal, the continuous change is transformed into three trend parameters representing different trends. This enables a qualitative description of the signal change trend, and the change trend of the differential signal can be determined based on the trend parameters. This allows for a simple and clear determination of the change trend of the differential signal, reducing computational overhead.

[0104] like Figure 14 As shown, this application also provides a device 200 for detecting the direction of movement of an object, comprising: The transmission control module 210 is used to control multiple transmitting units at different positions to transmit detection signals to the target area sequentially according to multiple preset time windows during each detection cycle, wherein the multiple transmitting units form at least two transmitting unit modules.

[0105] The receiving control module 220 is used to receive the signal under test in each time window through a receiving unit located among multiple transmitting units, and obtain the detection data for each time window. The signal under test includes the echo signal formed by the reflection of the detection signal by an object.

[0106] The sampling control module 230 is used to obtain the sampling signal corresponding to each time window based on the detection data obtained in each time window within multiple consecutive detection cycles.

[0107] The differential module 240 is used to determine the target sampling signal corresponding to each transmission unit module based on the sampling signal corresponding to each time window; and to perform differential processing on at least one pair of target sampling signals to obtain the corresponding differential signal.

[0108] The judgment module 250 is used to determine whether a moving object appears in the target area based on the amplitude of the differential signal.

[0109] The direction determination module 260 is used to determine the changing trend of the differential signal in response to the appearance of a moving object in the target area, and to determine the moving direction of the object based on the changing trend of the differential signal.

[0110] The device 200 for detecting the direction of movement of an object provided in this application and the method embodiment for detecting the direction of movement of an object are based on the same inventive concept and can achieve the same effect. For the specific implementation process, please refer to the description in the foregoing method embodiment, which will not be repeated here.

[0111] Figure 15 This is a schematic diagram of the structure of an electronic device 300 provided in an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the electronic device. Figure 15 As shown, the electronic device 300 may include: a processor 302, a communications interface 304, a memory 306, and a communications bus 308.

[0112] in: The processor 302, communication interface 304, and memory 306 communicate with each other via communication bus 308.

[0113] Communication interface 304 is used to communicate with other electronic devices or servers, such as the aforementioned source device.

[0114] The processor 302 is used to execute computer software 310, specifically to execute the relevant steps in the embodiments of the method for detecting the direction of object movement described above.

[0115] Specifically, computer software 310 may include program code, which includes executable instructions, which may be computer operation instructions.

[0116] Processor 302 may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The smart device may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.

[0117] Memory 306 is used to store computer software 310. Memory 306 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0118] The computer software 310 may include one or more executable instructions. Specifically, the computer software 310 may use multiple executable instructions to cause the processor 302 to perform the operations corresponding to the method for detecting the direction of movement of an object as described in any of the foregoing embodiments.

[0119] The specific implementation of each step in computer software 310 can be found in the corresponding descriptions of the steps and units in the above method embodiments, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.

[0120] This invention also provides a computer storage medium storing a computer program that, when executed by a processor, implements the method described in any of the embodiments of the methods for detecting the direction of object movement. The computer storage medium includes, but is not limited to, compact disc read-only memory (CD-ROM), random access memory (RAM), floppy disk, hard disk, or magneto-optical disk.

[0121] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.

[0122] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0123] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.

Claims

1. A method for detecting the direction of movement of an object, characterized in that, include: Within each detection cycle, according to multiple preset time windows, multiple transmitting units at different locations are controlled to sequentially transmit detection signals to the target area, wherein the multiple transmitting units constitute at least two transmitting unit modules; The receiving unit, located among the multiple transmitting units, receives the signal to be tested in each of the time windows to obtain detection data for each time window; wherein, the signal to be tested includes the echo signal formed by the detection signal being reflected by an object; Based on the detection data obtained in each time window within multiple consecutive detection cycles, a sampling signal corresponding to each time window is obtained; Based on the sampling signals corresponding to each of the time windows, a target sampling signal corresponding to each of the transmitting unit modules is determined, and at least one pair of target sampling signals is differentially processed to obtain the corresponding differential signal; Based on the amplitude of the differential signal, determine whether a moving object appears in the target area; In response to the appearance of a moving object in the target area, the changing trend of the differential signal is determined, and the moving direction of the object is determined based on the changing trend of the differential signal.

2. The method according to claim 1, characterized in that, Determining the trend of the differential signal includes: The differential signal is filtered to reduce high-frequency noise in the differential signal; Based on the filtered signal obtained from the filtering process, the changing trend of the differential signal is determined.

3. The method according to claim 2, characterized in that, Determining the trend of the differential signal based on the filtered signal obtained through filtering includes: The DC component of the filtered signal is determined based on the target band where the absolute value of the slope in the filtered signal is less than a predetermined threshold. The DC component is removed from the filtered signal to obtain a DC removed signal, and the changing trend of the differential signal is determined based on the DC removed signal.

4. The method according to claim 3, characterized in that, Determining the trend of the differential signal based on the DC removal signal includes: According to the discrete mapping relationship, the signal value of the DC removal signal is mapped to the corresponding target value to obtain a discrete signal; wherein, the discrete mapping relationship is used to indicate the mapping relationship between the amplitude range to which the signal value belongs and the target value; The trend of the differential signal is determined based on the discrete signal.

5. The method according to claim 4, characterized in that, Determining the trend of the differential signal based on the discrete signal includes: For the (i+1)th sampling point in the discrete signal, the trend parameter of the (i+1)th sampling point is determined based on the difference between the target value of the (i+1)th sampling point and the target value of the ith sampling point; wherein, when the difference is greater than zero, the trend parameter is a first parameter, which indicates an upward trend; when the difference is equal to zero, the trend parameter is a second parameter, which indicates a stable trend; when the difference is less than zero, the trend parameter is a third parameter, which indicates a downward trend, where i is a positive integer greater than zero and less than the number of sampling points; The trend of the differential signal is determined based on the trend parameters.

6. The method according to any one of claims 1-5, characterized in that, The plurality of transmitting units include a first transmitting unit and a second transmitting unit; the plurality of time windows include a first time window and a second time window; the transmitting unit module includes a first module and a second module, wherein the first module includes a first transmitting unit and the second module includes a second transmitting unit; Within each detection cycle, according to multiple preset time windows, multiple transmitting units at different locations are controlled to sequentially transmit detection signals to the target area, including: During each detection cycle, the first transmitting unit is controlled to transmit the detection signal to the target area in a first time window, and the second transmitting unit is controlled to transmit the detection signal to the target area in a second time window; The step of determining the target sampling signal corresponding to each of the transmitting unit modules based on the sampling signals corresponding to each of the time windows, and performing differential processing on at least one pair of the target sampling signals to obtain a differential signal includes: The sampling signal corresponding to the first time window is determined as the first target sampling signal corresponding to the first module; the sampling signal corresponding to the second time window is determined as the second target sampling signal corresponding to the second module; the first target sampling signal and the second target sampling signal are differentially processed to obtain a first differential signal; The method of responding to the appearance of a moving object in the target area, determining the changing trend of the differential signal, and determining the direction of movement of the object based on the changing trend of the differential signal, includes: In response to the appearance of a moving object in the target area, the changing trend of the first differential signal is determined, and the first direction of movement of the object is determined based on the changing trend of the first differential signal.

7. The method according to claim 6, characterized in that, In each detection cycle, the plurality of transmitting units further includes a third transmitting unit, and the plurality of time windows further includes a third time window. The transmitting unit module includes a third module and at least one of the following modules: a fourth module, a fifth module, and a sixth module, wherein the third module includes the third transmitting unit, the fourth module includes the first transmitting unit and the second transmitting unit, the fifth module includes the first transmitting unit and the third transmitting unit, and the sixth module includes the second transmitting unit and the third transmitting unit. The method of controlling multiple transmitting units at different positions to sequentially transmit detection signals to the target area according to multiple preset time windows during each detection cycle also includes: controlling the third transmitting unit to transmit the detection signal to the target area in a third time window; The step of determining the target sampling signal corresponding to each transmission unit module based on the sampling signals corresponding to each of the time windows, and performing differential processing on at least one pair of target sampling signals to obtain a differential signal, further includes: determining the sampling signal corresponding to the third time window as the third target sampling signal corresponding to the third module, and at least one of the following three steps: The sampling signals corresponding to the first time window and the sampling signals corresponding to the second time window are averaged to obtain the fourth target sampling signal corresponding to the fourth module; the third target sampling signal and the fourth target sampling signal are differentially processed to obtain the second differential signal. The sampling signals corresponding to the first time window and the sampling signals corresponding to the third time window are averaged to obtain the fifth target sampling signal corresponding to the fifth module; the second target sampling signal and the fifth target sampling signal are differentially processed to obtain the third differential signal. The sampling signals corresponding to the second time window and the sampling signals corresponding to the third time window are averaged to obtain the sixth target sampling signal corresponding to the sixth module; the first target sampling signal and the sixth target sampling signal are differentially processed to obtain the fourth differential signal. The method of responding to the appearance of a moving object in the target area, determining the changing trend of the differential signal, and determining the direction of movement of the object based on the changing trend of the differential signal, further includes at least one of the following three steps: Determine the changing trend of the second differential signal, and determine the second direction of movement of the object based on the changing trend of the second differential signal; Determine the changing trend of the third differential signal, and determine the third direction of movement of the object based on the changing trend of the third differential signal; Determine the trend of change of the fourth differential signal, and determine the fourth direction of movement of the object based on the trend of change of the fourth differential signal.

8. The method according to claim 7, characterized in that, The method is used in an electronic device including a screen, the screen having dimensions including a width direction, a height direction, and a thickness direction, wherein the line connecting the first transmitting unit and the second transmitting unit is parallel to the width direction or the height direction of the screen.

9. The method according to claim 7 or 8, characterized in that, The third transmitting unit is located on the perpendicular bisector of the line connecting the first transmitting unit and the second transmitting unit.

10. A device for detecting the direction of movement of an object, characterized in that, include: The transmission control module is used to control multiple transmitting units at different locations to transmit detection signals to the target area sequentially according to multiple preset time windows during each detection cycle, wherein the multiple transmitting units constitute at least two transmitting unit modules; A receiving control module is configured to receive a signal to be tested in each of the time windows through a receiving unit located among the plurality of transmitting units, and obtain detection data for each of the time windows; wherein the signal to be tested includes an echo signal formed by the detection signal being reflected by an object; The sampling control module is used to obtain a sampling signal corresponding to each time window based on the detection data obtained in each of the time windows within multiple consecutive detection cycles; The differential module is used to determine the target sampling signal corresponding to each of the transmitting unit modules based on the sampling signals corresponding to each of the time windows; and to perform differential processing on at least one pair of the target sampling signals to obtain the corresponding differential signal. The judgment module is used to determine whether a moving object appears in the target area based on the amplitude of the differential signal. The direction determination module is used to determine the changing trend of the differential signal in response to the appearance of a moving object in the target area, and to determine the moving direction of the object based on the changing trend of the differential signal.

11. An electronic device, comprising: The processor, the communication interface, the memory, and the communication bus are provided, and the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform an operation corresponding to the method as described in any one of claims 1-9.

12. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of claims 1-9.