Control method, device and computer readable storage medium
By acquiring the accuracy of the position sensor in real time and dynamically adjusting the sensing boundary, the problem of inconsistent detection accuracy of the position sensor in different environments is solved, thus achieving reliability and accuracy in the state control of electronic devices.
Patent Information
- Application Number
- CN202111062862.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2041-09-10
AI Technical Summary
The inconsistent detection accuracy of position sensors in different environments leads to a decrease in the reliability and accuracy of electronic device status control.
By acquiring the real-time accuracy of the position sensor, the sensing boundary is dynamically adjusted to accurately determine whether a target object enters or leaves the sensing range, thereby controlling the state of the electronic device.
It improves the reliability and accuracy of electronic device status control, meeting the control needs of different scenarios.
Smart Images

Figure CN113761601B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application mainly relates to the technical field of information security, and more particularly to a control method and device and a computer readable storage medium. BACKGROUND
[0002] At present, an electronic device usually determines whether a person enters a sensing range of the electronic device based on a position sensor, and controls a state of the electronic device according to the determination.
[0003] However, in actual application, the detection accuracy of the position sensor in different directions in different environments is different after the position sensor is affected by the environment, which reduces the reliability and accuracy of controlling the electronic device to enter a required state. SUMMARY
[0004] Therefore, the present application provides a control method, which comprises:
[0005] obtaining real-time accuracy of a position sensor;
[0006] adjusting a sensing boundary of an electronic device according to the real-time accuracy;
[0007] controlling the electronic device to enter a first state or a second state according to a position of a target object relative to the sensing boundary.
[0008] Optionally, the obtaining of the real-time accuracy of the position sensor comprises:
[0009] obtaining real-time position data of the target object continuously collected by the position sensor;
[0010] obtaining real-time error of the position sensor according to displacement changes between a plurality of continuous real-time position data;
[0011] determining the real-time accuracy of the position sensor according to the real-time error.
[0012] Optionally, the obtaining of the real-time error of the position sensor according to the displacement changes between the plurality of continuous real-time position data comprises:
[0013] determining a moving direction of the target object relative to the electronic device according to the displacement changes between the plurality of continuous real-time position data;
[0014] determining an accumulated value of the real-time position data perpendicular to the moving direction according to the moving direction;
[0015] determining real-time error of the target object in the moving direction according to the accumulated value.
[0016] Optionally, the controlling the electronic device to enter the first state or the second state according to the position of the target object relative to the sensing boundary comprises:
[0017] acquiring position data of the target object relative to the sensing boundary;
[0018] determining a relative position relationship between the target object and the sensing boundary according to the position data;
[0019] controlling the electronic device to enter a first state or a second state in a current working mode of the electronic device according to the relative position relationship and the working mode, wherein the working mode is an output content protection mode or an output quick control mode.
[0020] Optionally, the controlling the electronic device to enter the first state or the second state in the working mode according to the relative position relationship and the working mode comprises at least one of the following:
[0021] detecting that the electronic device is currently in the output content protection mode, and the relative position relationship indicates that the target object enters a first boundary of the sensing boundary, and controlling the electronic device to enter a first state in the output content protection mode to implement protection of to-be-protected content output by the electronic device;
[0022] detecting that the electronic device is currently in the output content protection mode, and the relative position relationship indicates that the target object moves out of a second boundary of the sensing boundary, and controlling the electronic device to enter a second state in the output content protection mode to output the to-be-protected content;
[0023] detecting that the electronic device is currently in the output quick control mode, and the relative position relationship indicates that the target object enters a first boundary of the sensing boundary, and controlling the electronic device to enter a second state in the output quick control mode to output target content or respond to an input operation;
[0024] detecting that the electronic device is currently in the output quick control mode, and the relative position relationship indicates that the target object moves out of a second boundary of the sensing boundary, and controlling the electronic device to enter a first state in the output quick control mode to stop outputting the target content or to prohibit responding to the input operation.
[0025] Optionally, the acquiring the position data of the target object continuously collected by the position sensor comprises:
[0026] acquiring a detection distance value between each of a plurality of distance detection points and the electronic device;
[0027] determine a target object containing the most distance detection points according to the change of the detection distance values of adjacent distance detection points;
[0028] obtain position data of the target object relative to the electronic device according to the adjacency relationship between the distance detection points contained in the target object and the detection distance values of the distance detection points respectively;
[0029] The position data includes a first distance between the target object and the electronic device at a current time, an adjacency relationship between a first distance detection point and each second distance detection point contained in the target object, and an influence of the detection distance value of the first distance detection point on the first distance; the first distance detection point is any distance detection point contained in the target object, and the second distance detection point and the first distance detection point form a plurality of distance detection points contained in the target object.
[0030] Optionally, the determining of the target object containing the most distance detection points according to the change of the detection distance values of adjacent distance detection points includes:
[0031] obtaining a difference between the detection distance values of two adjacent distance detection points;
[0032] detecting whether the difference is less than a continuous point threshold value;
[0033] If yes, it is determined that the two adjacent distance detection points belong to distance detection points on the same object.
[0034] If no, it is determined that the two adjacent distance detection points belong to distance detection points on different objects.
[0035] counting the number of distance detection points on the same object to obtain the target object containing the most distance detection points.
[0036] Optionally, the obtaining of the position data of the target object relative to the electronic device according to the adjacency relationship between the distance detection points contained in the target object and the detection distance values of the distance detection points respectively includes:
[0037] obtaining the number of neighbor distance detection points of each distance detection point contained in the target object; the neighbor distance detection points belong to the distance detection points of the target object;
[0038] obtaining a first distance between the target object and the electronic device according to the number of the neighbor distance detection points and the detection distance value of the distance detection point in the target object.
[0039] The application also provides a control device, which comprises:
[0040] a position sensor precision acquisition module, configured to acquire real-time precision of the position sensor;
[0041] a perception boundary adjustment module, configured to adjust a perception boundary of the electronic device according to the real-time precision;
[0042] a state control module, configured to control the electronic device to enter a first state or a second state according to a position of the target object relative to the perception boundary.
[0043] The application also provides a computer readable storage medium, which stores a computer program, and the computer program is called and executed by a processor to implement the control method.
[0044] Therefore, during the movement of the target object relative to the electronic device, the application considers that the position sensor has different detection precisions in different directions due to the influence of factors such as itself and the environment, and that the collected position data has jitter and other problems, proposes to adjust the perception boundary according to the real-time precision of the position sensor, thereby accurately determining whether the target object enters or exits the perception boundary, and more reliably and accurately controlling the electronic device to enter the first state or the second state, meeting the state control requirements of the electronic device in the current scene, and improving the reliability and accuracy of control. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute the embodiments of the application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.
[0046] Figure 1 A scene schematic diagram of the control method based on a fixed perception boundary proposed by the application;
[0047] Figure 2 A flowchart of an optional example of the control method proposed by the application;
[0048] Figure 3 An optional scene schematic diagram of the control method proposed by the application;
[0049] Figure 4 A flowchart of another optional example of the control method proposed by the application;
[0050] Figure 5 A flowchart of another optional example of the control method proposed by the application;
[0051] Figure 6 A schematic diagram of an optional example of adjusting the sensing boundary of an electronic device for the control method proposed in this application;
[0052] Figure 7 A flowchart illustrating yet another alternative example of the control method proposed in this application;
[0053] Figure 8 A flowchart illustrating yet another alternative example of the control method proposed in this application;
[0054] Figure 9 A flowchart illustrating yet another alternative example of the control method proposed in this application;
[0055] Figure 10 A flowchart illustrating yet another alternative example of the control method proposed in this application;
[0056] Figure 11 A schematic diagram of the hardware structure of an optional example of the control device proposed in this application;
[0057] Figure 12 A schematic diagram of the hardware structure of an optional example of an electronic device suitable for the control method proposed in this application;
[0058] Figure 13 A schematic diagram of the hardware structure of another alternative example of an electronic device suitable for the control method proposed in this application. Detailed Implementation
[0059] Based on the description in the background section, a method for setting a dual-threshold sensing boundary is proposed, ensuring that the distance between the two boundaries is greater than the sensor's accuracy. Figure 1 As shown, taking the protection of the output content of an electronic device as an example, when a user moves closer to the electronic device, the IN boundary is used as the first boundary of the protection range. When the user enters the IN boundary, the protection function for the content to be protected (such as displayed content, played audio, etc.) will be activated. Conversely, if the user moves away from the electronic device, the OUT boundary is used as the second boundary of the protection range. The protection function of the electronic device will be deactivated only when the user leaves the OUT boundary. Compared to the control method that sets a single protection range boundary, this dual-threshold sensing boundary protection control method, taking into account the jitter problem of the position data collected by the position sensor, improves the reliability and accuracy of the protection of the content to be protected to a certain extent.
[0060] However, the collection accuracy (i.e. allowable error value) of the position sensor such as radar in different directions is different, and the accuracy value is affected by environmental factors, which reduces the reliability and accuracy of the electronic device control implemented based on the fixed double-threshold perception boundary, i.e. the accuracy of the control method proposed above is reduced due to the adverse effect of the change of the position sensor accuracy on the detection result.
[0061] To further improve the above problems, the present application proposes that during the user entering / leaving the perception range of the electronic device, the two boundary positions of the perception range are dynamically adjusted by continuously detecting the displacement change of the user, so as to dynamically adjust the distance between the double-threshold perception boundary, i.e. dynamically configure the allowable error value, and accurately determine whether the user enters the IN boundary or leaves the OUT boundary of the perception range during the moving process in the current scenario, so as to realize the accuracy and reliability of the state switching control of the electronic device, meet the state control requirements of the electronic device, such as realizing the reliable protection of the output content of the electronic device while avoiding the interference to the normal watching or listening of the user to the output content of the electronic device, etc. The switching control state content can be determined in combination with the current control requirements of the electronic device, including but not limited to the output content protection requirements, which will not be described in detail herein.
[0062] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0063] Reference Figure 2 An optional flowchart of the control method proposed in the present application is shown, which can be applied to an electronic device, which can include but is not limited to a smart phone, a tablet computer, a netbook, an e-book reader, a desktop computer, etc. terminal. As shown in Figure 2 The method can include:
[0064] Step S11, obtaining the real-time accuracy of the position sensor;
[0065] As described above, because the accuracy of the position sensor is different in different environments, in order to improve the position detection accuracy of the target object (such as the user or stranger of the electronic device, etc.), the real-time accuracy of the position sensor in the corresponding environment needs to be obtained;
[0066] In actual application, because the accuracy of the position sensor can be affected by environmental parameters such as temperature, humidity, light intensity, air pressure, etc. in the environment, the method for obtaining the real-time accuracy of the position sensor in the present application includes but is not limited to:
[0067] The corresponding environmental parameters, such as one or more of temperature, humidity, light intensity, air pressure, etc., obtained by detecting the environment by the detection module (such as an environmental parameter detection device) are analyzed, and the real-time accuracy of the position sensor in the corresponding environment (i.e., under the environmental conditions with the corresponding environmental parameters) is calculated according to the analysis result.
[0068] In still other embodiments, the application can also obtain real-time position data of a target object in the environment continuously collected by the position sensor; obtain the real-time error of the position sensor according to the displacement change between a plurality of continuous real-time position data; and determine the real-time accuracy of the position sensor according to the real-time error. The implementation process can refer to the description of the corresponding part of the embodiments below, and this embodiment will not be described in detail.
[0069] It can be understood that for different types of position sensors, the detection method of the target object may be different, such as generating an emission signal by radar such as ultrasonic wave, laser, millimeter wave, etc. The detection method of the target object is not limited in the application. And the same environmental parameters may have different effects on the accuracy of different types of position sensors.
[0070] Step S12, adjusting the perception boundary of the electronic device according to the real-time accuracy;
[0071] In actual application, due to factors such as the position sensor itself and / or the environment, the data collected by the position sensor has a jitter problem, that is, there is jitter in the position data sequence of the target object collected by the position sensor, and not every position data is accurate and real data of the target object. If the relative position relationship between the target object and the perception boundary is directly determined according to the pre-set fixed perception boundary and the position data of the target object, the relative position relationship may not be accurate. In order to solve this problem, the application proposes to dynamically adjust the perception boundary according to the real-time accuracy of the position sensor, obtain a perception boundary suitable for the current environment, improve the reliability and accuracy of the relative position detection between the target object and the perception boundary, and solve the above position data jitter problem.
[0072] Reference Figure 3 Another optional scenario of the control method proposed in the application is to increase and / or decrease a certain threshold at the position of the basic boundary (a certain perception boundary preset) based on the real-time accuracy of the position sensor to obtain a new perception boundary. For example, Figure 3 The perception boundary shown in the upper left of the figure can adjust the perception boundary in the moving direction of the target object in order to improve the perception effect.
[0073] In order to further improve the control accuracy and reliability, the adjusted perception boundary of the application can include a plurality of boundaries, so thatFigure 3 The double boundary in the scenario of the IN boundary and the OUT boundary of the following figure is taken as an example, that is, on the basis of the boundary position in the moving direction of the original perception boundary, an error value (here, the absolute value, such as 0.3 cm) of real-time precision is reduced to obtain a new boundary position, which is recorded as a first boundary (such as Figure 3 the IN boundary of the following figure); in the same way, on the basis of the boundary position in the moving direction, an error value is added to obtain another new boundary position, which is recorded as a second boundary (such as Figure 3 the OUT boundary of the following figure), and the first boundary and the second boundary are used as the new boundaries of the perception boundary in different moving directions, so that the relative position detection reliability is improved through dynamic double boundaries while the position of the perception boundary is dynamically adjusted.
[0074] In some embodiments, in the execution process of the above step S12, the real-time precision in each moving direction can be determined in the manner described above, and then the real-time precision is used to adjust the perception boundary to obtain a new boundary. In this case, the adjustment value (which can be the real-time precision or an error value determined by the real-time precision) of the perception boundary in different directions can be different, which can be determined according to the situation. This perception boundary adjustment method can achieve higher relative position detection accuracy and reliability.
[0075] In yet some embodiments, the present application can also realize the synchronous adjustment of the boundaries in each direction of the perception boundary according to the real-time precision in the real moving direction of the target object, that is, the boundaries of the perception boundary are synchronously expanded or reduced by the adjustment value of the real-time precision to obtain a new perception boundary. The implementation method of step S12 is not limited in the present application, and can be determined according to the actual scene requirements.
[0076] As can be seen from the above, in the embodiments of the present application, the real-time precision of the position sensor in the environment is used to dynamically adjust the perception boundary in real time, which can minimize the influence of position data jitter and improve the accuracy and reliability of relative position detection. It should be noted that the perception boundary of the present application can be one or multiple, and the direction of the perception boundary can be full coverage of the surrounding of the electronic device or at least partial coverage of the surrounding of the electronic device, which can be determined according to the situation.
[0077] Step S13: According to the position of the target object relative to the perception boundary, the electronic device is controlled to enter a first state or a second state.
[0078] In the embodiments of this application, the state contents of the first state and the second state of the electronic device may be different in response to different control requirements of the electronic device, such as output content protection control requirements and output fast control requirements. Moreover, for the same relative positional relationship between the target object and the boundary error range of the perception boundary, the state that the electronic device enters may also be different in response to different control requirements. This application does not impose any restrictions on this.
[0079] For cases where there are multiple perception boundaries, such as dual threshold boundaries, e.g. Figure 1 The IN and OUT boundaries shown in this application embodiment take into account the variation in detection accuracy of the position sensor under different environments and directions, and combine the displacement changes of the target object during its actual movement in the current environment to determine the distance between the two boundaries of the perception boundary applicable to the current scene. That is, a new double threshold boundary of the perception boundary is determined in the current environment. In this way, based on the re-determined perception boundary applicable to the current scene, it is possible to accurately determine whether the target object enters or leaves the corresponding perception boundary, and thereby control the electronic device to enter the required first state or second state, improving the reliability and accuracy of the state control of the electronic device.
[0080] In some other embodiments proposed in this application, since the detection accuracy of position sensors such as radar may vary in different directions, in order to more accurately determine the sensing boundary of the sensing range of electronic devices, this application proposes to divide the entire sensing range of the position sensor into multiple detection areas. The detection areas can be divided according to parameters such as detection direction or detection distance, but are not limited to this method of area division.
[0081] Based on this, this application can utilize position sensors configured in electronic devices, such as laser sensors, and employ a multi-person detection algorithm to obtain the distance between the target object and the electronic device, determine the current detection area where the target object is located, and define the current detection area where the target object is located as the sensing boundary. Then, in conjunction with the description of the above embodiments, the real-time error of the detection area where the target object is located can be re-determined based on the displacement changes caused by the movement of the target object in the detection area, thereby adjusting the position of the sensing boundary corresponding to the detection area. Subsequently, based on the adjusted sensing boundary of the detection area, the relative positional relationship between the target object and the sensing boundary is detected, thereby achieving high-precision control of the electronic device's state and meeting application requirements.
[0082] In some embodiments of the present application, the position sensor can also not be divided into a detection area, the entire sensing range of the position sensor is determined as a sensing boundary, and the real-time error of the entire sensing range is determined according to the displacement change of the detected target object relative to the electronic device, so as to re-determine the sensing boundary suitable for the current environment, and solve the technical problem that the accuracy of the position sensor changes in different directions in the current environment, that is, the boundary detection accuracy of the preset sensing boundary changes, resulting in inaccurate position detection results.
[0083] It can be understood that the output content protection control requirement of the electronic device is taken as an example for description. Since the distance between the target object and the electronic device is very small, such as 20 cm, the output content protection function of the electronic device can be reliably recognized and started. Similarly, when the distance between the target object and the electronic device is very large, such as several meters or tens of meters, the target object (such as a stranger) cannot see or hear the output content of the electronic device, and the output content protection function will not be mistakenly triggered, which affects the normal viewing or listening of the user to the output content. Therefore, in some embodiments of the present application, the electronic device can not need to calculate the dynamic boundary in real time.
[0084] That is, in order to reduce the calculation amount caused by real-time calculation of the dynamic boundary and reduce the performance of the electronic device, the present application can first determine the distance between the target object and the electronic device (denoted as the first distance), thereby preliminarily determining whether it is necessary to adjust the sensing boundary of the sensing range. If the first distance is very small, such as less than a first threshold value (that is, the distance threshold value corresponding to the position recognition result that is not affected by the detection accuracy of the environment on the position sensor), the electronic device can be directly controlled to enter the first state to achieve protection of the output content. Conversely, if the first distance is very large, such as greater than a second threshold value (which is also a distance threshold value that is not affected by the disturbed position recognition result), the electronic device can be directly controlled to enter the second state to normally output the content to be protected. Therefore, after the first distance between the target object and the electronic device is obtained in some embodiments of the present application, it can be determined whether to start the dynamic adjustment mechanism of the sensing boundary according to the first distance. If necessary, the sensing boundary corresponding to the target object relative to the electronic device can be determined, and the implementation process is not described in the embodiments of the present application.
[0085] It should be noted that in the output content protection mode of the electronic device, the method for controlling the electronic device to enter the first state to achieve protection of the content to be protected is not limited in the present application. The electronic device can be controlled to be turned off, the screen brightness can be lowered, a preset window can be popped up to shield the content to be protected, and the like. The user can adaptively adjust according to personal habits and application scene requirements, and the present application does not enumerate one by one.
[0086] Reference Figure 4This is a flowchart illustrating another optional example of the control method proposed in this application. This embodiment can be an optional refinement of the acquisition and application process of the real-time accuracy of the position sensor in the control method described in the above embodiments, but it is not limited to the refinement described in this embodiment. This refinement can be executed by an electronic device, and other implementation steps of the control method can be referred to the descriptions in the corresponding parts of the above embodiments, which will not be repeated in this embodiment. Figure 4 As shown, the method may include:
[0087] Step S21: Obtain the real-time location data of the target object continuously collected by the position sensor;
[0088] Following the above description, in order to obtain the trajectory of a target object relative to an electronic device, such as the direction and distance of movement within the IN boundary of the sensing boundary, between the two boundaries, or outside the OU boundary, this application can utilize a position sensor to continuously collect real-time position data of the target object. It is understood that the methods for obtaining real-time position data of the target object may differ for different types of position sensors. For example, the real-time position data of the target object may be determined by the time difference between the transmitted signal generated by ultrasonic, laser, or millimeter-wave radar and the reflected signal reflected back by the target object. This application does not limit the method for obtaining the real-time position data of the target object.
[0089] Regarding the method for acquiring real-time location data of the target object, reference can be made to, but is not limited to, the description in the corresponding sections of the above embodiments. It is understood that during the process of acquiring location data using sensors such as radar, the continuously acquired radar data can be stored in a data sequence according to the acquisition time order, but is not limited to this storage method.
[0090] Step S22: Obtain the real-time error of the position sensor based on the displacement changes between multiple continuous real-time position data.
[0091] As described above, due to factors such as the position sensor itself and / or the environment, the data collected by the position sensor has a jitter problem. In other words, there is jitter in the position data sequence of the target object collected by the position sensor. Not every position data is accurate and true data of the target object. If the electronic device is directly controlled to switch between the display content protection mode and the display content display mode based on this, erroneous operation problems may occur.
[0092] To solve the above problems, the present application proposes to determine the theoretical moving track of the target object according to the real-time position data continuously collected at different time, such as the moving direction of the target object relative to the electronic device (including the real moving direction and the interference direction caused by the data jitter) and the relative moving distance in the moving direction represented by the position data within a corresponding time length, to measure the real-time error of the position sensor in the current environment.
[0093] It should be noted that the present application does not limit the implementation method of how to utilize the real-time position data of the target object continuously collected to determine the displacement (vector containing direction and size) between these real-time position data, i.e., the moving direction and the relative moving distance.
[0094] Since the proportion of the jittered position data in all the collected position data is small due to the position sensor itself or the environment, that is, most of the position data is the real position data of the target object during the moving process, the real moving direction of the target object relative to the electronic device, or the main moving direction relative to the electronic device, can be determined according to the moving change analysis method described above, and the real-time error of the position sensor can be determined according to the position data as interference data in other moving directions. The present application does not limit the method of obtaining the real-time error of the position sensor.
[0095] Step S23, determining the real-time accuracy of the position sensor according to the real-time error.
[0096] In the embodiments of the present application, when the real-time error of the position sensor is calculated according to the plurality of real-time position data, the accuracy of the position sensor is calculated in real time according to the real-time error, i.e., the real-time accuracy of the position sensor is obtained. In some other embodiments, the corresponding relationship between different errors and different accuracies of different types of position sensors can be determined in advance, so that after the above real-time error is obtained, the corresponding real-time accuracy of the position sensor can be obtained by querying the corresponding relationship. The present application does not limit the specific implementation method of step S23.
[0097] Reference Figure 5 The flowchart of another optional example of the control method proposed by the present application, the embodiments can be a further refined implementation method of the real-time error acquisition method of the position sensor described in the above embodiments, but are not limited to this refined implementation method, and for the implementation steps of the control method, the description of the corresponding part of the above embodiments can be referred to, and the present embodiment will not be described. As Figure 5 The method can include:
[0098] Step S31, determining the moving direction of the target object relative to the electronic device according to the displacement change between the plurality of continuous real-time position data.
[0099] In combination with the description of the corresponding part of the above embodiment, considering the jitter problem of the position data collected by the position sensor, for the continuously collected real-time position data, the displacement change between any two adjacent real-time position data can be analyzed, that is, the relative displacement of the real-time position data collected at a moment with respect to the real-time position data collected at the adjacent last moment is obtained, including the relative distance and the relative moving direction, the accumulated value of the relative distance in different moving directions is determined by statistics, and the moving direction corresponding to the maximum accumulated value is determined as the real moving direction of the target object, and other calculated moving directions can be considered as interference directions. It should be noted that the specific implementation method of step S31 is not limited in the present application, including but not limited to the implementation method described above.
[0100] Specifically, in combination with the description of the corresponding part above, for the position data collected at the first moment (that is, any collection time), the displacement change between the real-time position data collected at the first moment and the adjacent last moment (denoted as the second moment) can be calculated by using vector calculation method, that is, the vector change of the real-time position data, including the direction and the size, so as to determine how far the position of the target object detected at the first moment (which can be the position of the first detection point on the target object) moves in which direction (which represents the predicted moving direction, which is not necessarily the real moving direction of the target object) with respect to the position of the target object detected at the second moment (which can be the position of the second detection point on the target object), that is, to determine the relative moving direction and the relative distance value between the two positions.
[0101] Among them, since the data collected by the position sensor has jitter problem, the detection points of the target object at different moments can be different, and the change of the detection points of the position data collected at adjacent moments can cause the displacement change of the corresponding position data, which can be misjudged as the moving direction of the target object, causing interference. And the data jitter generated by the position sensor is random, so the relative moving direction determined in the above manner can contain multiple directions, and the present application can accumulate and sum the relative distance values corresponding to the same relative moving direction (that is, the predicted moving direction) to obtain the accumulated distance value of the relative moving direction entropy.
[0102] Among them, in the statistical process of the accumulated distance value, one or more relative moving directions with a change angle between the relative moving directions less than an angle threshold value can be determined as the same relative moving direction; or the 360-degree direction can be divided into multiple direction ranges in advance, and the relative moving directions located in the same direction range are determined as the same relative moving direction, etc. The present application does not limit the acquisition method of the above relative moving method.
[0103] In the process of the target object moving relative to the electronic device, the target object usually moves in a certain direction determined by the electronic device rather than repeatedly adjusting the direction curve, and thus the position data of the target object collected by the position sensor mostly represents the position data in the actual moving direction of the target object, and the position data in other predicted moving directions with interference is relatively less. Therefore, the present application can determine the predicted moving direction corresponding to the maximum accumulated distance value (i.e., the maximum relative moving distance) as the moving direction of the target object relative to the electronic device, i.e., the actual moving direction of the target object, by comparing the sizes of the accumulated distance values in different predicted moving directions.
[0104] It should be noted that the method for obtaining the moving direction of the target object relative to the electronic device is not limited to the method described above, and the moving direction of the target object relative to the electronic device can also be determined by analyzing the continuous frame images collected by the electronic device or the image collector in the environment of the electronic device, and the present application does not enumerate all the methods.
[0105] In step S32, the accumulated value of the real-time position data perpendicular to the moving direction is determined according to the moving direction.
[0106] In the embodiments of the present application, the second predicted moving direction and the first predicted moving direction constitute different predicted moving directions of the target object, that is, the present application can divide the predicted moving directions calculated by the method shown in step S32 into two categories for the convenience of description, one category is the actual moving direction of the target object relative to the electronic device, i.e., the first predicted moving direction, and the other category is the other predicted directions calculated, which are referred to as the second predicted moving direction. It can be understood that the second predicted moving direction can include one or more different predicted moving directions.
[0107] Then, the present application can take the perpendicular direction of the determined moving direction (i.e., the first predicted moving direction) as the reference direction for detecting the data collection accuracy of the position sensor in the moving direction in the current environment, and obtain the accumulated distance values in each second predicted direction.
[0108] In step S33, the real-time error of the target object in the moving direction is determined according to the accumulated value.
[0109] As described above, the interference degree of the position data in the interference direction on the detection accuracy of the target object can be analyzed according to the accumulated value in the interference direction and the real moving direction, and the real-time error of the sensing boundary in the moving direction of the target object in the current environment is determined according to the interference degree, which affects the boundary error value of the position sensor in the moving direction of the sensing boundary, i.e., the detection accuracy in the moving direction. Therefore, the present application can adjust the real-time accuracy of the position sensor to achieve high-precision detection of the target object near the boundary in the moving direction.
[0110] Specifically, the projection value of the accumulated distance value in each second prediction direction on the reference direction can be obtained, as shown in the following formula: Figure 6 The size of the projection value obtained by the embodiments of the present application can represent the interference degree of the position data in the corresponding second prediction movement direction, i.e., the interference degree of the position data in the second prediction movement direction on the position recognition result of the target object.
[0111] In the calculation process of the projection value, the vertical plane of the first prediction movement direction can also be directly determined, and the projection value of each second prediction movement direction on the vertical plane can be obtained. The method of obtaining the projection value is not described in detail. Moreover, the method of obtaining the interference degree of the position data in the second prediction movement direction on the position recognition result of the target object is not limited to the implementation method described in the embodiments of the present application.
[0112] Based on the above analysis, the implementation method of step S12 of the above embodiments can include but is not limited to: when it is necessary to dynamically adjust the perception boundary (such as the perception range), the corresponding relationship between the projection value and the error value (which can be determined through a large number of experiments, and the obtaining method and representation method are not limited in the present application) can be called to determine the maximum projection value in the projection value corresponding to each second prediction movement direction obtained above, and then the corresponding relationship can be queried to determine the error value corresponding to the maximum projection value as the real-time error of the target object in the movement direction.
[0113] In yet some embodiments, the above corresponding relationship can also be refined to different movement directions, i.e., the corresponding relationship between the projection value of different second movement directions on the first movement direction and the error value of the boundary of different protection regions on the first movement direction is determined, wherein the first movement direction can include multiple directions, and for each direction, the corresponding corresponding relationship can be configured. In this way, after determining the first prediction movement direction in the current environment and the maximum projection value of each second prediction movement direction on the vertical plane of the first prediction movement direction in the above manner, the allowed error value corresponding to the first prediction movement direction and the maximum projection value can be determined from the pre-configured corresponding relationship as the real-time error of the target object in the movement direction. But it is not limited to the two implementation methods of steps S31-S35 described above.
[0114] In summary, in the scenario where the target object (such as a stranger, a user of an electronic device) moves near the perception boundary, in order to accurately realize the control of the state switching of the electronic device, the present application fully considers the adverse effects of the position data jitter collected by the position sensor on the recognition accuracy, obtains different predicted moving directions of the target object relative to the electronic device in the entire moving process by analyzing the displacement changes between the continuously collected real-time position data. Then, by the accumulated moving distance value in each predicted moving direction, the actual moving direction of the target object relative to the electronic device, i.e. the first predicted moving direction, and the interference moving direction caused by data jitter, i.e. the second predicted moving direction, are identified. Based on the maximum projection value of the second predicted moving direction on the perpendicular plane of the first predicted moving direction, the interference degree of data jitter on the position recognition result of the target object is evaluated, so as to determine the boundary error value of the perception boundary in the corresponding direction, and accordingly dynamically adjust the perception boundary in this direction or the entire perception boundary to obtain a new perception boundary, so as to realize the detection of the target object at the current position and realize reliable and accurate control of the state switching of the electronic device, meeting the application scenario requirements.
[0115] It should be understood that, in the process of the target object approaching the electronic device in different directions, the detection accuracy of the position sensor in different directions may be different. According to the implementation method described above, the boundary error value of the perception boundary in this direction may be different, that is, the position of the double boundary in this direction obtained by adjusting the reference boundary of the perception boundary in different directions in different scenarios may be different. The error value acquisition method of the boundary in different directions is similar, which will not be described one by one.
[0116] In order to realize the distance detection between the target object and the electronic device, the position data required above can be obtained by using a TOF (Time of flight) sensor according to the control method described in each of the above embodiments, that is, by detecting the light beam received after reflection, the target distance is detected by detecting the flight time of the light beam. Since there can be multiple objects within the field of view (FOV) of the TOF sensor, the present application needs to accurately identify the target object such as a user first, and then obtain the position data of the target object relative to the electronic device.
[0117] To accurately identify the position data of a target object among multiple objects in front of an electronic device's display screen, and to avoid misinterpreting the distance between other objects and the electronic device as the target object's position data, thus affecting the reliability and accuracy of electronic device control, an attempt was made to determine the target object's position data by using a second distance between the detected object closest to the electronic device and the electronic device. However, this second distance often does not accurately reflect the actual distance between the target object and the electronic device. For example, if the target object raises its hand while using the electronic device, the hand can easily enter the field of view (FOV) and be mistaken for the target object, thus determining the distance between the hand and the electronic device as the target object's primary distance. Clearly, this detection method is inaccurate.
[0118] In addition, we also tried to determine the average distance value of multiple detection points as the first distance between the target object and the electronic device, because the distance between the user's torso and the electronic device is the most reflective of the distance between the user and the electronic device, and it is subject to interference from isolated position data that are far or very close to the electronic device, which reduces the reliability and accuracy of the detection results.
[0119] Furthermore, target object distance detection can be achieved using methods such as ultrasonic radar, binocular vision, lidar, and millimeter-wave radar; the detection process will not be detailed in this application. Environmental factors can also affect detection accuracy, or make it impossible to accurately identify which of multiple objects is the target object, thus making it impossible to determine which distance is the primary distance required for subsequent applications. To further improve the accuracy of the primary distance detection between the target object and the electronic device, and to obtain highly accurate target object position data, this application proposes, but is not limited to, the following methods.
[0120] Reference Figure 7 The above is a flowchart illustrating another optional example of the control method proposed in this application, which may include:
[0121] Step S41: Obtain the position data of the target object relative to the perception boundary;
[0122] The system acquires the position data of a target object relative to a sensing boundary in real time. The target object and the sensing boundary can be single or multiple. The frequency of acquiring the target object's position data can be adaptively adjusted as required. The process of acquiring the target object's position data at any given time can be referred to, but is not limited to, the description in the corresponding sections of the above embodiments.
[0123] Step S42: Determine the relative positional relationship between the target object and the perception boundary based on the position data;
[0124] The relative position relationship between the at least one target object and the at least one awareness boundary is determined according to the position data, such as being outside the awareness boundary, being inside the awareness boundary, etc. For an awareness boundary including a double boundary, it can be determined whether the target object is located inside the first boundary, between the first boundary and the second boundary, or outside the second boundary, and the moving direction of the target object relative to the electronic device can also be determined as needed.
[0125] It should be noted that the relative position relationship described above can not be limited to a momentary relationship, but can also be determined according to the position data obtained within a certain period of time to determine the dynamic of the target object relative to the awareness boundary, such as a moving track of leaving the awareness boundary or entering the awareness boundary.
[0126] In step S43, the electronic device is controlled to enter a first state or a second state in the working mode according to the relative position relationship and the current working mode of the electronic device.
[0127] In the embodiments of the present application, the working mode of the electronic device can be an output content protection mode or an output quick control mode, which correspond to the output content protection requirement (the output content can include but is not limited to the display content of the electronic device such as text, image, etc., and can also be audio content output by a player, etc., and the to-be-protected content can be determined as needed) and the output quick control requirement (i.e., to achieve quick control of the output state of the electronic device) described above. The content of the working mode is not limited in the present application and can be determined according to the scene requirement.
[0128] Based on the above analysis, the state content of the electronic device entering can be different for the same relative position relationship in different scenes, and therefore, the step S43 described above can include but is not limited to the following implementation manners:
[0129] When it is detected that the electronic device is currently in the output content protection mode and the relative position relationship indicates that the target object (such as a stranger) enters the first boundary (such as the IN boundary shown in FIG. 1) of the awareness boundary, the electronic device is controlled to enter a first state in the output content protection mode to achieve protection of the to-be-protected content output by the electronic device; and when it is detected that the electronic device is currently in the output content protection mode and the relative position relationship indicates that the target object moves out of the second boundary (such as the OUT boundary shown in FIG. 1) of the awareness boundary, the electronic device is controlled to enter a second state in the output content protection mode to output the to-be-protected content. Figure 3 Figure 3
[0130] It can be seen that, in combination with the above Figure 3 As shown, the IN boundary of the perception boundary is determined that the target object enters, in order to avoid the electronic device output content to be protected from leaking, the output content protection function of the electronic device can be started, and the electronic device is controlled to be in a first state such as screen off, standby, display brightness reduction, etc.; on the contrary, the OUT boundary of the perception boundary is determined that the target object is away from the electronic device, it can be considered that there is no danger that the target object peeps at the content to be protected, and the electronic device can be controlled to switch from the first state to a second state (such as a normal running state) to normally output the content to be protected.
[0131] It should be understood that, in order to avoid the above-mentioned output content protection function affecting the processing of the output content by the legal user of the electronic device, before the above-mentioned operation is performed, the identity of the detected target object can be identified to determine whether the target object is a legal user, which can be realized by an identity recognition method such as face recognition, and the implementation method of the identity recognition is not limited in the present application.
[0132] Optionally, it is detected that the electronic device is currently in an output fast control mode, and the relative position relationship indicates that the target object enters a first boundary of the perception boundary, the electronic device is controlled to enter a second state in the output fast control mode to output target content or respond to an input operation; it is detected that the electronic device is currently in the output fast control mode, and the relative position relationship indicates that the target object moves out of a second boundary of the perception boundary, the electronic device is controlled to enter a first state in the output fast control mode to stop outputting the target content or prohibit responding to the input operation.
[0133] Based on this, in combination with the above Figure 3 As shown, for the case that the target object is a legal user of the electronic device, it is hoped that the output of the electronic device can be actively controlled according to the distance between the target object and the electronic device. Exemplarily, if the target object gradually approaches the electronic device and enters the first boundary, it can be considered that the target object will use the electronic device, and the electronic device can be controlled to enter a first state such as turning on, brightening the screen, playing preset audio, etc. to enable the electronic device to output target content such as normally displaying content, playing content, or responding to user input operations to output corresponding content, etc. The content of the first state in this scenario and the implementation method thereof are not limited in the present application.
[0134] On the contrary, if the target object gradually moves away from the electronic device through the second boundary, it can be considered that the target object does not need to use the electronic device temporarily, and in order to ensure the safety of the electronic device, the electronic device can be controlled to enter a second state to stop outputting the current output target content, such as screen off, closing applications, etc.; or turning off, entering a locked state, etc. to prohibit responding to the input operation, and a password needs to be re-input to start. The above-mentioned target content and the output method thereof, the switching implementation method of the output method, and the implementation method of the prohibition of responding to the input operation are not limited in the present application, and can be determined as appropriate.
[0135] In combination with the foregoing description of the boundary dynamic adjustment process of the perception boundary, for a preset perception boundary, during the process in which the target object enters the perception boundary, the position data of the target object is continuously detected. It is considered that the position data can have jitter and it is impossible to reliably determine whether the target object enters the perception boundary. The application identifies the moving direction of the target object relative to the electronic device by analyzing the displacement change between a plurality of position data, determines the allowable error value of the position data collected by the position sensor in the moving direction considering the interference of the jitter data, and accordingly realizes the targeted adjustment of the boundary of the perception boundary to obtain a new boundary error range.
[0136] Subsequently, the new boundary error range of the perception boundary (such as the new double boundary of the perception boundary in the moving direction) is used to monitor the moving position of the target object, the positional relationship between the target object and the new boundary is determined, and accordingly the switching control between the first state and the second state of the electronic device in the current scene is accurately realized, and the state control requirement of the electronic device is reliably met.
[0137] Referring to Figure 8 FIG. 6 shows a flowchart of another optional example of the control method proposed in the application. This embodiment can be an optional detailed implementation method of the control method described in the foregoing embodiment, such as the description of the implementation process of step S21, but is not limited to the target object position data acquisition method described in this embodiment. As shown in Figure 8 The method can include the following steps.
[0138] Step S51: Obtain the detection distance value between each distance detection point and the electronic device.
[0139] The application can use a plurality of position sensors such as TOF and radar to realize distance detection between a plurality of distance detection points and the electronic device, and obtain the detection distance value corresponding to each distance detection point. The application does not limit the acquisition method of the detection distance value.
[0140] It can be understood that the plurality of distance detection points described above are not necessarily all detection points on the target object, and can include detection points on other objects in front of the display screen of the electronic device, as the case can be.
[0141] Step S52: Determine the target object containing the largest number of distance detection points according to the detection distance value change of adjacent distance detection points.
[0142] In actual applications, the area of the target object is larger than other types of objects in front of the electronic device, such as indoor tables and chairs, and the multiple position sensors or multiple detection points of the position sensor arranged on the electronic device are usually arranged in an array. Therefore, in the process of obtaining the detection distance value, the number of distance detection points on the target object should be the largest, and if the distance detection points of adjacent positions are on the same object, the difference between the detection distance values of the two distance detection points is usually small. Conversely, if the distance detection points are on different objects, the distances between the two objects and the electronic device are different, which will make the difference between the detection distance values of the two distance detection points larger.
[0143] Based on this, the application can determine which distance detection points in the multiple distance detection points are on the same object by analyzing the changes of the detection distance values of adjacent distance detection points, so as to determine the object containing the most distance detection points as the target object. It should be noted that the method for identifying the target object based on the detection distance values of the multiple distance detection points is not limited to the method described in this embodiment.
[0144] In step S53, the position data of the target object relative to the electronic device is obtained according to the adjacency relationship between the multiple distance detection points contained in the target object and the respective detection distance values.
[0145] For convenience of description, any distance detection point contained in the target object is denoted as a first distance detection point, and other distance detection points contained in the target object determined by the above analysis are denoted as second distance detection points. It can be seen that the second distance detection points and the first distance detection point form the multiple distance detection points contained in the target object.
[0146] According to the above analysis, the position data of the target object relative to the electronic device can include the first distance between the target object and the electronic device at the current time, the adjacency relationship between the first distance detection point and each second distance detection point contained in the target object, and the influence of the detection distance value of the first distance detection point on the first distance. Generally, the higher the aggregation degree of the first distance detection point and each second distance detection point, the higher the accuracy and reliability of the first distance calculated subsequently. Therefore, in some embodiments, the application can determine the influence weight of the first distance detection point by using the adjacency relationship between the first distance detection point and each second distance detection point, and then perform weighted summation on the respective detection distance values of the multiple distance detection points contained in the target object to obtain the first distance between the target object and the electronic device, but the calculation method is not limited to this.
[0147] In summary, in the embodiment of the present application, the target object is accurately identified by analyzing the changes between the detection distance values of the plurality of distance detection points and the electronic device, and then the influence of each distance detection point on the required first distance is considered according to the adjacency relationship between the plurality of distance detection points contained in the target object, so as to accurately obtain the position data of the target object relative to the electronic device in combination with the detection distance values of the plurality of distance detection points contained in the target object.
[0148] Reference Figure 9 For the flowchart of another optional example of the control method proposed in the present application, another optional detailed implementation manner of the method for obtaining the first distance between the target object and the electronic device can be provided, as shown in Figure 9 The method can include:
[0149] In step S61, the detection distance values between the plurality of distance detection points and the electronic device are obtained.
[0150] In step S62, the difference between the detection distance values of the adjacent two distance detection points is obtained.
[0151] In step S63, it is detected whether the difference is less than a continuous point threshold value; if yes, step S64 is entered; if no, step S65 is executed.
[0152] In step S64, it is determined that the corresponding adjacent two distance detection points belong to distance detection points on the same object.
[0153] In step S65, it is determined that the corresponding adjacent two distance detection points belong to distance detection points on different objects.
[0154] In step S66, the number of distance detection points on the same object is counted to obtain a target object containing the largest number of distance detection points.
[0155] According to the above description of the corresponding part of the embodiment, the present application can determine whether two distance detection points are located on the same object by analyzing the continuity of the detection distance values corresponding to the adjacent two distance detection points, i.e., whether the corresponding detection distance values are the distance values between the same object and the electronic device. According to the detection result, it is determined that the detection distance values of the adjacent two distance detection points are continuous, i.e., the difference between the detection distance values of the adjacent two distance detection points is less than a continuous point threshold value, such as 5 cm. The present application does not limit the size of the continuous point threshold value. The present application can connect the two distance detection points, and so on, to obtain a plurality of objects isolated from each other by dividing all the distance detection points in the entire FOV, and determine the region containing the largest distance detection point as the target object.
[0156] In the continuity detection process of the distance detection points, the distance detection points with the detection distance value greater than the detection range of the position sensor can be removed first, and the remaining distance detection points are connected and analyzed. It should be noted that the identification method of the target object is not limited to the detection method described in the embodiment.
[0157] In step S67, the number of neighbor distance detection points of each distance detection point included in the target object is obtained.
[0158] After the above analysis, the neighbor distance detection points in the embodiment belong to the distance detection points of the target object, and the statistical method of the number of neighbor distance detection points is not limited in the application. In general, the maximum number of neighbor distance detection points is 8.
[0159] In step S68, the first distance between the target object and the electronic device is obtained according to the number of neighbor distance detection points and the detection distance value of the corresponding distance detection point in the target object.
[0160] In a possible implementation method provided by the application, the influence weight of the corresponding distance detection point in the target object can be obtained according to the number of neighbor distance detection points and the number of distance detection points included in the target object. As analyzed above, the influence weight can represent the influence of the detection distance value of the corresponding distance detection point on the determination of the first distance between the target object and the electronic device. The value of the influence weight and the calculation method thereof are not limited in the application. For example, the number of distance detection points can be directly determined as the corresponding influence weight, or the influence weight of different distance detection points in the target object can be determined according to the corresponding relationship between the number of distance detection points and the influence weight, which will not be described in detail. Then, the detection distance values of the plurality of distance detection points included in the target object and the corresponding influence weights are weighted and summed to obtain the first distance between the target object and the electronic device.
[0161] In some other embodiments provided by the application, as Figure 10 For the flowchart of another optional example of the control method provided by the application, the embodiment of the application can be another optional detailed implementation of the method for obtaining the first distance between the target object and the electronic device, as Figure 10 The method can include the following steps.
[0162] In step S71, the detection distance value between each distance detection point and the electronic device is obtained.
[0163] In step S72, the target object including the most distance detection points is determined according to the change of the detection distance value of the neighbor distance detection point.
[0164] The implementation process of steps S71 and S72 can refer to the description of the corresponding part of the above embodiment, and the present embodiment will not be repeated.
[0165] Step S73, determining the position recognition area of the target object according to the adjacency relationship between the plurality of distance detection points contained in the target object.
[0166] In actual application, in combination with the above analysis, the human as the target object has more distance detection points on the body trunk, and the difference between the detection distance values is small, so the present application can use a machine learning algorithm such as a clustering algorithm to cluster the plurality of detection distance values obtained, and determine the clustering area as the position recognition area of the target object, but is not limited to the method for obtaining the position recognition area described in the present embodiment.
[0167] Step S74, eliminating the distance detection points beyond the position recognition area to obtain the target distance detection points contained in the target object.
[0168] Step S75, performing mean operation on the detection distance values corresponding to the target distance detection points to obtain the first distance between the target object and the electronic device.
[0169] In order to reduce interference, the present application can determine the distance detection points corresponding to the detection distance values in the clustering area as the target distance detection points on the target object, which can be considered as the distance detection points on the body trunk. Since the detection distance values of these distance detection points are not much different, the mean value of the detection distance values corresponding to the target distance detection points can be directly obtained by mean operation, and the average detection distance is determined as the first distance between the target object and the electronic device, but is not limited to the method described in the present embodiment.
[0170] In summary, through the method described in the above embodiment, the target object in the plurality of objects in front of the display screen of the electronic device is recognized by the multi-person detection method, and the first distance between the target object and the electronic device is accurately obtained by using the detection distance values of the distance detection points in the target object, which greatly improves the distance recognition accuracy of the target object.
[0171] Reference Figure 11 The structure schematic diagram of an optional example of the control device proposed in the present application can include:
[0172] The position sensor precision acquisition module 11 is configured to acquire the real-time precision of the position sensor.
[0173] In some embodiments proposed in the present application, the device can further include:
[0174] The movement direction acquisition module is configured to acquire the movement direction of the target object relative to the electronic device.
[0175] an error calculation module configured to obtain a real-time error of the sensor according to the moving direction;
[0176] In some embodiments, the edge position sensor precision obtaining module 11 can include:
[0177] a real-time position data obtaining unit configured to obtain real-time position data of the target object continuously collected by the position sensor;
[0178] a real-time error obtaining unit configured to obtain a real-time error of the position sensor according to displacement changes between a plurality of continuous real-time position data;
[0179] a real-time precision determining unit configured to determine a real-time precision of the position sensor according to the real-time error.
[0180] Optionally, the real-time error obtaining unit can include:
[0181] a displacement change analyzing unit configured to determine a moving direction of the target object relative to the electronic device according to displacement changes between a plurality of continuous real-time position data;
[0182] an accumulated value determining unit configured to determine an accumulated value of the real-time position data perpendicular to the moving direction according to the moving direction;
[0183] a real-time error determining unit configured to determine a real-time error of the target object in the moving direction according to the accumulated value.
[0184] Optionally, the real-time error determining unit can include:
[0185] a moving direction determining sub-unit configured to compare accumulated values in different predicted moving directions, and determine a first predicted moving direction corresponding to a maximum accumulated value as the moving direction of the target object relative to the electronic device;
[0186] a projection value obtaining sub-unit configured to obtain a projection value of the accumulated value in a second predicted moving direction on a perpendicular plane of the moving direction;
[0187] wherein the second predicted moving direction and the first predicted moving direction constitute different predicted moving directions of the target object, and the size of the projection value represents an interference degree of the position data in the corresponding second predicted moving direction;
[0188] a real-time error obtaining sub-unit configured to obtain a real-time error of the target object in the moving direction according to the obtained maximum projection value.
[0189] a perception boundary adjusting module 12 configured to adjust a perception boundary of the electronic device according to the real-time precision.
[0190] a state control module 13, configured to control the electronic device to enter a first state or a second state according to a position of the target object relative to the awareness boundary.
[0191] In some embodiments, the state control module 13 can include:
[0192] a position data acquisition unit, configured to acquire position data of the target object relative to the awareness boundary;
[0193] a relative position relationship determination unit, configured to determine a relative position relationship between the target object and the awareness boundary according to the position data;
[0194] a state control unit, configured to control the electronic device to enter a first state or a second state in a working mode of the electronic device according to the relative position relationship and the working mode; wherein the working mode is an output content protection mode or an output quick control mode.
[0195] Optionally, the state control unit includes at least one of the following control units:
[0196] a first control unit, configured to detect that the electronic device is currently in the output content protection mode, and the relative position relationship indicates that the target object enters a first boundary of the awareness boundary, control the electronic device to enter a first state in the output content protection mode, to implement protection of to-be-protected content output by the electronic device;
[0197] a second control unit, configured to detect that the electronic device is currently in the output content protection mode, and the relative position relationship indicates that the target object moves out of a second boundary of the awareness boundary, control the electronic device to enter a second state in the output content protection mode, to output the to-be-protected content;
[0198] a third control unit, configured to detect that the electronic device is currently in the output quick control mode, and the relative position relationship indicates that the target object enters a first boundary of the awareness boundary, control the electronic device to enter a second state in the output quick control mode, to output target content or respond to an input operation;
[0199] a fourth control unit, configured to detect that the electronic device is currently in the output quick control mode, and the relative position relationship indicates that the target object moves out of a second boundary of the awareness boundary, control the electronic device to enter a first state in the output quick control mode, to stop outputting the target content or prohibit responding to the input operation.
[0200] Optionally, the position sensor precision acquisition module 11 can include:
[0201] The detection distance value acquisition unit is configured to acquire a detection distance value between each of the plurality of distance detection points and the electronic device;
[0202] The target object determination unit is configured to determine a target object containing the largest number of distance detection points according to a change in the detection distance value of adjacent distance detection points;
[0203] The first distance obtaining unit is configured to obtain position data of the target object relative to the electronic device according to an adjacency relationship between the plurality of distance detection points contained in the target object and the detection distance value of each of the distance detection points;
[0204] The position data includes a first distance between the target object and the electronic device at a current time, an adjacency relationship between a first distance detection point and each second distance detection point contained in the target object, and an influence of the detection distance value of the first distance detection point on the first distance; the first distance detection point is any distance detection point contained in the target object, and the second distance detection point and the first distance detection point form the plurality of distance detection points contained in the target object.
[0205] Optionally, the target object determination unit can include:
[0206] The difference value acquisition unit is configured to acquire a difference value between the detection distance values of two adjacent distance detection points;
[0207] The continuity detection unit is configured to detect whether the difference value is less than a continuous point threshold value;
[0208] The second determination unit is configured to determine, in a case where the detection result of the continuity detection unit is yes, that the two adjacent distance detection points belong to distance detection points on a same object;
[0209] The third determination unit is configured to determine, in a case where the detection result of the continuity detection unit is no, that the two adjacent distance detection points belong to distance detection points on different objects;
[0210] The statistical unit is configured to count the number of distance detection points on a same object to obtain a target object containing the largest number of distance detection points.
[0211] Optionally, the first distance obtaining unit can include:
[0212] The neighbor distance detection point number acquisition unit is configured to acquire a number of neighbor distance detection points of each of the plurality of distance detection points contained in the target object; the neighbor distance detection points belong to the distance detection points of the target object;
[0213] The first computing unit is configured to obtain a first distance between the target object and the electronic device according to the number of the neighbor distance detection points and the detection distance values of the corresponding distance detection points in the target object.
[0214] Optionally, the first computing unit can include:
[0215] An influence weight obtaining unit is configured to obtain an influence weight of the corresponding distance detection point in the target object according to the number of the neighbor distance detection points and the number of the distance detection points contained in the target object;
[0216] The influence weight represents the influence of the detection distance value of the corresponding distance detection point on the determination of the first distance between the target object and the electronic device.
[0217] A weighted sum unit is configured to perform weighted sum on the detection distance values of the distance detection points contained in the target object and the corresponding influence weights to obtain the first distance between the target object and the electronic device.
[0218] In some other embodiments, the first distance obtaining unit can also include:
[0219] A position recognition area determining unit is configured to determine a position recognition area of the target object according to the adjacency relationship between the distance detection points contained in the target object.
[0220] A screening unit is configured to eliminate the distance detection points beyond the position recognition area to obtain target distance detection points contained in the target object.
[0221] A mean value operation unit is configured to perform mean value operation on the detection distance values corresponding to the target distance detection points to obtain the first distance between the target object and the electronic device.
[0222] It should be noted that the various modules, units, etc. in the above-mentioned device embodiments can be stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to realize the corresponding functions. The functions of each program module and its combination, as well as the achieved technical effects, can be referred to the description of the corresponding part of the above-mentioned method embodiments, and the present embodiment will not be described again.
[0223] The present application also provides a computer readable storage medium, which can store a computer program, the computer program can be called and loaded by a processor to realize the steps of the control method described in the above embodiments.
[0224] The application further provides a computer program product comprising computer instructions which, when executed by a processor, implement the steps of the control method described in the above method embodiments, and the implementation process is not described herein.
[0225] With reference to Figure 12 For an optional example of the hardware structure of the electronic device applicable to the control method proposed in the application, as shown in Figure 12 The electronic device can comprise a plurality of position sensors 21, an output device 22, a memory 23, and a processor 24, wherein:
[0226] The plurality of position sensors 21 can comprise, but are not limited to, the TOF sensor, various radar sensors, etc. described above, and can be used to detect the detection distance value between the corresponding distance detection point and the electronic device. The working principle of various position sensors is not described in detail in the application, and the plurality of position sensors 21 configured by the electronic device can be position sensors of the same type or position sensors of different types, which can be determined as appropriate.
[0227] In addition, in order to achieve accurate identification of the target object in the plurality of objects in front of the display screen of the electronic device through the multi-person detection algorithm, the plurality of position sensors 21 can be distributed in an array, but are not limited to this layout.
[0228] The output device 22 can be used to output content, such as a display screen for outputting display content. The display screen can be a touch or non-touch display screen, and the type of display screen is not limited in the application. The output device 22 can also include a speaker, an indicator light, etc., and the category of the output device 22 is not limited in the application and can be determined as appropriate.
[0229] The memory 23 can be used to store the program for implementing the control method described in the above method embodiments; and the processor 24 can be used to load and execute the program stored in the memory 23 to implement the steps of the control method described in the above method embodiments, and the implementation process is not described herein.
[0230] In the embodiments of the application, the memory 23 can comprise a high-speed random access memory and can also comprise a non-volatile memory, such as at least one magnetic disk storage device or other volatile solid-state storage device. The processor 24 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a dedicated integrated circuit (ASIC), a ready-to-program gate array (FPGA), or other programmable logic device, etc.
[0231] It can be understood that,Figure 12 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device can include more or fewer components than those shown, or combine certain components. As shown, the electronic device can also include input devices such as a camera, a microphone, and the like, and antennas, communication interfaces, power management modules, and the like that enable communication with other devices, which are not enumerated herein. Figure 12 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device can include more or fewer components than those shown, or combine certain components. As shown, the electronic device can also include input devices such as a camera, a microphone, and the like, and antennas, communication interfaces, power management modules, and the like that enable communication with other devices, which are not enumerated herein. Figure 13 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device can include more or fewer components than those shown, or combine certain components. As shown, the electronic device can also include input devices such as a camera, a microphone, and the like, and antennas, communication interfaces, power management modules, and the like that enable communication with other devices, which are not enumerated herein.
[0232] Finally, it should be noted that, regarding each of the above embodiments, unless the context clearly indicates otherwise, "one", "a", "an", and / or "the" do not specify a singular number, but can include a plural number. Generally, the terms "comprise" and "include" only indicate the inclusion of the steps and elements explicitly identified, and these steps and elements do not constitute an exclusive list. The method or device can also include other steps or elements. The element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, product, or device that includes the element.
[0233] In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; "and / or" in this document is only a description of the association relationship between the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0234] The terms such as "first", "second" and the like involved in the present application are only for the purpose of description, used to distinguish one operation, unit or module from another operation, unit or module, and do not necessarily require or imply any such actual relationship or order between these units, operations or modules. And it cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features, therefore, the features with "first", "second" can explicitly or implicitly include one or more of the features.
[0235] In addition, the embodiments in the specification are described in a progressive or parallel manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be mutually referred to. For the device and computer device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts are referred to the method part.
[0236] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A control method, the method comprising: Acquire real-time location data of the target object continuously collected by the location sensor; Based on the displacement changes between multiple consecutive real-time position data, the direction of movement of the target object relative to the electronic device is determined; Determine the accumulated value of the real-time position data perpendicular to the direction of movement based on the direction of movement; The real-time error of the target object in the direction of movement is determined based on the accumulated value; The real-time accuracy of the position sensor is determined based on the real-time error. The sensing boundary of the electronic device is adjusted according to the real-time accuracy. Based on the position of the target object relative to the sensing boundary, the electronic device is controlled to enter either a first state or a second state.
2. The method according to claim 1, wherein controlling the electronic device to enter a first state or a second state based on the position of the target object relative to the sensing boundary includes: Obtain the position data of the target object relative to the sensing boundary; The relative positional relationship between the target object and the sensing boundary is determined based on the location data; Based on the relative positional relationship and the current operating mode of the electronic device, the electronic device is controlled to enter either a first state or a second state under the operating mode; wherein the operating mode is an output content protection mode or an output fast control mode.
3. The method according to claim 2, wherein controlling the electronic device to enter a first state or a second state under the operating mode based on the relative positional relationship and the current operating mode of the electronic device includes at least one of the following: If the electronic device is detected to be in the output content protection mode, and the relative positional relationship indicates that the target object has entered the first boundary of the perception boundary, the electronic device is controlled to enter the first state of the output content protection mode, so as to protect the content to be protected output by the electronic device. If the electronic device is detected to be in the output content protection mode, and the relative positional relationship indicates that the target object has moved out of the second boundary of the perception boundary, the electronic device is controlled to enter the second state of the output content protection mode and output the content to be protected; If the electronic device is detected to be currently in the output fast control mode, and the relative positional relationship indicates that the target object has entered the first boundary of the perception boundary, the electronic device is controlled to enter the second state of the output fast control mode to output target content or respond to input operations. If the electronic device is detected to be in the output fast control mode and the relative positional relationship indicates that the target object has moved out of the second boundary of the perception boundary, the electronic device is controlled to enter the first state of the output fast control mode, and the output of the target content is stopped or the response to input operation is prohibited.
4. The method according to claim 1, wherein acquiring the position data of the target object continuously collected by the position sensor includes: Obtain the detection distance values between each of the multiple distance detection points and the electronic device; Based on the change in the detection distance values of adjacent distance detection points, determine the target object that contains the most distance detection points; Based on the adjacency relationships between the multiple distance detection points contained in the target object and their respective detection distance values, the position data of the target object relative to the electronic device is obtained; The location data includes a first distance between the target object and the electronic device at the current time, and the adjacency relationship between the first distance detection point and each second distance detection point included in the target object, which can characterize the influence of the detection distance value of the first distance detection point on the first distance. The first distance detection point is any distance detection point contained in the target object, and the second distance detection point and the first distance detection point together constitute multiple distance detection points contained in the target object.
5. The method according to claim 4, wherein determining the target object containing the most distance detection points based on the change in detection distance values of adjacent distance detection points includes: Obtain the difference between the detection distance values of two adjacent distance detection points; Detect whether the difference is less than the continuous point threshold; If so, determine that the two adjacent distance detection points belong to the same object; If not, determine that the two adjacent distance detection points belong to distance detection points on different objects; The number of distance detection points belonging to the same object is counted to obtain the target object containing the most distance detection points.
6. The method according to claim 4, wherein obtaining the position data of the target object relative to the electronic device based on the adjacency relationship between the plurality of distance detection points included in the target object and their respective detection distance values includes: Obtain the number of neighboring distance detection points for each of the multiple distance detection points contained in the target object; The neighbor distance detection point belongs to the distance detection point of the target object; Based on the number of neighbor distance detection points and the detection distance value of the corresponding distance detection point in the target object, a first distance between the target object and the electronic device is obtained.
7. A control device, the device comprising: Position sensor accuracy acquisition module It includes: a real-time position data acquisition unit, a displacement change analysis unit, a cumulative value determination unit, a real-time error determination unit, and a real-time accuracy determination unit; The real-time location data acquisition unit is used to acquire the real-time location data of the target object continuously collected by the location sensor; The displacement change analysis unit is used to determine the direction of movement of the target object relative to the electronic device based on the displacement change between multiple consecutive real-time position data. An accumulation value determination unit is used to determine the accumulation value of the real-time position data perpendicular to the movement direction based on the movement direction; A real-time error determination unit is used to determine the real-time error of the target object in the direction of movement based on the accumulated value; A real-time accuracy determination unit is used to determine the real-time accuracy of the position sensor based on the real-time error. A sensing boundary adjustment module is used to adjust the sensing boundary of the electronic device according to the real-time accuracy. The state control module is used to control the electronic device to enter a first state or a second state based on the position of the target object relative to the sensing boundary.
8. A computer-readable storage medium having a computer program stored thereon, the computer program being invoked and executed by a processor to implement the control method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Control method and electronic equipment
CN110297536A
Surroundings recognition device, surroundings recognition method, and storage medium
US20210248391A1