Protection method and device, wearable device and readable storage medium
Patent Information
- Application Number
- CN202211706122.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-12-29
AI Technical Summary
用户在不清楚实际外界环境做出动作时,容易与障碍物相撞,例如在家里玩篮球游戏撞到音响
[0020] In this embodiment, the wearable device can acquire the coordinates of a target object at multiple moments via wireless signals according to a target sampling frequency. Then, based on the target object's coordinates at a first moment and the coordinates of an obstacle, the distance between the target object and the obstacle at the first moment can be calculated. Furthermore, based on the target object's coordinates at the first moment and its coordinates at historical moments, the device can calculate the target object's velocity and acceleration at the first moment. Using the target object's velocity and acceleration at the first moment, the device can predict the target object's displacement over a preset future time period starting from the first moment. If the predicted displacement is greater than or equal to the distance between the target object and the obstacle at the first moment, a first operation can be performed to control the target object to move away from the obstacle. This maintains a safe distance between the target object and the obstacle, reducing the probability of a collision and thus improving the safety of the target object using the wearable device.
Smart Images

Figure CN115981468B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of virtual reality technology, and specifically relates to a protection method, device, wearable device, and readable storage medium. Background Technology
[0002] When users use wearable devices, such as virtual reality (VR) devices, the visual content is provided by the wearable device, and they cannot see the actual external environment.
[0003] Some applications require users to wear wearable devices and move around in space; for example, sports games require users to simulate movement. When users are unaware of the actual external environment when making movements, they are prone to colliding with obstacles, such as bumping into speakers while playing basketball at home. Therefore, there are inherent safety concerns when using wearable devices. Summary of the Invention
[0004] The purpose of this application is to provide a protection method, apparatus, wearable device, and readable storage medium that can improve the security of users when using wearable devices.
[0005] In a first aspect, embodiments of this application provide a protection method applied to a wearable device, wherein the wearable device is worn on a target object, and the wearable device pre-stores first coordinates of a first surface point in a first spatial region, wherein the first spatial region is the spatial region where the obstacle is located; the method includes:
[0006] According to the target sampling frequency, the coordinates of the second surface point in the second spatial region at N times are obtained through wireless signals. The second spatial region is the spatial region where the target object is located. The N times include the first time and the first target time. The first target time is located before the first time. N is an integer greater than 1.
[0007] Using the coordinates of the second surface point at the first moment and the first coordinate, the first distance between the target object and the obstacle at the first moment is calculated;
[0008] Using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the first target moment, the first velocity and the first acceleration of the target object at the first moment are calculated; using the first velocity and the first acceleration, the first displacement of the target object at a preset future time is predicted.
[0009] If the first motion displacement is greater than or equal to the first distance, a first operation is performed, the first operation being used to control the target object to move away from the obstacle.
[0010] Secondly, embodiments of this application provide a protective device applied to a wearable device, the wearable device being worn on a target object, the wearable device pre-storing first coordinates of a first surface point in a first spatial region, the first spatial region being the spatial region where the obstacle is located; the device includes:
[0011] The first acquisition module is used to acquire the coordinates of a second surface point in a second spatial region at N times via wireless signal according to the target sampling frequency. The second spatial region is the spatial region where the target object is located. The N times include a first time and a first target time, where the first target time is located before the first time and N is an integer greater than 1.
[0012] The first calculation module is used to calculate the first distance between the target object and the obstacle at the first time using the coordinates of the second surface point at the first time and the first coordinates.
[0013] The second calculation module is used to calculate the first velocity and the first acceleration of the target object at the first moment using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the first target moment.
[0014] The first prediction module is used to predict the first motion displacement of the target object at a preset future time using the first motion velocity and the first motion acceleration.
[0015] An execution module is configured to perform a first operation when the first motion displacement is greater than or equal to the first distance, the first operation being configured to control the target object to move away from the obstacle.
[0016] Thirdly, embodiments of this application provide a wearable device, which includes a processor and a memory, wherein the memory stores programs or instructions that can run on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0017] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0018] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0019] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0020] In this embodiment, the wearable device can acquire the coordinates of a target object at multiple moments via wireless signals according to a target sampling frequency. Then, based on the target object's coordinates at a first moment and the coordinates of an obstacle, the distance between the target object and the obstacle at the first moment can be calculated. Furthermore, based on the target object's coordinates at the first moment and its coordinates at historical moments, the device can calculate the target object's velocity and acceleration at the first moment. Using the target object's velocity and acceleration at the first moment, the device can predict the target object's displacement over a preset future time period starting from the first moment. If the predicted displacement is greater than or equal to the distance between the target object and the obstacle at the first moment, a first operation can be performed to control the target object to move away from the obstacle. This maintains a safe distance between the target object and the obstacle, reducing the probability of a collision and thus improving the safety of the target object using the wearable device. Attached Figure Description
[0021] Figure 1 This is a flowchart of the action response provided in the embodiments of this application;
[0022] Figure 2 This is a time-domain schematic diagram of a linear frequency modulated millimeter wave provided in an embodiment of this application;
[0023] Figure 3 This is a frequency domain schematic diagram of a linear frequency modulated millimeter wave provided in an embodiment of this application;
[0024] Figure 4 This is a schematic diagram of distance measurement provided in an embodiment of this application;
[0025] Figure 5 This is a schematic diagram of speed measurement provided in an embodiment of this application;
[0026] Figure 6 This is a schematic diagram of direction measurement provided in an embodiment of this application;
[0027] Figure 7 This is one of the schematic diagrams of the usage space of the wearable device provided in the embodiments of this application;
[0028] Figure 8 This is the second schematic diagram of the usage space of the wearable device provided in the embodiments of this application;
[0029] Figure 9 This is one of the flowcharts of the protection method provided in the embodiments of this application;
[0030] Figure 10 This is the second flowchart of the protection method provided in the embodiments of this application;
[0031] Figure 11 This is a flowchart of the sampling frequency adjustment provided in the embodiments of this application;
[0032] Figure 12 This is a structural diagram of the protection device provided in the embodiments of this application;
[0033] Figure 13 This is one of the structural diagrams of the wearable device provided in the embodiments of this application;
[0034] Figure 14 This is the second structural diagram of the wearable device provided in the embodiments of this application. Detailed Implementation
[0035] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0036] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0037] For ease of understanding, the following describes some aspects of the embodiments of this application.
[0038] When a user wears a wearable device to play a VR game, the user's actions and response process can be seen in [reference needed]. Figure 1 .
[0039] Steps 1) to 2) involve the user reacting to events that occur in the game. For example, moving with their feet or swinging their racket to hit the ball.
[0040] Step 3) The VR sensors of the wearable device record the user's actions (such as the user's movement speed and angle) and report them to the application processor.
[0041] Steps 4) to 5) The application processor will process the sensor data and report it to the game server or local storage via the network for further processing, and then map it to the character in VR to simulate the actual user's actions.
[0042] In existing technologies, common practices to prevent users wearing wearable devices from colliding with obstacles include the following:
[0043] 1. Adding a safety officer to observe whether the user will collide with obstacles. Disadvantage: High risk for single-person use.
[0044] 2. Used in a professional anti-collision room. Disadvantage: Increases the barrier to entry for wearable devices.
[0045] 3. Restricting the user's range of movement by using a standing platform has the disadvantage of reducing the user's sense of immersion.
[0046] Therefore, this application provides a new protection method that can use wireless signals to obtain the user's spatial information: position, direction, speed, and acceleration, in order to predict the user's movement displacement. When it is predicted that the user may collide with an obstacle, measures can be taken to avoid the user from colliding with the obstacle. In this way, the user's safety can be protected without the need for protection personnel, special rooms, or a standing platform to restrict the user's range of movement.
[0047] In specific implementation, the wireless signal can be any of the following: millimeter wave, Wi-Fi signal, cellular signal, or ultra-wideband (UWB) signal. The specific signal can be determined according to actual needs, and this application embodiment does not limit it.
[0048] To facilitate understanding of how wireless signals work, the following explanation will use linear frequency modulated millimeter waves as an example.
[0049] The time-domain plot of linear frequency modulated millimeter waves can be found in [reference needed]. Figure 2 For the frequency domain diagram, please refer to Figure 3 .
[0050] 1) The following explains the principle of measuring distance D using linear frequency modulated millimeter waves:
[0051] like Figure 4 As shown, the module sends a TX signal and receives an RX signal.
[0052] Distance D = 0.5 * τ * c; where τ is the time interval between transmitting the TX signal and receiving the RX signal, and c is the speed of light.
[0053] To facilitate the measurement of other variables later, the relationship between the intermediate frequency signal IF and the distance D is established. The intermediate frequency signal is the signal obtained by mixing the TX signal and the RX signal.
[0054] Among them, f IF f is the frequency of the IF signal. IF = (S*2D) / c; Initial phase of the IF signal
[0055] 2) The principle of measuring velocity v using linear frequency modulated millimeter waves is explained below:
[0056] like Figure 5 As shown, the module sends TX1 and TX2 signals with an interval of Tc. After connecting to RX, a Fourier transform is performed to the frequency domain, and the two RX signals are selected with arbitrary time-domain peak values and phase-mapped with the IF intermediate frequency signal.
[0057] The movement of the object being measured causes a phase difference between RX1 and RX2. The initial phase of the IF signal is known. In speed measurement, the distance the object moves is D = v * Tc.
[0058] Combining the two formulas above, we get therefore,
[0059] 3) The principle of measuring direction θ using linear frequency modulated millimeter waves is explained below:
[0060] like Figure 6 As shown, two RX antennas are used: RX antenna 1 and RX antenna 2. The distance between RX antenna 1 and RX antenna 2 is l. The object moves from point A to point B.
[0061] From the above, we can calculate the distance between the object and RX antenna 1 as d1, and the distance between the object and RX antenna 2 as d1 + Δd1, i.e., d1 + Δd1. Given d1 + Δd1, the direction of motion and distance can be calculated.
[0062] Direction of motion θ = α1 - β1
[0063] The distance traveled is D = [(d1)] 2 +(d2) 2 -(2*d1*d2*Cosθ) 2 ] 0.5
[0064] in:
[0065] α1=Cos -1 [(d1) 2 +(l) 2 -(d1+Δd1) 2 ] / 2*(d1)*l
[0066] β1=Cos -1 [(d2) 2 +(l) 2 -(d2+Δd2)2 ] / 2*(d2)*l
[0067] In this application embodiment, the protection method can be applied to various scenarios, as detailed below:
[0068] In some scenarios, the space where wearable devices are used can be equipped with wireless transceivers. These transceivers are used to send and receive wireless signals. They interact with the wearable device to allow it to obtain the user's location and spatial information.
[0069] For easier understanding, please refer to Figure 7 and Figure 8 ,exist Figure 7 and Figure 8 In this design, a millimeter-wave radar can be placed diagonally at the top of the user's workspace, scanning horizontally and vertically to accurately capture the user's spatial orientation. Figure 7 and Figure 8 In this system, modules 1 and 2 are millimeter-wave radars, and module 3 is a wearable device. It is understandable that... Figure 7 and Figure 8 The number and location of the mid-millimeter wave radars are just examples. The specific settings can be made according to actual needs, as long as they can accurately capture the user's azimuth and spatial information.
[0070] In other scenarios, there is no need to set up wireless signal transceivers in the space where the wearable device is used. In this scenario, the wireless signal is sent and received by the wearable device itself.
[0071] In some embodiments, in order to obtain the user's location and spatial information, the wearable device may perform the following operations in advance:
[0072] I. Initialize the coordinate system.
[0073] Space data is obtained by transmitting and receiving millimeter waves using millimeter-wave radar, such as Figure 7 and Figure 8 As shown, a Cartesian coordinate system is established. It is worth noting that in some embodiments, the established coordinate system can be a spherical coordinate system. In a Cartesian coordinate system, determining the position of a point requires at least the coordinate data of the x, y, and z axes. However, in a spherical coordinate system, the position of a point can be directly determined by the distance r. Therefore, compared to a Cartesian coordinate system, a spherical coordinate system can improve the efficiency of position determination, thereby providing faster guidance for user actions and further improving user safety. For ease of understanding, the following example uses a Cartesian coordinate system, but this does not limit the form of the coordinate system.
[0074] In this embodiment of the application, the spatial region where the obstacle is located is denoted as the first spatial region K, and the position of the midpoint of the first spatial region K is denoted as k. i ∈{K}.
[0075] Let the spatial region where the user (i.e., the target object) is located be the second spatial region P, and let the position of the midpoint of the second spatial region P be denoted as p. i ∈{P}.
[0076] Let the warning zone for the obstacle be the third space region J, and let the position of the midpoint of the third space region J be denoted as j. i ∈{J}.
[0077] II. Define parameters.
[0078] Please continue reading Figure 7 and Figure 8 .
[0079] After time t seconds, the person's displacement distance is l;
[0080] The distance between the target object and the first spatial region K = [(x pi -x ki ) 2 +(y pi -y ki ) 2 +(z pi -z ki ) 2 ] 0.5 ;
[0081] Danger distance d = P surface point p i With interior point k of K i Distance between, p i ∈{P};
[0082] Warning distance j = P surface point p i With surface point j i Distance between, k i ∈{K};
[0083] Safety distance s = P surface point p i With surface point k i Distance between, j i ∈{J}.
[0084] Distinguishing between surface points and interior points: If a point in a spatial region has a coordinate value that is the maximum or minimum coordinate value of that spatial region, that point is a surface point of that spatial region. In other words, all surface points of a spatial region constitute the spatial surface of that spatial region. If a point in a spatial region does not have a coordinate value that is the maximum or minimum coordinate value of that spatial region, that point is an interior point of that spatial region.
[0085] The protection method of this application embodiment can be applied to wearable devices, that is, executed by wearable devices.
[0086] As described above, the wearable device pre-stores the coordinates of surface points and interior points in a first spatial region, which is the spatial region where the obstacle is located, to calculate the distance between the target object and the obstacle. Furthermore, the wearable device pre-stores the coordinates of surface points and interior points in a third spatial region, which is the warning spatial region of the obstacle, to calculate the distance between the target object and the warning spatial region.
[0087] The protection method provided by the embodiments of this application will be described in detail below with reference to the accompanying drawings, through specific examples and application scenarios.
[0088] Figure 9 This is one of the flowcharts of the protection method provided in the embodiments of this application. For example... Figure 9 As shown, the protection method may include:
[0089] Step 901: According to the target sampling frequency, obtain the coordinates of the second surface point of the second spatial region at N times via wireless signal. The second spatial region is the spatial region where the target object is located. The N times include the first time and the first target time. The first target time is located before the first time. N is an integer greater than 1.
[0090] The coordinates of the surface points in the second spatial region can represent the position of the target object.
[0091] The target sampling frequency can be understood as the sampling frequency of the target object's spatial orientation information. It is worth noting that the target sampling frequency can be constant or variable during the target object's movement. The N time points represent the sampling times for the target object's spatial orientation information.
[0092] In practice, at the sampling time, the wireless transceiver can send a wireless signal so that the wearable device can obtain the spatial orientation information of the target object at that sampling time. The spatial orientation information includes: position, velocity, acceleration, and direction.
[0093] In this step, the wearable device can acquire the position of the target object at each sampling time via wireless signals. Then, the wearable device can use the coordinates of the target object at adjacent sampling times to calculate the target object's velocity and direction of motion. Using the target object's velocity at adjacent sampling times, the acceleration of the target object's motion is calculated; see the description of step 903 for details.
[0094] Step 902: Using the coordinates of the second surface point at the first moment and the first coordinates, calculate the first distance between the target object and the obstacle at the first moment.
[0095] Understandably, in step 901, the wearable device can acquire the location of the target object at multiple times. The first time can be understood as the current time. Each time the wearable device acquires the location of the target object at H times, steps 902 and 903 can be executed once, where H is a positive integer and can be set according to actual needs. This application does not limit the execution sequence between steps 902 and 903.
[0096] The distance between the target object and the obstacle can be calculated using the coordinates of the first surface point and the second surface point. The distance between the first surface point in the first spatial region and the second surface point in the second spatial region can characterize the distance between the target object and the obstacle, i.e., the aforementioned safety distance s. The first surface point is the surface point in the first spatial region closest to the target object, and the second surface point is the surface point in the second spatial region closest to the obstacle. It can be understood that the first surface point and the second surface point may be different if the position of the target object is different.
[0097] Since the target object is moving, the distance between the target object and the obstacle may differ at different times. The first distance is the distance between the target object and the obstacle at the first moment.
[0098] Step 903: Using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the first target moment, calculate the first velocity and the first acceleration of the target object at the first moment.
[0099] To obtain the velocity of the target object at the first moment, the wearable device can first use the first position of the target object at the first moment and the second position of the target object at the first target moment to calculate the displacement l of the target object between the first moment and the first target moment. The first target moment is located before the first moment and can be spaced at intervals of H integer multiples of sampling time. In one optional implementation, the first target moment can be the H sampling time before the first moment.
[0100] The first velocity of the target object at the first moment can be calculated using the velocity calculation formula v = l / t, where t is the time interval between the first moment and the first target moment.
[0101] To obtain the motion acceleration of the target object at the first moment, the wearable device can obtain the motion velocity of the target object at the first target moment. By calculating the difference Δv between the motion velocity of the target object at the first target moment and the motion velocity of the target object at the first moment, the first motion acceleration of the target object at the first moment can be calculated using the acceleration calculation formula a=Δv / t.
[0102] Step 904: Using the first motion velocity and the first motion acceleration, predict the first motion displacement of the target object at a preset future time.
[0103] In this embodiment, the target object's displacement over a future time period is predicted using its current velocity and acceleration. Then, the predicted displacement is compared with the current distance between the target object and an obstacle. Based on this comparison, it is predicted whether the target object will collide with the obstacle if it continues to move at the same velocity and acceleration. If a collision is predicted, the wearable device can take preventative measures to guide the target object away from the obstacle, reducing the probability of a collision.
[0104] The preset future duration is the time allotted for the target object to react and act in response to the VR measures; it can be preset. In this step, the starting time of the preset future duration is the first moment. In one optional implementation, the motion displacement l can be calculated using l = V0t + (1 / 2)at. 2 Calculations show that, in another alternative implementation, the displacement l can be calculated using l = cosθ[V0t + (1 / 2)at]. 2 The calculation yields θ, where θ is the direction of movement of the target object, which can be calculated based on the position of the target object. The measurement of the direction of movement of the target object can be found in the foregoing description and related technologies, and will not be described here.
[0105] In practice, after predicting the first motion displacement, the magnitude of the first motion displacement can be compared with that of the first distance.
[0106] If the first displacement is greater than or equal to the first distance, the first displacement can be determined to be a dangerous distance, indicating that if the target object continues to move in the current way, it is very likely to collide with the obstacle. The wearable device can execute step 905, which can guide the target object away from the obstacle before it collides with the obstacle, thereby reducing the probability of the target object colliding with the obstacle.
[0107] If the first displacement is less than the first distance, it means that the target object will not collide with the obstacle if it continues to move in the existing manner. In some embodiments, the wearable device may not perform any operation and return to steps 901 to 903. In other embodiments, the wearable device may compare the difference between the first distance and the first movement distance with a preset distance value. If the difference is less than the preset distance value, it means that the target object is approaching the obstacle, and the wearable device may output a prompt message to indicate that the target object is approaching the obstacle. If the difference is greater than the preset distance value, it means that the target object is far from the obstacle, and the wearable device may not perform any operation and return to steps 901 to 903.
[0108] Step 905: When the first motion displacement is greater than or equal to the first distance, perform a first operation, which is used to control the target object to move away from the obstacle.
[0109] In some embodiments, the first operation may include an alarm operation, such as displaying warning visual information in the wearable device. The warning visual information may include "about to collide with an obstacle". Furthermore, the warning visual information may also provide movement suggestions for the target object, such as "backwards".
[0110] In other embodiments, the first operation may include a pushing operation on the target object to push the target object away from the obstacle.
[0111] After performing the first operation, the wearable device continues to return to steps 901 to 903 to continue protecting the target object.
[0112] The protection method of this application embodiment allows the wearable device to acquire the coordinates of a target object at multiple moments via wireless signals according to a target sampling frequency. Then, based on the coordinates of the target object at a first moment and the coordinates of an obstacle, the distance between the target object and the obstacle at the first moment can be calculated. Furthermore, based on the coordinates of the target object at the first moment and its coordinates at historical moments, the velocity and acceleration of the target object at the first moment can be calculated. Using the velocity and acceleration of the target object at the first moment, the displacement of the target object over a preset future time period can be predicted. If the predicted displacement is greater than or equal to the distance between the target object and the obstacle at the first moment, a first operation can be performed to control the target object to move away from the obstacle. This maintains a safe distance between the target object and the obstacle, reducing the probability of collision and thus improving the safety of the target object using the wearable device.
[0113] In some embodiments, the wearable device also pre-stores the second coordinates of a third surface point in a third spatial region, wherein the third spatial region is a warning space region for the obstacle;
[0114] Before predicting the displacement of the target object over a preset future time period using the first motion velocity and the first motion acceleration, the method further includes:
[0115] Using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the target moment, the first direction of motion of the target object at the first moment is calculated;
[0116] By comparing the first coordinate, the second coordinate, and the coordinates of the second surface point at the first time, a first positional relationship between the target object and the first spatial region and the third spatial region at the first time is determined.
[0117] The step of predicting the displacement of the target object over a preset future time period using the first motion velocity and the first motion acceleration includes:
[0118] When the first positional relationship is that the target object is located within the third spatial region and outside the first spatial region, and the first direction of movement points towards the obstacle, the displacement of the target object in a preset future time period is predicted using the first movement speed and the first movement acceleration.
[0119] In this embodiment, a warning space region for obstacles is introduced. If the target object does not enter the warning space region, that is, is located outside the warning space region, it means that the target object is far from the obstacle and the possibility of colliding with the obstacle is not high. The wearable device can refrain from performing the operation of predicting the movement displacement of the target object, thereby reducing the power consumption of the wearable device.
[0120] Additionally, the movement direction of the target object can be obtained to determine whether it is moving towards an obstacle or in another direction. If the first movement direction does not point towards an obstacle, it means the target object is moving in another direction, and the probability of it colliding with the obstacle is low. In this case, the wearable device can choose not to perform the operation of predicting the target object's movement displacement, thereby reducing the power consumption of the wearable device.
[0121] Therefore, in this embodiment, the spatial location of the target object (whether it is within or outside the warning space area) and the direction of movement of the target object (whether it is moving towards the obstacle or in another direction) can be further determined, so as to decide whether to perform the operation of predicting the movement displacement of the target object based on these two parameters.
[0122] Specifically, if the target object is located outside the first spatial region within the third spatial region and the first direction of movement is pointing towards the obstacle, the operation of predicting the movement displacement of the target object is performed; otherwise, the operation of predicting the movement displacement of the target object may not be performed. In this way, meaningless power consumption of the wearable device can be avoided, and the power of the wearable device can be saved.
[0123] The spatial location of the target object can be determined by comparing the coordinates of the second surface point with the coordinates of the first surface point and the third surface point, respectively. The third surface point is the closest internal point to the target object in the third spatial region. It can be understood that the third surface point may be different if the location of the target object is different.
[0124] The direction of motion of the target object can be determined by the coordinates of a surface point (the second surface point) in the area where the target object is located at adjacent time points. Specifically, the distance between the target object and the obstacle at the first time point can be calculated using the coordinates of the second surface point at the first time point and the coordinates of the first surface point; similarly, the distance between the target object and the obstacle at the first target time point can be calculated using the coordinates of the second surface point at the first target time point and the coordinates of the first surface point. If the distance between the target object and the obstacle at the first time point is less than the distance between the target object and the obstacle at the first target time point, it indicates that the target object is moving towards the obstacle, thus determining that the direction of motion of the target object is towards the obstacle; conversely, it indicates that the direction of motion of the target object is away from the obstacle.
[0125] In this way, the operation of predicting the target object's motion displacement is only performed when the target object is within the warning space area of the obstacle and is moving towards the obstacle. In this way, the frequency of the wearable device performing the operation of predicting the target object's motion displacement can be reduced, thus saving the wearable device's power.
[0126] As can be seen from the foregoing, the sampling frequency of the target object's spatial orientation information can be constant or variable. For the former, the sampling frequency can be preset; for the latter, the specific explanation is as follows:
[0127] In some embodiments, the method may further include:
[0128] The target sampling frequency is adjusted using the distance between the target object and the obstacle; wherein the target sampling frequency is negatively correlated with the distance.
[0129] The sampling frequency is adjusted by utilizing the distance between the target object and the obstacle. The closer the target object is to the obstacle, the higher the sampling frequency is to improve the accuracy of obtaining the target object's spatial orientation information; the farther the target object is from the obstacle, the lower the sampling frequency is to reduce the power consumption of the wearable device.
[0130] In one optional implementation, the wearable device can pre-store a functional relationship between the sampling frequency and the distance between the target object and the obstacle. In this implementation, after obtaining the distance between the target object and the obstacle a preset number of times, the last obtained distance between the target object and the obstacle can be substituted into the functional relationship to determine the sampling frequency. Subsequently, the determined sampling frequency is adjusted to the target sampling frequency.
[0131] In another optional implementation, the wearable device can preset a correspondence between distance and sampling frequency. This correspondence can include at least two sampling frequencies, each corresponding to a distance interval, with different sampling frequencies corresponding to different distance intervals. In this implementation, after acquiring the distance between the target object and the obstacle a preset number of times, the last acquired distance between the target object and the obstacle is compared with the distance interval in the correspondence. The sampling frequency corresponding to the distance interval containing the distance between the target object and the obstacle is then adjusted to the target sampling frequency.
[0132] By using the above method, the sampling frequency of the target object's spatial orientation information can be adjusted based on the distance between the target object and the obstacle. This can reduce the power consumption of the wearable device while ensuring the accuracy of the acquisition of the target object's spatial orientation information to avoid collisions with the obstacle.
[0133] In some embodiments, the wearable device also pre-stores the second coordinates of a third surface point in a third spatial region, wherein the third spatial region is a warning space region for the obstacle;
[0134] The step of obtaining the coordinates of the second surface point in the second spatial region via wireless signal according to the target sampling frequency includes:
[0135] The step of obtaining the coordinates of the second surface point in the second spatial region at N time points via wireless signal according to the target sampling frequency includes:
[0136] According to the first sampling frequency, the coordinates of the second surface point at n1 times are obtained through wireless signal. The n1 times include the second time and the second target time. The second target time is located before the second time. n1 is an integer greater than 1 and less than N.
[0137] Using the coordinates of the second surface point at the second time and the coordinates of the second target time, the second velocity, the second acceleration, and the second direction of motion of the target object at the second time are calculated.
[0138] Using the coordinates of the second surface point at the second time and the second coordinates, the second distance between the target object and the third spatial region at the second time is calculated;
[0139] When the second direction of motion is directed toward the obstacle, the second motion velocity and the second motion acceleration are used to predict the second motion displacement of the target object during a first time period;
[0140] When the second motion displacement is greater than or equal to the second distance, the coordinates of the second surface point at n2 time points are obtained by wireless signal according to the second sampling frequency, wherein the second sampling frequency is greater than the first sampling frequency, and n2 is an integer greater than 1 and less than N.
[0141] The first sampling frequency and the second sampling frequency are the target sampling frequencies at different times.
[0142] The second distance between the second surface point and the third surface point, i.e., the distance between the target object and the warning space area, is the aforementioned warning distance j. The first duration can be preset; in one optional implementation, the first duration can be the sampling time interval corresponding to the first sampling frequency.
[0143] In this embodiment, a warning space region with obstacles is introduced. When a target object enters the warning space region from outside, the sampling frequency of the target object's spatial orientation information can be increased to improve the accuracy of acquiring the target object's spatial orientation information.
[0144] In practice, when the target object is located outside the warning space area, the wearable device can sample the spatial information of the target object according to the first sampling frequency, which is relatively small.
[0145] During sampling at the first sampling frequency, if it is determined that the target object is moving towards the obstacle, the distance between the target object and the warning space area can be calculated using the sampled spatial information of the target object, and the displacement of the target object in the first time period, i.e., the second displacement, can be predicted. Then, the magnitudes of the two are compared.
[0146] If the distance between the target object and the warning space area is greater than the second movement distance, it indicates that the target object will enter the warning space, and the probability of the target object colliding with the obstacle increases. The sampling frequency can be increased, and sampling can be performed according to the second sampling frequency to reduce the probability of the target object colliding with the obstacle.
[0147] If the distance between the target object and the warning space area is less than the second movement distance, it means that the target object will not enter the warning space for the time being, and the possibility of the target object colliding with the obstacle is small. Therefore, the original sampling frequency can be maintained, and sampling can continue to be performed according to the first sampling frequency.
[0148] By using the above method, when a target object enters the warning space from outside the warning space area, the sampling frequency of the target object's spatial orientation information can be increased. Otherwise, sampling can continue at the original sampling frequency. This can reduce the probability of the target object colliding with obstacles and also reduce the power consumption of the wearable device.
[0149] Furthermore, the n2 time points include a third time point and a third target time point, wherein the third target time point is located before the third time point;
[0150] After obtaining the coordinates of the second surface point at n2 time points via wireless signal according to the second sampling frequency, the method further includes:
[0151] By comparing the second coordinates and the coordinates of the second surface point at the third time, a second positional relationship between the target object and the third spatial region at the third time is determined;
[0152] When the target object is located within the third spatial region in the second positional relationship, the third direction of motion of the target object at the third time is calculated using the coordinates of the second surface point at the third time and the coordinates of the target object at the third time.
[0153] When the third direction of motion points to the obstacle, the coordinates of the second surface point at time n3 are obtained by wireless signal according to the third sampling frequency, wherein the third sampling frequency is greater than the second sampling frequency, and n3 is an integer greater than 1 and less than N.
[0154] In this embodiment, during the sampling period according to the second sampling frequency, the coordinates of the second surface point of the spatial region where the target object is located can be compared with the coordinates of the third surface point of the warning spatial region to determine the positional relationship between the target object and the warning spatial region.
[0155] Once the target object is located in the warning space area and enters the alert space area, its movement direction can be continued to be tracked.
[0156] If the target object moves towards the obstacle, the probability of the target object colliding with the obstacle increases. The sampling frequency can be increased, and sampling can be performed according to the third sampling frequency to reduce the probability of the target object colliding with the obstacle.
[0157] If the target object moves towards the obstacle, the probability of it colliding with the obstacle is low. Therefore, the original sampling frequency can be maintained, and sampling can be performed at the second sampling frequency to reduce the power consumption of the wearable device. Alternatively, if the target object moves away from the obstacle, the sampling frequency can be reduced to further reduce the power consumption of the wearable device.
[0158] In some embodiments, the method may further include:
[0159] When it is determined that the target object is in a state of accelerated motion, the target sampling frequency is adjusted according to the motion speed of the target object; wherein, the target sampling frequency is positively correlated with the motion speed.
[0160] In this embodiment, the wearable device can determine whether the target object is in an accelerated motion state based on the target object's movement acceleration at adjacent time points. For example, if the movement acceleration increases over time, it can be determined that the target object is in an accelerated motion state.
[0161] In this situation, as the target object's speed gradually increases, its displacement per unit time gradually increases. To effectively reduce the probability of a collision between the target object and the obstacle, the target sampling frequency can be adjusted according to the target object's speed. Specifically, as the target object's speed increases, the sampling frequency also increases.
[0162] In one alternative implementation, the relationship between the sampling frequency f and the motion velocity v can be:
[0163] f = 2 × v / r
[0164] Where r is the resolution distance, i.e., the reaction distance of the target object. r is a constant, and its value is related to the target object and the type of motion of the target object. That is, the value of r is different for different target objects and / or types of motion.
[0165] In another optional implementation, the wearable device can preset a correspondence between speed and sampling frequency. This correspondence can include at least two sampling frequencies, each corresponding to a speed range, with different sampling frequencies corresponding to different speed ranges. In this implementation, after acquiring a preset number of speeds, the last acquired speed is compared with the speed range in the correspondence, and the sampling frequency corresponding to the speed range is adjusted to the target sampling frequency.
[0166] In another optional implementation, adjusting the target sampling frequency according to the movement speed of the target object includes:
[0167] Using the third motion velocity of the second surface point at the fourth time, the third motion acceleration of the target object at the fourth time is calculated, wherein the fourth time is the sampling time corresponding to the fourth sampling frequency;
[0168] Using the third motion velocity and the third motion acceleration, the fourth motion velocity of the target object at the fifth moment is predicted, and the fifth moment is separated from the fourth moment by a second time interval;
[0169] If the fourth motion speed is greater than the preset speed, the fourth sampling frequency is adjusted to the fifth sampling frequency using the third motion speed, and the fifth sampling frequency is greater than the fourth sampling frequency.
[0170] The fourth and fifth sampling frequencies are target sampling frequencies at different times. The second duration can be preset; alternatively, the second duration can be the sampling time interval corresponding to the fourth sampling frequency.
[0171] In this embodiment, during sampling at the fourth sampling frequency, the target object's future velocity can be predicted using its motion velocity and acceleration, and compared with a preset velocity. The preset velocity can be a resolution velocity for different motion modes.
[0172] If the predicted speed of movement is greater than the preset speed, the speed of the target object may change and enter a faster movement mode. In this case, the sampling frequency can be increased to effectively reduce the probability of the target object colliding with the obstacle. Otherwise, the original sampling rate can be maintained to save the power consumption of the wearable device.
[0173] By using the above method, the sampling frequency is increased only when the predicted speed is greater than the preset speed. This can effectively reduce the probability of the target object colliding with the obstacle and also save power consumption of the wearable device.
[0174] It should be noted that the various embodiments and implementation methods described in the method examples can be implemented independently or in combination, provided that they do not conflict with each other. The specific implementation can be determined according to actual needs, and the embodiments of this application do not limit this.
[0175] To facilitate understanding of the protection method provided in the above embodiments, the following describes the protection method using a specific scenario embodiment.
[0176] This scenario implementation example may specifically include the following steps:
[0177] Step one: When outside the warning space, sample at a relatively low frequency. Calculate the target object's acceleration by sampling its motion velocity at fixed time intervals.
[0178] Determine whether the movement distance l1 of the target object is greater than the warning distance j, where j = [(x pi - x ji ) 2 + (y pi - y ji ) 2 + (z pi - z ji ) 2 ) 0.5 . If l1 >= j, increase the sampling frequency; if l < j, maintain the original state.
[0179] Step 2, within the warning space and outside the danger distance, when the target object moves towards the danger area, increase the sampling frequency to obtain more accurate speed and acceleration.
[0180] Step 3, set the reserved time as t. Predict the displacement l2 of the target object. V0 and a are the initial speed and acceleration sampled from the user at the start of the prediction. t is the reserved time for the target object to react and act.
[0181] Step 4, compare l2 with the safety distance s = [(x pi - x si ) 2 + (y pi - y si ) 2 + (z pi - z si ) 2 ) 0.5 .
[0182] If l2 < s, it is determined that the target object will not collide with the obstacle, and return to Step 2.
[0183] If l2 >= s, it is determined that l = d is the danger distance, and guide the user to move to an area away from the obstacle locally or on the server in advance to avoid collision.
[0184] For easy understanding, see Figure 10 .
[0185] In one way, the sampling frequency can be adjusted by the following method.
[0186] Identify the movement speed of the target object to adjust the sampling frequency and reduce power consumption.
[0187] Different games correspond to different movement speeds. For example: walking speed is 2m / s, running speed is 10m / s, and racket - swinging speed is 50m / s.
[0188] The sampling frequency f = 2×v / r.
[0189] For example, when gradually accelerating from walking to running, such as during the transition from the highest walking speed to the lowest running speed, the highest walking speed is recorded, the time it takes to reach running mode is predicted, and the sampling method is switched in advance to save power while ensuring accurate sampling at high exercise speeds.
[0190] For easier understanding, please refer to Figure 11 .
[0191] This scenario embodiment can predict user behavior and take action in advance to protect the user before danger occurs.
[0192] When a user approaches an area at a certain speed, the system accurately calculates whether the user will make contact with the area. It predicts the location of the target object, assesses the potential danger, and then guides the target object to take appropriate action.
[0193] Low-frequency and high-frequency sampling are used in different scenarios to save power. After obtaining the initial sampling frequency f0, the sampling frequency fs is adjusted according to the position and / or speed of the target object to match the upcoming speed. If the predicted speed does not reach the corresponding sampling frequency level, the sampling frequency is not increased. In other words, the frequency fs is used to determine in advance whether a change is needed based on the position and / or speed of the target object, avoiding the need to maintain a very high sampling frequency all the time, which would consume more power. This achieves a good balance between accuracy and power saving.
[0194] The protection method provided in this application can be executed by a protection device. This application uses an example of a protection device executing the protection method to illustrate the protection device provided in this application.
[0195] like Figure 12 As shown, the protection device may include:
[0196] The first acquisition module 1201 is used to acquire the coordinates of a second surface point in a second spatial region at N times according to a target sampling frequency via a wireless signal. The second spatial region is the spatial region where the target object is located. The N times include a first time and a first target time, where the first target time is located before the first time and N is an integer greater than 1.
[0197] The first calculation module 1202 is used to calculate the first distance between the target object and the obstacle at the first time using the coordinates of the second surface point at the first time and the first coordinates.
[0198] The second calculation module 1203 is used to calculate the first motion velocity and the first motion acceleration of the target object at the first moment using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the first target moment.
[0199] The first prediction module 1204 is used to predict the first motion displacement of the target object at a preset future time using the first motion velocity and the first motion acceleration.
[0200] The execution module 1205 is used to perform a first operation when the first motion displacement is greater than or equal to the first distance, the first operation being used to control the target object to move away from the obstacle.
[0201] In some embodiments, the wearable device also pre-stores the second coordinates of a third surface point in a third spatial region, wherein the third spatial region is a warning space region for the obstacle;
[0202] The device further includes:
[0203] The third calculation module is used to calculate the first direction of motion of the target object at the first moment using the coordinates of the second surface point at the first moment;
[0204] The first determining module is used to compare the first coordinates, the second coordinates, and the coordinates of the second surface point at the first time to determine the first positional relationship between the target object and the first spatial region and the third spatial region at the first time.
[0205] The first prediction module is specifically used for:
[0206] When the first positional relationship is that the target object is located within the third spatial region and outside the first spatial region, and the first direction of movement points towards the obstacle, the displacement of the target object in a preset future time period is predicted using the first movement speed and the first movement acceleration.
[0207] In some embodiments, the apparatus further includes:
[0208] The first adjustment module is used to adjust the target sampling frequency by utilizing the distance between the target object and the obstacle; wherein the target sampling frequency is negatively correlated with the distance.
[0209] In some embodiments, the wearable device also pre-stores the second coordinates of a third surface point in a third spatial region, wherein the third spatial region is a warning space region for the obstacle;
[0210] The first acquisition module includes:
[0211] The first acquisition unit is used to acquire the coordinates of the second surface point at n1 times via wireless signal according to the first sampling frequency. The n1 times include the second time and the second target time, the second target time is located before the second time, and n1 is an integer greater than 1 and less than N.
[0212] The first calculation unit is used to calculate the second motion velocity, the second motion acceleration, and the second motion direction of the target object at the second time using the coordinates of the second surface point at the second time and the coordinates of the second target time.
[0213] The second calculation unit is used to calculate the second distance between the target object and the third spatial region at the second time using the coordinates of the second surface point at the second time and the second coordinates.
[0214] The first prediction unit is used to predict the second motion displacement of the target object during a first time period by using the second motion speed and the second motion acceleration when the second motion direction is pointing towards the obstacle.
[0215] The second acquisition unit is used to acquire the coordinates of the second surface point at n2 time points via wireless signal at a second sampling frequency when the second motion displacement is greater than or equal to the second distance, wherein the second sampling frequency is greater than the first sampling frequency, and n2 is an integer greater than 1 and less than N.
[0216] In some embodiments, the n2 times include a third time and a third target time, wherein the third target time is located before the third time; the apparatus further includes:
[0217] The second determining module is used to compare the second coordinates and the coordinates of the second surface point at the third time to determine the second positional relationship between the target object and the third spatial region at the third time.
[0218] The third calculation module is used to calculate the third direction of motion of the target object at the third time by using the coordinates of the second surface point at the third time and the coordinates of the target object at the third time, when the second positional relationship is that the target object is located in the third spatial region.
[0219] The second acquisition module is used to acquire the coordinates of the second surface point at time n3 by means of a wireless signal at a third sampling frequency when the third direction of movement is directed toward the obstacle, wherein the third sampling frequency is greater than the second sampling frequency and n3 is an integer greater than 1 and less than N.
[0220] In some embodiments, the apparatus further includes:
[0221] The second adjustment module is used to adjust the target sampling frequency according to the movement speed of the target object when it is determined that the target object is in an accelerated movement state; wherein the target sampling frequency is positively correlated with the movement speed.
[0222] In some embodiments, the second adjustment module includes:
[0223] The second calculation unit is used to calculate the third motion acceleration of the target object at the fourth time using the third motion velocity of the second surface point at the fourth time, wherein the fourth time is the sampling time corresponding to the fourth sampling frequency;
[0224] The second prediction unit is used to predict the fourth motion velocity of the target object at the fifth moment using the third motion velocity and the third motion acceleration, wherein the fifth moment is separated from the fourth moment by a second time interval.
[0225] An adjustment unit is used to adjust the fourth sampling frequency to a fifth sampling frequency, wherein the fifth sampling frequency is greater than the fourth sampling frequency, when the fourth motion speed is greater than a preset speed.
[0226] The protective device in this application embodiment can be a wearable device or a component within the wearable device, such as an integrated circuit or a chip. The wearable device can be a terminal or other devices besides a terminal.
[0227] The protection device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0228] The protection device provided in this application embodiment can realize the various processes implemented in the method embodiment, and will not be described again here to avoid repetition.
[0229] Optionally, such as Figure 13 As shown, this application embodiment also provides a wearable device 1300, including a processor 1301 and a memory 1302. The memory 1302 stores a program or instructions that can run on the processor 1301. When the program or instructions are executed by the processor 1301, they implement the various steps of the above protection method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0230] Figure 14 A hardware structure diagram for implementing a wearable device according to an embodiment of this application.
[0231] The wearable device 1400 includes, but is not limited to, components such as: radio frequency unit 1401, network module 1402, audio output unit 1403, input unit 1404, sensor 1405, display unit 1406, user input unit 1407, interface unit 1408, memory 1409, and processor 1410.
[0232] Those skilled in the art will understand that the wearable device 1400 may also include a power supply (such as a battery) for powering various components. The power supply may be logically connected to the processor 1410 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 14 The wearable device structure shown in the figure does not constitute a limitation on the wearable device. The wearable device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0233] The processor 1410 is used for:
[0234] According to the target sampling frequency, the coordinates of the second surface point in the second spatial region at N times are obtained through wireless signals. The second spatial region is the spatial region where the target object is located. The N times include the first time and the first target time. The first target time is located before the first time. N is an integer greater than 1.
[0235] Using the coordinates of the second surface point at the first moment and the first coordinate, the first distance between the target object and the obstacle at the first moment is calculated;
[0236] Using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the first target moment, the first velocity and the first acceleration of the target object at the first moment are calculated.
[0237] Using the first motion velocity and the first motion acceleration, predict the first motion displacement of the target object at a preset future time.
[0238] If the first motion displacement is greater than or equal to the first distance, a first operation is performed, the first operation being used to control the target object to move away from the obstacle.
[0239] In some embodiments, the wearable device also pre-stores the second coordinates of a third surface point in a third spatial region, wherein the third spatial region is a warning space region for the obstacle;
[0240] Processor 1410, used for:
[0241] Using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the target moment, the first direction of motion of the target object at the first moment is calculated;
[0242] By comparing the first coordinate, the second coordinate, and the coordinates of the second surface point at the first time, a first positional relationship between the target object and the first spatial region and the third spatial region at the first time is determined.
[0243] When the first positional relationship is that the target object is located within the third spatial region and outside the first spatial region, and the first direction of movement points towards the obstacle, the displacement of the target object in a preset future time period is predicted using the first movement speed and the first movement acceleration.
[0244] In some embodiments, the processor 1410 is configured to:
[0245] The target sampling frequency is adjusted using the distance between the target object and the obstacle; wherein the target sampling frequency is negatively correlated with the distance.
[0246] In some embodiments, the wearable device also pre-stores the second coordinates of a third surface point in a third spatial region, wherein the third spatial region is a warning space region for the obstacle;
[0247] Processor 1410, used for:
[0248] According to the first sampling frequency, the coordinates of the second surface point at n1 times are obtained through wireless signal. The n1 times include the second time and the second target time. The second target time is located before the second time. n1 is an integer greater than 1 and less than N.
[0249] Using the coordinates of the second surface point at the second time and the coordinates of the second target time, the second velocity, the second acceleration, and the second direction of motion of the target object at the second time are calculated.
[0250] Using the coordinates of the second surface point at the second time and the second coordinates, the second distance between the target object and the third spatial region at the second time is calculated;
[0251] When the second direction of motion is directed toward the obstacle, the second motion velocity and the second motion acceleration are used to predict the second motion displacement of the target object during a first time period;
[0252] When the second motion displacement is greater than or equal to the second distance, the coordinates of the second surface point at n2 time points are obtained by wireless signal according to the second sampling frequency, wherein the second sampling frequency is greater than the first sampling frequency, and n2 is an integer greater than 1 and less than N.
[0253] In some embodiments, the n2 moments include a third moment and a third target moment, wherein the third target moment is located before the third moment;
[0254] Processor 1410, used for:
[0255] By comparing the second coordinates and the coordinates of the second surface point at the third time, a second positional relationship between the target object and the third spatial region at the third time is determined;
[0256] When the target object is located within the third spatial region in the second positional relationship, the third direction of motion of the target object at the third time is calculated using the coordinates of the second surface point at the third time and the coordinates of the target object at the third time.
[0257] When the third direction of motion points to the obstacle, the coordinates of the second surface point at time n3 are obtained by wireless signal according to the third sampling frequency, wherein the third sampling frequency is greater than the second sampling frequency, and n3 is an integer greater than 1 and less than N.
[0258] In some embodiments, the processor 1410 is configured to:
[0259] When it is determined that the target object is in a state of accelerated motion, the target sampling frequency is adjusted according to the motion speed of the target object; wherein, the target sampling frequency is positively correlated with the motion speed.
[0260] In some embodiments, the processor 1410 is configured to:
[0261] Using the third motion velocity of the second surface point at the fourth time, the third motion acceleration of the target object at the fourth time is calculated, wherein the fourth time is the sampling time corresponding to the fourth sampling frequency;
[0262] Using the third motion velocity and the third motion acceleration, the fourth motion velocity of the target object at the fifth moment is predicted, and the fifth moment is separated from the fourth moment by a second time interval;
[0263] If the fourth motion speed is greater than the preset speed, the fourth sampling frequency is adjusted to the fifth sampling frequency using the third motion speed, and the fifth sampling frequency is greater than the fourth sampling frequency.
[0264] The wearable device provided in this application embodiment can implement the various processes implemented in the method embodiment, and will not be described again here to avoid repetition.
[0265] It should be understood that, in this embodiment, the input unit 1404 may include a graphics processing unit (GPU) 14041 and a microphone 14042. The GPU 14041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1406 may include a display panel 14061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1407 includes at least one of a touch panel 14071 and other input devices 14072. The touch panel 14071 is also called a touch screen. The touch panel 14071 may include a touch detection device and a touch controller. Other input devices 14072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0266] The memory 1409 can be used to store software programs and various data. The memory 1409 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1409 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1409 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0267] Processor 1410 may include one or more processing units; optionally, processor 1410 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 1410.
[0268] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described protection method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0269] The processor is the processor in the wearable device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0270] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above protection method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again.
[0271] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0272] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the protection method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0273] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0274] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0275] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A protection method applied to wearable devices, characterized in that, The wearable device is worn on the target object. The wearable device pre-stores the first coordinates of a first surface point in a first spatial region, which is the spatial region where the obstacle is located. The wearable device also pre-stores the second coordinates of a third surface point in a third spatial region, which is the warning spatial region for the obstacle. The method includes: According to the target sampling frequency, the coordinates of the second surface point in the second spatial region at N times are obtained through wireless signals. The second spatial region is the spatial region where the target object is located. The N times include the first time and the first target time. The first target time is located before the first time. N is an integer greater than 1. Using the coordinates of the second surface point at the first moment and the first coordinate, the first distance between the target object and the obstacle at the first moment is calculated; Using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the first target moment, the first velocity and the first acceleration of the target object at the first moment are calculated. Using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the target moment, the first direction of motion of the target object at the first moment is calculated; By comparing the first coordinate, the second coordinate, and the coordinates of the second surface point at the first time, a first positional relationship between the target object and the first spatial region and the third spatial region at the first time is determined. When the first positional relationship is that the target object is located within the third spatial region and outside the first spatial region, and the first direction of movement is pointing towards the obstacle, the first movement displacement of the target object in a preset future time period is predicted using the first movement speed and the first movement acceleration. If the first motion displacement is greater than or equal to the first distance, a first operation is performed, the first operation being used to control the target object to move away from the obstacle.
2. The method according to claim 1, characterized in that, The method further includes: The target sampling frequency is adjusted using the distance between the target object and the obstacle; wherein the target sampling frequency is negatively correlated with the distance.
3. The method according to claim 1, characterized in that, The step of obtaining the coordinates of the second surface point in the second spatial region at N time points via wireless signal according to the target sampling frequency includes: According to the first sampling frequency, the coordinates of the second surface point at n1 times are obtained through wireless signal. The n1 times include the second time and the second target time. The second target time is located before the second time. n1 is an integer greater than 1 and less than N. Using the coordinates of the second surface point at the second time and the coordinates of the second target time, the second velocity, the second acceleration, and the second direction of motion of the target object at the second time are calculated. When the second direction of motion is directed toward the obstacle, the second motion velocity and the second motion acceleration are used to predict the second motion displacement of the target object during a first time period; Using the coordinates of the second surface point at the second time and the second coordinates, the second distance between the target object and the third spatial region at the second time is calculated; When the second motion displacement is greater than or equal to the second distance, the coordinates of the second surface point at n2 time points are obtained by wireless signal according to the second sampling frequency, wherein the second sampling frequency is greater than the first sampling frequency, and n2 is an integer greater than 1 and less than N.
4. The method according to claim 3, characterized in that, The n2 time points include a third time point and a third target time point, wherein the third target time point is located before the third time point; After obtaining the coordinates of the second surface point at n2 time points via wireless signal according to the second sampling frequency, the method further includes: By comparing the second coordinates and the coordinates of the second surface point at the third time, a second positional relationship between the target object and the third spatial region at the third time is determined; When the target object is located within the third spatial region in the second positional relationship, the third direction of motion of the target object at the third time is calculated using the coordinates of the second surface point at the third time and the coordinates of the target object at the third time. When the third direction of motion points to the obstacle, the coordinates of the second surface point at time n3 are obtained by wireless signal according to the third sampling frequency, wherein the third sampling frequency is greater than the second sampling frequency, and n3 is an integer greater than 1 and less than N.
5. The method according to claim 1, characterized in that, The method further includes: When it is determined that the target object is in a state of accelerated motion, the target sampling frequency is adjusted according to the motion speed of the target object; wherein, the target sampling frequency is positively correlated with the motion speed.
6. The method according to claim 5, characterized in that, The step of adjusting the target sampling frequency according to the movement speed of the target object includes: Using the third motion velocity of the second surface point at the fourth time, the third motion acceleration of the target object at the fourth time is calculated, wherein the fourth time is the sampling time corresponding to the fourth sampling frequency; Using the third motion velocity and the third motion acceleration, the fourth motion velocity of the target object at the fifth moment is predicted, and the fifth moment is separated from the fourth moment by a second time interval; If the fourth motion speed is greater than the preset speed, the fourth sampling frequency is adjusted to the fifth sampling frequency using the third motion speed, and the fifth sampling frequency is greater than the fourth sampling frequency.
7. A protective device applied to wearable devices, characterized in that, The wearable device is worn on the target object. The wearable device pre-stores the first coordinates of a first surface point in a first spatial region, which is the spatial region where the obstacle is located. The wearable device also pre-stores the second coordinates of a third surface point in a third spatial region, which is the warning spatial region for the obstacle. The device includes: The first acquisition module is used to acquire the coordinates of a second surface point in a second spatial region at N times via wireless signal according to the target sampling frequency. The second spatial region is the spatial region where the target object is located. The N times include a first time and a first target time, where the first target time is located before the first time and N is an integer greater than 1. The first calculation module is used to calculate the first distance between the target object and the obstacle at the first time using the coordinates of the second surface point at the first time and the first coordinates. The second calculation module is used to calculate the first velocity and the first acceleration of the target object at the first moment using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the first target moment. The third calculation module is used to calculate the first direction of motion of the target object at the first moment using the coordinates of the second surface point at the first moment and the coordinates of the second surface point at the target moment. The first determining module is used to compare the first coordinates, the second coordinates, and the coordinates of the second surface point at the first time to determine the first positional relationship between the target object and the first spatial region and the third spatial region at the first time. The first prediction module is used to predict the first motion displacement of the target object in a preset future time period when the first positional relationship is that the target object is located in the third spatial region and outside the first spatial region, and the first motion direction is pointing towards the obstacle. An execution module is configured to perform a first operation when the first motion displacement is greater than or equal to the first distance, the first operation being configured to control the target object to move away from the obstacle.
8. A wearable device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the protection method as described in any one of claims 1 to 6.
9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the protection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Obstacle avoidance method, unmanned aerial vehicle and computer readable storage medium
CN114153232A