Data processing method and electronic device
By transforming and compensating for posture features in the world coordinate system, the types of device posture changes can be distinguished, thus solving the problem of false alarms in sitting posture detection caused by the camera coordinate system in the existing technology, and realizing accurate sitting posture detection and timely user reminders.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-19
AI Technical Summary
Existing posture detection solutions use the camera coordinate system as the only reference system, resulting in a high false alarm rate for poor posture.
By acquiring the device parameters of the electronic device, the processing mechanism is determined, and the type of posture change based on the image recognition object parameters is determined. This includes transforming and compensating posture features in the world coordinate system, distinguishing between the posture changes of the adapted device and changes from other factors, and then outputting the correct information.
It significantly improves the accuracy and reliability of sitting posture detection, avoids false alarms, and promptly reminds users to adjust their sitting posture.
Smart Images

Figure CN122244946A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method and an electronic device. Background Technology
[0002] Existing posture detection solutions typically use the camera coordinate system as the sole reference system, resulting in a relatively simple detection mechanism and a high false alarm rate for poor posture. Summary of the Invention
[0003] In view of the above, this application provides a data processing method and an electronic device, as follows:
[0004] A data processing method, comprising:
[0005] Obtain the device parameters of the electronic equipment;
[0006] In response to the device parameters characterizing the device posture of the electronic device satisfying the change conditions, a processing mechanism is determined, the processing mechanism being able to identify the posture change type of the object parameters based on the image;
[0007] Output is made based on the posture change type; wherein, the posture change type includes a first type of adaptation device posture change and a second type of change due to other factors.
[0008] In one possible implementation, the processing mechanism includes:
[0009] A first processing mechanism is determined, which can compensate for the first pose feature of the object parameter based on the image and the device parameters of the electronic device, and determine the pose change type of the object parameter based on the relationship between the first pose feature and the reference feature threshold.
[0010] In one possible implementation, based on the image and the device parameters of the electronic device, a first pose feature of the object parameters is obtained through compensation, including:
[0011] Based on the image and the device parameters, a pose group is determined, which includes the device pose of the electronic device in the world coordinate system, the camera pose of the camera in the device coordinate system, and the head pose of the target user in the camera coordinate system.
[0012] Based on the posture set, determine the head posture of the target user in the world coordinate system;
[0013] Based on the device pose of the electronic device in the world coordinate system and the normal vector of the screen normal in the device coordinate system, the normal vector of the screen normal in the world coordinate system is determined.
[0014] Based on the target user's head posture in the world coordinate system and the target user's gaze vector in the head coordinate system, the gaze vector in the world coordinate system is determined.
[0015] Based on the screen normal vector in the world coordinate system and the line of sight vector in the world coordinate system, the first true deviation between the line of sight and the screen normal is determined.
[0016] Based on the device parameters, calculate the first angle compensation;
[0017] Calculate the absolute value of the difference between the first true deviation and the first angle compensation to obtain the compensated first attitude feature.
[0018] In one possible implementation, calculating the first angle compensation based on the device parameters includes:
[0019] The first angle compensation is obtained by weighted summation of the screen tilt angle, device tilt angle, and hinge rotation angle;
[0020] The device parameters include screen tilt angle, device tilt angle, and shaft rotation angle.
[0021] In one possible implementation, the pose change type of the object parameters is determined based on the relationship between the first pose feature and the reference feature threshold, including:
[0022] The first posture feature is compared with the reference feature threshold to determine whether the first posture feature is within the feature range corresponding to the reference feature threshold;
[0023] If so, then the posture change type is determined to be the first type.
[0024] In one possible implementation, the processing mechanism includes:
[0025] A second processing mechanism is determined, which can determine a dynamic feature threshold based on the device parameters, determine a second pose feature of the object parameter based on the image, and determine the pose change type of the object parameter based on the relationship between the second pose feature and the dynamic feature threshold.
[0026] In one possible implementation, determining the dynamic feature threshold based on the device parameters includes:
[0027] Based on the threshold comparison relationship, the feature threshold for the device parameter adaptation is determined to obtain the dynamic feature threshold. The threshold comparison relationship is used to record the adaptation relationship between different device parameters and feature thresholds.
[0028] In one possible implementation, determining the pose change type of the object parameters based on the relationship between the second pose feature and the dynamic feature threshold includes:
[0029] The second posture feature is compared with the dynamic feature threshold to determine whether the second posture feature is within the feature range corresponding to the dynamic feature threshold;
[0030] If so, then the attitude change type is determined to be the first type;
[0031] If not, then the attitude change type is determined to be the second type.
[0032] In one possible implementation, the processing mechanism can also adjust the feature threshold based on the real-time operating scenario of the electronic device before determining the relationship between the attitude features and the feature threshold.
[0033] An electronic device includes: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the data processing method described above: obtaining device parameters of the electronic device; determining a processing mechanism in response to the device parameters indicating that the device posture of the electronic device meets a change condition, the processing mechanism being capable of recognizing the posture change type of object parameters based on an image; and outputting based on the posture change type; wherein the posture change type includes a first type adapting to device posture changes and a second type adapting to changes in other factors.
[0034] As can be seen from the above technical solutions, the present application provides a data processing method and an electronic device. The data processing method includes obtaining device parameters of the electronic device; in response to the device parameters indicating that the device posture of the electronic device meets the change conditions, determining a processing mechanism, wherein the processing mechanism can identify the posture change type of the object parameters based on the image; and outputting based on the posture change type; wherein the posture change type includes a first type that adapts to the device posture change and a second type that adapts to changes in other factors. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application;
[0037] Figure 2A flowchart illustrating another data processing method provided in an embodiment of this application;
[0038] Figure 3 A flowchart illustrating another data processing method provided in an embodiment of this application;
[0039] Figure 4 A flowchart illustrating another data processing method provided in an embodiment of this application;
[0040] Figure 5a This is a schematic diagram illustrating a scenario for determining the type of posture change provided in an embodiment of this application.
[0041] Figure 5b This is a schematic diagram illustrating another scenario for determining a type of posture change provided in an embodiment of this application.
[0042] Figure 6 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;
[0043] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] This application provides a data processing method and an electronic device, aimed at improving detection accuracy. The data processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0046] Reference Figure 1 , Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this application, as shown below. Figure 1 As shown, this method includes steps 101 to 103, as follows:
[0047] Step 101: Obtain the device parameters of the electronic device.
[0048] In this embodiment, the device parameters are used to characterize the current physical state of the electronic device and may include at least one of the following: the attitude information of the device body (such as screen pitch angle, device tilt angle, and hinge rotation angle), the opening angle of the screen relative to the device body, and the installation parameters of the camera. Optionally, the device parameters can be obtained through sensors built into the electronic device, such as obtaining the attitude of the device body relative to the world coordinate system through an inertial measurement unit (IMU) and obtaining the opening angle of the screen through a hinge angle sensor.
[0049] It should be noted that electronic devices can be devices with built-in screens and cameras (such as laptops and tablets), or devices without built-in screens or cameras (such as host computers and computing units). When an electronic device does not have a built-in camera, it can use an externally connected camera (such as an external USB camera or webcam) to capture images. When an electronic device does not have a built-in screen, it can connect to an external display device for output. This application does not limit this.
[0050] Step 102: In response to the device parameters characterizing the device posture of the electronic device meeting the change conditions, determine the processing mechanism, which can identify the posture change type of the object parameters based on the image.
[0051] In this embodiment, the device posture is determined to meet the change conditions based on the acquired device parameters. Optionally, the change conditions include at least one of the following: screen tilt angle, device tilt angle, and hinge rotation angle. The angle change must be greater than the corresponding numerical threshold and the duration threshold. For example, when a screen opening / closing angle change exceeding 5 degrees and lasting for more than 0.5 seconds is detected, the device posture is determined to meet the change conditions. By setting angle change thresholds and duration thresholds, false triggering due to momentary jitter or measurement noise can be avoided, ensuring that the corresponding processing mechanism is only activated when a substantial change in device posture occurs.
[0052] In this embodiment, when the device posture meets the change condition, it indicates that the current camera reference frame may have changed. At this time, a processing mechanism is determined. This mechanism can identify the posture change type based on the acquired image object parameters (such as the user's head posture, gaze direction, etc.). The posture change types include a first type and a second type. The first type represents changes in object parameters that are adapted to changes in device posture, i.e., the user reasonably adjusts their posture to follow the device. The second type represents changes in object parameters caused by other factors, such as the user's actual poor sitting posture or gaze deviation. Based on different types, the processing mechanism can determine whether to trigger a health reminder or posture alarm.
[0053] Step 103: Output based on attitude change type.
[0054] In this embodiment, the posture change type includes a first type of adaptation device posture change and a second type of change due to other factors.
[0055] In this embodiment, the corresponding output is made according to the identified posture change type. Specifically, if the posture change type is the first type, it indicates that the user's posture change is reasonably adapted to the device's posture change, and no alarm is triggered to avoid false alarms; if the posture change type is the second type, it indicates that the user has a real poor posture or deviated line of sight, and the electronic device outputs a reminder message, such as reminding the user to adjust their sitting posture through screen pop-ups, voice prompts, etc.
[0056] As can be seen from the above technical solutions, the data processing method provided in this application obtains the device parameters of an electronic device, determines a processing mechanism that can identify the type of posture change based on images when the device posture meets the change conditions, and outputs corresponding results based on the identified posture change type. By distinguishing between the first type of device posture change and the second type caused by other factors, the user's true posture can be accurately identified, thereby significantly improving the accuracy and reliability of posture detection and enhancing the user experience. Specifically, it can avoid false alarms when the device posture changes and provide timely reminders when there is a real risk to the user.
[0057] In one optional embodiment, determining the processing mechanism includes: determining a first processing mechanism, which is capable of compensating for a first pose feature of the object parameter based on the image and the device parameters of the electronic device, and determining the pose change type of the object parameter based on the relationship between the first pose feature and a reference feature threshold. Specifically, the first processing mechanism eliminates the influence of device pose changes on the human pose detection result through a compensation algorithm, obtains the compensated first pose feature, and then compares it with the reference feature threshold to accurately determine the pose change type.
[0058] Based on the above embodiments, Figure 2 This is a flowchart illustrating another data processing method provided in an embodiment of this application. Figure 2 This illustrates the specific implementation flow of the first processing mechanism, which compensates for the first pose features of the object parameters based on the image and the device parameters of the electronic device. Figure 2 As shown, this method specifically includes:
[0059] Step 201: Determine the attitude group based on the image and device parameters.
[0060] In this embodiment, the attitude group includes the device attitude of the electronic device in the world coordinate system, the camera attitude of the camera in the device coordinate system, and the head attitude of the target user in the camera coordinate system.
[0061] In this embodiment, the device attitude of the electronic device in the world coordinate system can be obtained by the inertial measurement unit (IMU). The world coordinate system is established with the direction of gravity as the reference. The camera attitude in the device coordinate system can be calculated by the camera's installation parameters and the screen opening angle obtained by the rotation angle sensor. The head attitude of the target user in the camera coordinate system can be estimated by estimating the head attitude of the image captured by the camera. For example, a deep neural network can be used to infer the user's facial image and output the rotation attitude of the head relative to the camera.
[0062] Step 202: Based on the pose group, determine the head pose of the target user in the world coordinate system.
[0063] In this embodiment, the target user's head pose is transformed from the camera coordinate system to the world coordinate system through coordinate transformation.
[0064] Specifically, we obtain the first rotation matrix R_device→world, the second rotation matrix R_cam→device, and the third rotation matrix R_head→cam. The first rotation matrix represents the attitude transformation of the electronic device from the device coordinate system to the world coordinate system, the second rotation matrix represents the attitude transformation of the camera from the camera coordinate system to the device coordinate system, and the third rotation matrix represents the attitude transformation of the target user's head from the head coordinate system to the camera coordinate system. Multiplying the first, second, and third rotation matrices yields the fourth rotation matrix R_head→world. The formula for calculating the attitude transformation of the target user's head from the head coordinate system to the world coordinate system using the fourth rotation matrix is as follows:
[0065] .
[0066] Step 203: Based on the device pose of the electronic device in the world coordinate system and the normal vector of the screen normal in the device coordinate system, determine the normal vector of the screen normal in the world coordinate system.
[0067] In this embodiment, the device pose of the electronic device in the world coordinate system is obtained, which is the rotation matrix R_device→world, and the screen normal vector N_screen→device in the device coordinate system is predetermined according to the screen's geometric dimensions and installation method. Furthermore, the screen normal vector N_screen→world in the world coordinate system is obtained through the multiplication operation of the rotation matrix and the normal vector, thereby transforming the screen normal from the device coordinate system to the world coordinate system. The calculation formula is as follows:
[0068] N_screen→world = R_device→world×N_screen→device.
[0069] Step 204: Based on the target user's head pose in the world coordinate system and the target user's gaze vector in the head coordinate system, determine the gaze vector in the world coordinate system.
[0070] In this embodiment, after obtaining the target user's head pose in the world coordinate system and the user's gaze vector in the head coordinate system, the gaze vector V_gaze→world in the world coordinate system is obtained by multiplying the rotation matrix R_head→world with the gaze vector V_gaze→head. This transforms the user's gaze from the head coordinate system to the world coordinate system. The calculation formula is as follows:
[0071] V_gaze→world = R_head→world×V_gaze→head.
[0072] Step 205: Based on the screen normal vector in the world coordinate system and the view vector in the world coordinate system, determine the first true deviation between the view and the screen normal.
[0073] In one optional embodiment, the specific method for determining the first true deviation between the viewpoint and the screen normal is as follows: calculate the dot product of the viewpoint vector V_gaze→world in the world coordinate system and the screen normal vector N_screen→world in the world coordinate system, divide by the product of their magnitudes, and then take the inverse cosine value to obtain the angle θ between the viewpoint and the screen normal. This angle is the first true deviation, and the calculation formula is as follows:
[0074] θ = arccos((V_gaze→world × N_screen→world) / (|V_gaze→world| × |N_screen→world|)).
[0075] Step 206: Calculate the first angle compensation based on the equipment parameters.
[0076] In this embodiment, a first angle compensation is calculated based on device parameters to offset the impact of screen rotation on the line of sight and the judgment of screen relationship.
[0077] In one optional embodiment, the first processing mechanism calculates the first angle compensation based on device parameters by performing a weighted summation operation on the screen pitch angle, device tilt angle, and hinge rotation angle to obtain the first angle compensation. The device parameters include screen tilt angle, device tilt angle, and hinge rotation angle. Different weighting coefficients can be pre-calibrated based on the device form factor and application scenario. The calculation formula is as follows:
[0078] ;
[0079] in, Indicates the screen tilt angle. Indicates the tilt angle of the equipment. Indicates the rotation angle of the shaft. , , The weights are respectively the screen tilt angle, device tilt angle, and hinge rotation angle.
[0080] Step 207: Calculate the absolute value of the difference between the first true deviation and the first angle compensation to obtain the first attitude feature after compensation.
[0081] In this embodiment, the first posture feature is obtained by calculating the absolute value of the difference between the first true deviation and the first angle compensation. This eliminates the influence of screen rotation on the judgment of the line of sight and screen relationship, and can more accurately reflect whether the user is adjusting their line of sight with the screen within a reasonable range. The calculation formula is as follows:
[0082] .
[0083] As can be seen from the above technical solution, the embodiments of this application, through the first processing mechanism, compensate for the first pose feature of the object parameters based on the image and the device parameters of the electronic device. By transforming the user's head pose from the camera coordinate system to the world coordinate system, and unifying the screen normal and the user's line of sight in the world coordinate system to calculate the true deviation, and then eliminating the influence of screen rotation through angle compensation, the first pose feature reflecting the user's true pose is obtained. The first processing mechanism effectively decouples the device pose change from the user's true pose change, so that subsequent pose determination no longer depends on the unstable camera coordinate system, but uses the world coordinate system based on gravity as a unified reference, solving the false alarm problem caused by device pose change and significantly improving the accuracy of pose detection.
[0084] Based on the above embodiments, Figure 3 This is a flowchart illustrating another data processing method provided in an embodiment of this application. Figure 3 The document illustrates a specific implementation process for determining the pose change type of object parameters based on the relationship between the first pose feature and the reference feature threshold. Figure 3 As shown, this method specifically includes:
[0085] Step 301: Compare the first pose feature with the reference feature threshold to determine whether the first pose feature is within the feature range corresponding to the reference feature threshold.
[0086] In this embodiment, when comparing the first posture feature with the reference feature threshold, the reference feature threshold can be preset according to the standard range of a healthy sitting posture, such as the head pitch angle threshold, the line of sight and screen deviation threshold, etc.
[0087] In this embodiment, if the first posture feature is not greater than the corresponding reference feature threshold, it is determined that the first posture feature is within the feature range corresponding to the reference feature threshold.
[0088] Step 302: If yes, then determine the attitude change type as the first type.
[0089] In this embodiment, if the first posture feature is within the feature range corresponding to the baseline feature threshold, it indicates that the user's posture meets the health standard after compensation, and the posture change type is determined to be the first type. The first type represents a change in the object parameters that is generated to adapt to changes in device posture; that is, the user reasonably follows the device to adjust their posture, and no alarm should be triggered.
[0090] In summary, the first processing mechanism transforms the user's head posture and gaze direction from the camera coordinate system to the world coordinate system, calculates the actual deviation between the gaze and the screen based on the screen normal, eliminates the influence of screen rotation through angle compensation, and finally compares the compensated first posture feature with a baseline feature threshold to accurately identify the type of posture change. When the compensated first posture feature is within the feature range, the posture change type is determined to be Type I, meaning the user is reasonably adjusting their posture to follow the device. This solves the false alarm problem caused by device posture changes and improves the accuracy of posture detection.
[0091] In one optional embodiment, the determination of the processing mechanism includes: determining a second processing mechanism, which is capable of determining a dynamic feature threshold based on device parameters, determining a second pose feature of the object parameters based on an image, and determining the pose change type of the object parameters based on the relationship between the second pose feature and the dynamic feature threshold. The second pose feature is directly determined based on images captured by a camera. For example, by estimating the head pose of a user image captured by a camera, the pitch angle, roll angle, and yaw angle of the head relative to the camera coordinate system are directly output. Furthermore, by calculating the gaze direction from key eye points in the image, the gaze vector relative to the camera coordinate system is directly output. It is understood that the method for obtaining the second pose feature does not involve coordinate transformation or angle compensation. Furthermore, the dynamic feature threshold is dynamically adjusted according to the device pose to adapt to the judgment requirements under different device configurations.
[0092] Furthermore, the specific implementation method of the first processing mechanism for determining the dynamic feature threshold based on the equipment parameters includes: determining the feature threshold adapted to the equipment parameters based on the threshold comparison relationship to obtain the dynamic feature threshold, wherein the threshold comparison relationship is used to record the adaptation relationship between different equipment parameters and feature thresholds.
[0093] In this embodiment, the threshold comparison relationship can be established by pre-collecting healthy and unhealthy sitting posture images under different device postures, directly calculating the line-of-sight angle based on the images captured by the camera, and combining this with health assessment criteria to establish a mapping relationship between device posture and feature thresholds. It should be noted that the threshold comparison relationship can be set by the user according to their personal usage habits, or it can be pre-calibrated by the software developer and synchronized to all users through updates. During actual device operation, the device can match the corresponding dynamic feature threshold from the threshold comparison relationship based on the current device parameters.
[0094] Based on the above embodiments, Figure 4 This is a flowchart illustrating another data processing method provided in an embodiment of this application. Figure 4 This illustrates the specific implementation flow of the first processing mechanism, which determines the pose change type of object parameters based on the relationship between the second pose feature and the dynamic feature threshold. Figure 4 As shown, this method specifically includes:
[0095] Step 401: Compare the second pose feature with the dynamic feature threshold to determine whether the second pose feature is within the feature range corresponding to the dynamic feature threshold.
[0096] In this embodiment, after obtaining the second pose feature directly determined from the image captured by the camera, and the dynamic feature threshold obtained by matching from the threshold comparison relationship based on the current device parameters, the second pose feature is compared with the dynamic feature threshold to determine whether the second pose feature is not greater than the dynamic feature threshold, that is, whether it is within the feature range corresponding to the dynamic feature threshold.
[0097] Step 402: If yes, then determine the attitude change type as the first type.
[0098] In this embodiment, if the second posture feature is within the feature range corresponding to the dynamic feature threshold, it indicates that the user's current posture meets the health standard, and the posture change type is determined to be the first type. The first type represents a change in the object parameter that is generated by adapting to the device's posture change, that is, the user's posture is within an acceptable range and should not trigger an alarm.
[0099] Step 403: If not, then determine the attitude change type as the second type.
[0100] In this embodiment, if the second posture feature is not within the feature range corresponding to the dynamic feature threshold, it indicates that the user's current posture exceeds the health standard and there is a real risk of poor posture or line of sight deviation. At this time, the posture change type is determined to be the second type, and an alarm needs to be triggered to remind the user to adjust their sitting posture.
[0101] In summary, the data processing method provided in this application embodiment directly determines the second posture feature based on the image captured by the camera, and matches a dynamic feature threshold from a threshold comparison relationship according to the current device posture. The second posture feature is compared with the dynamic feature threshold, and the posture change type is determined based on the comparison result. This second processing mechanism achieves dynamic adaptation of posture determination standards under different device forms by pre-establishing a mapping relationship between device posture and feature thresholds, improving computational efficiency while reducing false alarms caused by changes in device posture.
[0102] As can be seen from the above technical solutions, both the first and second processing mechanisms are used to distinguish whether the user's posture change is adapted to the device posture change or a real poor posture caused by other factors when the device posture meets the change conditions. This solves the problem of false alarms caused by device posture changes. The first processing mechanism transforms the user posture into the world coordinate system for judgment through coordinate transformation and angle compensation, while the second processing mechanism makes a judgment directly in the camera coordinate system by dynamically adjusting the feature threshold.
[0103] Taking the device's posture change as an example, when the screen rotates forward, Figure 5a This is a schematic diagram of a scenario for determining the type of posture change provided in an embodiment of this application. Figure 5a In the first scenario shown, the screen rotates forward, and the person leans forward accordingly:
[0104] The first processing mechanism can obtain the compensated first posture feature, that is, the angle θ' between the line of sight and the screen normal after the first angle compensation. Since the user tilts forward with the screen, the compensated first posture feature θ' is within the healthy range. Therefore, the first processing mechanism determines that it is the first type and does not trigger an alarm.
[0105] The second processing mechanism determines the head pitch angle observed in the camera coordinate system and then matches a corresponding relaxed dynamic feature threshold from a threshold comparison relationship based on the current device posture (screen tilted forward). This ensures that even with the screen tilted forward, a larger head pitch angle is still considered within the healthy range. Therefore, the second processing mechanism classifies it as Type 1 and does not trigger an alarm.
[0106] exist Figure 5a The screen shown rotates forward, but the person does not follow; instead, they are in a second scenario where they are in a truly unhealthy posture.
[0107] The first processing mechanism obtains the compensated first posture feature, i.e., the angle θ' between the user's line of sight and the screen normal after the first angle compensation. Since the user is in a truly poor posture, the actual angle θ between the user's line of sight and the screen normal increases, and the compensated first posture feature θ' exceeds the threshold. Therefore, the first processing mechanism determines it to be the second type and triggers an alarm.
[0108] The second processing mechanism: Since the user is in a real poor posture, the relative angle between the line of sight and the screen will still exceed the dynamic feature threshold. Therefore, the second posture feature exceeds the dynamic feature threshold, is judged as the second type, and triggers an alarm.
[0109] Taking the overall tilt of the equipment (such as the rotation of the machine body) as an example, Figure 5b This is a schematic diagram illustrating another scenario for determining the type of posture change provided in an embodiment of this application. Figure 5b The scene shown depicts the aircraft rotating, with the person turning their head accordingly:
[0110] First processing mechanism: After the device tilts, the user adjusts their head and line of sight reasonably to keep their gaze basically aligned with the screen. At this time, although the device posture has changed, the angle between the vector N_screen→world of the screen normal in the world coordinate system and the vector V_gaze→world of the line of sight in the world coordinate system is still small, and the actual deviation θ is small. At the same time, the overall tilt angle of the device is included in the first angle compensation, and the compensated first posture feature θ' is within the healthy range. Therefore, the first processing mechanism determines it to be the first type and does not trigger an alarm.
[0111] The second processing mechanism: After the device tilts as a whole, the user makes reasonable adjustments accordingly. The head yaw or roll angle observed in the camera coordinate system may exceed the normal threshold. However, the second processing mechanism matches the corresponding dynamic feature threshold from the threshold comparison relationship based on the current device posture (overall tilt state). This ensures that a reasonable head-following posture is still considered within the healthy range even when the device is tilted. Therefore, the second processing mechanism classifies it as Type 1 and does not trigger an alarm.
[0112] It should be noted that the selection of the first processing mechanism and the second processing mechanism can be pre-configured. For example, it can be fixed at the factory based on the device's hardware capabilities, or it can be dynamically selected based on the device's capabilities. For example, the first processing mechanism can be enabled when the device has an IMU and a hinge sensor, and the second processing mechanism can be enabled when it only has a camera.
[0113] Furthermore, the processing mechanism can adjust the feature threshold based on the real-time operating scenario of the electronic device before determining the relationship between posture features and feature thresholds.
[0114] The identification of real-time operating scenarios can be determined based on scenario identifiers, which can be updated according to changes in device parameters and / or running applications. For example, when device parameters indicate that the electronic device has switched to tent mode, it means that the current scenario is an office scenario, and the scenario identifier is updated to the first mode, i.e., work mode; when it is detected that the user is running a video playback application, it means that the current scenario is an entertainment scenario, and the scenario identifier is updated to the second mode, i.e., entertainment mode.
[0115] Based on this, in a data processing method provided in this application embodiment, before determining the relationship between the first posture feature and the reference feature threshold, the first processing mechanism can select a matching reference feature threshold according to the current operating scenario. For example, in working mode, the reference feature threshold is set to a relatively strict 15 degrees, while in entertainment mode, the reference threshold is adjusted to a more lenient 30 degrees, allowing users to have a more relaxed posture when watching videos. By dynamically adjusting the reference threshold according to the operating scenario, the first processing mechanism can further adapt to the differentiated needs of users in different scenarios while maintaining the advantage of coordinate decoupling, avoiding unnecessary alarm interference caused by overly strict thresholds in entertainment scenarios.
[0116] Before determining the relationship between the second pose feature and the dynamic feature threshold, the second processing mechanism can adjust the dynamic threshold (increase or decrease it) according to the current operating scenario. Specifically, after matching the dynamic feature threshold from the threshold comparison relationship, the threshold is adjusted according to the current scenario identifier: if it is a working mode, the dynamic feature threshold is decreased; if it is an entertainment mode, the dynamic feature threshold is increased. Thus, by introducing scenario adaptive correction, the second processing mechanism can achieve personalized adaptation to different user scenarios without coordinate transformation, improving the rationality of pose determination and user experience.
[0117] In summary, this application's embodiments introduce a feature threshold adjustment mechanism based on real-time operating scenarios, enabling the posture judgment standard to dynamically change with the user's usage scenario. It can adaptively adjust according to different scenarios such as work and entertainment, urging users to maintain a healthy sitting posture in scenarios requiring strict posture constraints, and avoiding unnecessary interference in scenarios that allow relaxation. Thus, while ensuring the effectiveness of health monitoring, it significantly improves the user experience.
[0118] This application also provides a data processing apparatus, for reference... Figure 6 , Figure 6 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application, as shown below. Figure 6 As shown, the data processing device 600 includes:
[0119] The device parameter detection unit 601 is used to obtain the device parameters of the electronic equipment.
[0120] The processing mechanism determination unit 602 is used to determine a processing mechanism in response to the device parameters characterizing the device posture of the electronic device meeting the change conditions. The processing mechanism can identify the posture change type of the object parameters based on the image.
[0121] The attitude determination unit 603 is used to output based on the attitude change type; wherein the attitude change type includes a first type of attitude change of the adapting device or a second type of change of other factors.
[0122] Optionally, when determining the processing mechanism, the processing mechanism determining unit is specifically used for:
[0123] A first processing mechanism is determined, which can compensate for the first pose feature of the object parameter based on the image and the device parameters of the electronic device, and determine the pose change type of the object parameter based on the relationship between the first pose feature and the reference feature threshold.
[0124] Optionally, when the first processing mechanism obtains the first pose feature of the object parameters based on the image and the device parameters of the electronic device, it is specifically used for:
[0125] Based on the image and the device parameters, a pose group is determined, which includes the device pose of the electronic device in the world coordinate system, the camera pose of the camera in the device coordinate system, and the head pose of the target user in the camera coordinate system.
[0126] Based on the posture set, determine the head posture of the target user in the world coordinate system;
[0127] Based on the device pose of the electronic device in the world coordinate system and the normal vector of the screen normal in the device coordinate system, the normal vector of the screen normal in the world coordinate system is determined.
[0128] Based on the target user's head posture in the world coordinate system and the target user's gaze vector in the head coordinate system, the gaze vector in the world coordinate system is determined.
[0129] Based on the screen normal vector in the world coordinate system and the line of sight vector in the world coordinate system, the first true deviation between the line of sight and the screen normal is determined.
[0130] Based on the device parameters, calculate the first angle compensation;
[0131] Calculate the absolute value of the difference between the first true deviation and the first angle compensation to obtain the compensated first attitude feature.
[0132] Optionally, when the first processing mechanism calculates the first angle compensation based on the device parameters, it is specifically used for:
[0133] The first angle compensation is obtained by weighted summation of the screen tilt angle, device tilt angle, and hinge rotation angle;
[0134] The device parameters include screen tilt angle, device tilt angle, and shaft rotation angle.
[0135] Optionally, when the first processing mechanism determines the pose change type of the object parameters based on the relationship between the first pose feature and the reference feature threshold, it is specifically used for:
[0136] The first posture feature is compared with the reference feature threshold to determine whether the first posture feature is within the feature range corresponding to the reference feature threshold;
[0137] If so, then the posture change type is determined to be the first type.
[0138] Optionally, when determining the processing mechanism, the processing mechanism determining unit is specifically used for:
[0139] A second processing mechanism is determined, which can determine a dynamic feature threshold based on the device parameters, determine a second pose feature of the object parameter based on the image, and determine the pose change type of the object parameter based on the relationship between the second pose feature and the dynamic feature threshold.
[0140] Optionally, when the second processing mechanism is used to determine the dynamic feature threshold based on the device parameters, it is specifically used to: determine the feature threshold adapted to the device parameters based on the threshold comparison relationship, and obtain the dynamic feature threshold, wherein the threshold comparison relationship is used to record the adaptation relationship between different device parameters and feature thresholds.
[0141] Optionally, when the second processing mechanism is used to determine the posture change type of the object parameter based on the relationship between the second posture feature and the dynamic feature threshold, it is specifically used to: compare the second posture feature and the dynamic feature threshold to determine whether the second posture feature is within the feature range corresponding to the dynamic feature threshold; if yes, then determine the posture change type as the first type; if no, then determine the posture change type as the second type.
[0142] Optionally, the processing mechanism can also adjust the feature threshold based on the real-time operating scenario of the electronic device before determining the relationship between the attitude features and the feature threshold.
[0143] This application embodiment also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the following data processing method:
[0144] Obtain device parameters of an electronic device; in response to the device parameters indicating that the device posture of the electronic device meets the change conditions, determine a processing mechanism, the processing mechanism being able to identify the posture change type of the object parameters based on the image; output based on the posture change type; wherein, the posture change type includes a first type adapting to the device posture change and a second type of other factor changes.
[0145] It should be noted that the specific implementation of the data processing method can be found in the above embodiments.
[0146] refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic devices in the embodiments of this application may include, but are not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0147] like Figure 7 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. When the electronic device is powered on, the RAM 703 also stores various programs and data required for the operation of the electronic device. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0148] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, memory cards, hard drives, etc.; and communication devices 709. Communication device 709 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0149] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement the various steps of any data processing method provided in this application.
[0150] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the various steps of any of the data processing methods provided in this application.
[0151] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0152] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred 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 software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0153] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0154] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0155] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0156] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0157] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0158] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not 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 data processing method, comprising: Obtain the device parameters of the electronic equipment; In response to the device parameters characterizing the device posture of the electronic device satisfying the change conditions, a processing mechanism is determined, the processing mechanism being able to identify the posture change type of the object parameters based on the image; Output is made based on the posture change type; wherein, the posture change type includes a first type of adaptation device posture change and a second type of change due to other factors.
2. The data processing method according to claim 1, wherein the determining processing mechanism includes: A first processing mechanism is determined, which can compensate for the first pose feature of the object parameter based on the image and the device parameters of the electronic device, and determine the pose change type of the object parameter based on the relationship between the first pose feature and the reference feature threshold.
3. The data processing method according to claim 2, wherein the step of compensating for the first pose feature of the object parameter based on the image and the device parameters of the electronic device includes: Based on the image and the device parameters, a pose group is determined, which includes the device pose of the electronic device in the world coordinate system, the camera pose of the camera in the device coordinate system, and the head pose of the target user in the camera coordinate system. Based on the posture set, determine the head posture of the target user in the world coordinate system; Based on the device pose of the electronic device in the world coordinate system and the normal vector of the screen normal in the device coordinate system, the normal vector of the screen normal in the world coordinate system is determined. Based on the target user's head posture in the world coordinate system and the target user's gaze vector in the head coordinate system, the gaze vector in the world coordinate system is determined. Based on the screen normal vector in the world coordinate system and the line of sight vector in the world coordinate system, the first true deviation between the line of sight and the screen normal is determined. Based on the device parameters, calculate the first angle compensation; Calculate the absolute value of the difference between the first true deviation and the first angle compensation to obtain the compensated first attitude feature.
4. The data processing method according to claim 3, wherein calculating the first angle compensation based on the device parameters includes: The first angle compensation is obtained by weighted summation of the screen tilt angle, device tilt angle, and hinge rotation angle; The device parameters include screen tilt angle, device tilt angle, and shaft rotation angle.
5. The data processing method according to claim 2, wherein determining the pose change type of the object parameters based on the relationship between the first pose feature and the reference feature threshold includes: The first posture feature is compared with the reference feature threshold to determine whether the first posture feature is within the feature range corresponding to the reference feature threshold; If so, then the posture change type is determined to be the first type.
6. The data processing method according to claim 1, wherein the determining processing mechanism includes: A second processing mechanism is determined, which can determine a dynamic feature threshold based on the device parameters, determine a second pose feature of the object parameter based on the image, and determine the pose change type of the object parameter based on the relationship between the second pose feature and the dynamic feature threshold.
7. The data processing method according to claim 6, wherein determining the dynamic feature threshold based on the device parameters includes: Based on the threshold comparison relationship, the feature threshold for the device parameter adaptation is determined to obtain the dynamic feature threshold. The threshold comparison relationship is used to record the adaptation relationship between different device parameters and feature thresholds.
8. The data processing method according to claim 6, determining the pose change type of the object parameters based on the relationship between the second pose feature and the dynamic feature threshold, includes: The second posture feature is compared with the dynamic feature threshold to determine whether the second posture feature is within the feature range corresponding to the dynamic feature threshold; If so, then the attitude change type is determined to be the first type; If not, then the attitude change type is determined to be the second type.
9. The data processing method according to claim 2 or 6, wherein the processing mechanism is further capable of adjusting the feature threshold based on the real-time operating scenario of the electronic device before determining the relationship between the attitude features and the feature threshold.
10. An electronic device comprising: A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to perform: Obtain the device parameters of the electronic equipment; In response to the device parameters characterizing the device posture of the electronic device satisfying the change conditions, a processing mechanism is determined, the processing mechanism being able to identify the posture change type of the object parameters based on the image; Output is made based on the posture change type; wherein, the posture change type includes a first type of adaptation device posture change and a second type of change due to other factors.