Operating system switching method, electronic equipment and storage medium
By automatically determining the focus of the gaze using the front-facing camera and eye-tracking algorithms, the problem of cumbersome operating system switching is solved, achieving efficient switching without manual operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2026-03-31
AI Technical Summary
The operating system switching process is cumbersome, resulting in low switching efficiency.
The system captures the user's facial image using the front-facing camera of the terminal device, uses an eye-tracking algorithm to identify the focus of the gaze, and automatically determines whether to switch operating systems based on user habits.
Switching between operating systems can be achieved without manual operation of controls, improving switching efficiency and accuracy.
Smart Images

Figure CN121765703A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal device technology, and in particular to a method for switching operating systems, electronic devices, and storage media. Background Technology
[0002] With the rapid development of terminal device technology, the functions of terminal devices are becoming increasingly rich, and terminal devices can greatly improve users' work or study efficiency.
[0003] Meanwhile, to enhance the information security of terminal devices, these devices support multiple operating systems. For example, multi-operating system phones allow users to assign usage scenarios to each operating system according to their needs, and users can operate phone controls to switch between the corresponding operating systems based on the current usage scenario.
[0004] However, the process of operating the controls is cumbersome, resulting in low efficiency in switching operating systems. Summary of the Invention
[0005] This application provides an operating system switching method, an electronic device, and a storage medium to improve the switching efficiency of the operating system.
[0006] In a first aspect, embodiments of this application provide a method for switching operating systems, comprising: determining multiple face images and a target gaze position, wherein the multiple face images are obtained by capturing images of a user's face through a front-facing camera of a terminal device, and the terminal device includes at least two operating systems; performing recognition processing on the multiple face images using an eye-tracking algorithm to obtain a gaze focus position corresponding to each face image, wherein the gaze focus position is the position where the user's gaze is focused on the screen of the terminal device; determining whether to perform a switch based on the target gaze position and the gaze focus position corresponding to each face image; if so, switching the currently running operating system to a target operating system, wherein the target operating system is an operating system other than the currently running operating system.
[0007] In one possible implementation, determining multiple face images includes: determining an interval duration and the camera parameters of the front-facing camera; capturing images of a target acquisition range at intervals using the front-facing camera to obtain multiple raw images; and determining the multiple face images based on the multiple raw images.
[0008] In one possible implementation, determining the plurality of face images based on the plurality of original images includes: performing recognition processing on the plurality of original images using a face recognition algorithm to obtain a plurality of first recognition results, wherein the first recognition results include whether the image contains face information or not; determining a plurality of intermediate images from the plurality of original images based on the plurality of first recognition results, wherein each intermediate image contains face information; and determining the plurality of face images based on the plurality of intermediate images.
[0009] In one possible implementation, determining the plurality of face images based on the plurality of intermediate images includes: performing recognition processing on the plurality of intermediate images using an eye state recognition model to obtain a plurality of second recognition results, wherein the second recognition results include images containing open eye information or images not containing open eye information; and determining the plurality of face images from the plurality of intermediate images based on the plurality of second recognition results, wherein each face image contains open eye information.
[0010] In one possible implementation, for any face image, an eye-tracking algorithm is used to recognize and process the face image to obtain the gaze focus position corresponding to the face image, including: determining the screen parameters of the terminal device; determining the pupil position of the face image using the eye-tracking algorithm, and calculating the gaze direction based on the pupil position; and calculating the gaze focus position corresponding to the face image based on the screen parameters, the gaze direction, and the camera parameters of the front-facing camera.
[0011] In one possible implementation, the method further includes: determining a distance threshold; if the distance between the gaze focus position corresponding to a consecutive preset number of face images and the target gaze position is less than the distance threshold, then determining to perform a switch.
[0012] In one possible implementation, the method further includes: determining operation habit information, wherein the operation habit information is determined based on historical switching records; and determining whether to perform a switch based on the operation habit information, the target gaze position, and the gaze focus position corresponding to each face image.
[0013] Secondly, embodiments of this application provide an operating system switching device, comprising: a determining module, configured to determine multiple face images and a target gaze position, wherein the multiple face images are obtained by capturing images of a user's face through a front-facing camera of a terminal device, and the terminal device includes at least two operating systems; a recognizing module, configured to perform recognition processing on the multiple face images using an eye-tracking algorithm to obtain a gaze focus position corresponding to each face image, wherein the gaze focus position is the position where the user's gaze is focused on the screen of the terminal device; a judging module, configured to determine whether to perform a switching based on the target gaze position and the gaze focus position corresponding to each face image; and a switching module, configured to, if so, switch the currently running operating system to the target operating system, wherein the target operating system is an operating system other than the currently running operating system.
[0014] In one possible implementation, the determining module is specifically used to determine the interval duration and the camera parameters of the front-facing camera; the determining module is also specifically used to acquire images of the target acquisition range at intervals using the front-facing camera to obtain multiple original images; the determining module is also specifically used to determine the multiple face images based on the multiple original images.
[0015] In one possible implementation, the determining module is specifically configured to perform recognition processing on the plurality of original images using a face recognition algorithm to obtain a plurality of first recognition results, wherein the first recognition results include whether the image contains face information or not; the determining module is further configured to determine a plurality of intermediate images from the plurality of original images based on the plurality of first recognition results, wherein each intermediate image contains face information; the determining module is further configured to determine the plurality of face images based on the plurality of intermediate images.
[0016] In one possible implementation, the determining module is specifically used to perform recognition processing on the plurality of intermediate images through an eye state recognition model to obtain a plurality of second recognition results, wherein the second recognition results include whether the image contains open eye information or not; the determining module is further specifically used to determine the plurality of face images from the plurality of intermediate images based on the plurality of second recognition results, wherein each face image contains open eye information.
[0017] In one possible implementation, the device further includes: a calculation module for determining screen parameters of the terminal device; the calculation module is further configured to determine the pupil position of the face image using the eye-tracking algorithm, and calculate the gaze direction based on the pupil position; the calculation module is further configured to calculate the gaze focus position corresponding to the face image based on the screen parameters, the gaze direction, and the camera parameters of the front-facing camera.
[0018] In one possible implementation, the device further includes: an execution module, configured to determine a distance threshold; the execution module is further configured to determine to perform a switching operation if the distance between the gaze focus position corresponding to a consecutive preset number of face images and the target gaze position is less than the distance threshold.
[0019] In one possible implementation, the device further includes: a verification module, configured to determine operation habit information, the operation habit information being determined based on historical switching records; the verification module is further configured to determine whether to perform a switch based on the operation habit information, the target gaze position, and the gaze focus position corresponding to each face image.
[0020] Thirdly, embodiments of this application provide an operating system switching device, including: a memory and a processor;
[0021] The memory stores computer-executed instructions;
[0022] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0023] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0024] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0025] This application provides an operating system switching method, electronic device, and storage medium. The method includes: determining multiple face images and a target gaze position, wherein the multiple face images are obtained by capturing user faces through a front-facing camera of a terminal device, and the terminal device includes at least two operating systems; performing recognition processing on the multiple face images using an eye-tracking algorithm to obtain a gaze focus position corresponding to each face image, wherein the gaze focus position is the position where the user's gaze is focused on the screen of the terminal device; determining whether to perform a switch based on the target gaze position and the gaze focus position corresponding to each face image; if so, switching the currently running operating system to the target operating system, wherein the target operating system is an operating system other than the currently running operating system. This solution uses the gaze focus position as the trigger condition for switching operating systems, eliminating the need for the user to manually operate the controls of the terminal device, thus reducing user operations and improving the efficiency of operating system switching. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0027] Figure 1 A schematic diagram illustrating an application scenario of an operating system switching method provided in this application embodiment;
[0028] Figure 2 A flowchart illustrating an operating system switching method provided in an embodiment of this application;
[0029] Figure 3 A flowchart illustrating an operating system switching method provided in an embodiment of this application;
[0030] Figure 4 A schematic diagram illustrating the determination of multiple face images provided in an embodiment of this application;
[0031] Figure 5 A schematic diagram illustrating the calculation of the line-of-sight direction provided in an embodiment of this application;
[0032] Figure 6 This is a schematic diagram illustrating the determination of whether to perform a switching operation, provided in an embodiment of this application.
[0033] Figure 7 A schematic diagram of the structure of an operating system switching device provided in an embodiment of this application;
[0034] Figure 8 A schematic diagram of the structure of an operating system switching device provided in an embodiment of this application;
[0035] Figure 9This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0036] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0038] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.
[0039] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0040] It should be noted that the switching method, apparatus, electronic device and storage medium of the operating system of this application can be used in the field of terminal device technology, or in any field other than terminal devices. The application field of the switching method, apparatus, electronic device and storage medium of the operating system of this application is not limited.
[0041] Figure 1 This is a schematic diagram illustrating an application scenario of an operating system switching method provided in an embodiment of this application. The scenario illustrated is as follows: a terminal device includes multiple operating systems, which can be switched according to a switching command.
[0042] With the example of a scenario, the business that users use on terminal devices includes work and life. Among them, the confidentiality requirements of work are relatively high. Users use different operating systems to handle work business and life business respectively. When users are working, they switch to the operating system corresponding to work, and when they are off work, they switch to the operating system corresponding to life, thereby improving the security of work business.
[0043] In practical applications, switching instructions can be generated based on user actions.
[0044] For example, a user finds a switching control on the terminal device interface, operates the switching control, and the terminal device generates a switching command based on the user's operation, thereby controlling the switching of the operating system.
[0045] However, the method of switching controls is inefficient, which affects the user experience.
[0046] The method for switching operating systems provided in this application aims to solve the above-mentioned technical problems in the prior art.
[0047] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0048] Figure 2 A flowchart illustrating an operating system switching method provided in this application embodiment, the method comprising the following steps:
[0049] S201. Determine multiple face images and the target's gaze position.
[0050] As an example, the execution entity of this embodiment can be an operating system switching device, which can be implemented in various ways. For example, it can be program software, or a medium storing relevant computer programs, such as a USB flash drive; or, the device can also be a physical device that integrates or installs relevant computer programs, such as a chip, a smart terminal, a computer, a server, etc.
[0051] Among them, multiple facial images are obtained by capturing user faces through the front-facing camera of the terminal device, which includes at least two operating systems.
[0052] For example, the front-facing camera operates with low power consumption, capturing the user's face in real time, thereby switching the operating system promptly based on the user's gaze focus position.
[0053] Optionally, the front-facing camera operates when the device is powered on and the current battery level is above a certain threshold.
[0054] With scenario examples, a power threshold is used to prevent the device's battery from being rapidly depleted by continuously keeping the front-facing camera on. When the front-facing camera is running, facial images can be captured whether the device screen is on or off, eliminating the need for users to turn on the screen specifically to switch operating systems, thus improving the efficiency of operating system switching.
[0055] S202. Multiple face images are processed using an eye-tracking algorithm to obtain the gaze focus position corresponding to each face image.
[0056] Among them, the gaze focus position is the position where the user's gaze is focused on the screen of the terminal device.
[0057] For example, a coordinate system is established for the terminal device screen, where each pixel on the screen corresponds to a coordinate, and the focal point of the gaze is the coordinate where the user's gaze falls on the screen.
[0058] Optionally, eye-tracking algorithms include, but are not limited to, at least one of the following: photodiode response method, contact lens method, video electrogram method, or electrooculography method.
[0059] With a scenario example, the eye-tracking algorithm is used to locate the pupil in a face image, determine the user's gaze direction based on the pupil position, and calculate the gaze focus position based on the user's gaze direction.
[0060] S203. Determine whether to perform a switch based on the target gaze position and the gaze focus position corresponding to each face image.
[0061] The target line-of-sight position is a preset position used to determine whether the current user needs to switch operating systems.
[0062] To illustrate with a scenario example, if the target viewing position is an area in the upper left corner of the screen, and the user's gaze is focused on that area, it means the user needs to switch operating systems.
[0063] It is understandable that determining whether to switch operating systems based solely on the user's gaze position eliminates the need for manual operation, thereby improving the efficiency of operating system switching.
[0064] S204. If so, switch the currently running operating system to the target operating system, which is an operating system other than the currently running operating system.
[0065] For example, the switching type of the operating system can be to shut down the currently running operating system or to suspend the currently running operating system.
[0066] Optionally, the operating system switching type can be determined based on the user's pre-set settings.
[0067] One feasible implementation method for switching operating systems further includes: determining operating habit information, which is determined based on historical switching records; and determining whether to perform a switch based on the operating habit information, the target gaze position, and the gaze focus position corresponding to each face image.
[0068] Optionally, the historical switching record may include the time when the terminal device switched operating systems in the past, or the location information corresponding to the historical switching operating system.
[0069] Optionally, operating habit information can be determined based on historical switching records using machine learning.
[0070] To illustrate with specific scenarios, user habit information could include whether a device switches to its personal operating system after get off work or to its work operating system while in the office. This user habit information can help determine whether to switch, improving the accuracy of the decision.
[0071] In this feasible implementation, the operation habit information can reflect the user's habits of switching operating systems. The process of determining the operation habit information and deciding whether to switch based on the operation habit information is automatically executed, without requiring the user to manually operate the controls. This reduces user operations and further improves the accuracy of the judgment, thereby improving the accuracy of operating system switching.
[0072] The operating system switching method provided in this application includes: determining multiple face images and a target gaze position, wherein the multiple face images are obtained by capturing user faces through the front-facing camera of a terminal device, and the terminal device includes at least two operating systems; performing recognition processing on the multiple face images using an eye-tracking algorithm to obtain the gaze focus position corresponding to each face image, the gaze focus position being the position where the user's gaze is focused on the screen of the terminal device; determining whether to perform a switch based on the target gaze position and the gaze focus position corresponding to each face image; if so, switching the currently running operating system to the target operating system, the target operating system being an operating system other than the currently running operating system. This solution uses the gaze focus position as the trigger condition for switching operating systems, eliminating the need for the user to manually operate the controls of the terminal device, reducing user operations and thus improving the efficiency of operating system switching.
[0073] Based on any of the above embodiments, the following, in conjunction with Figure 3 This section provides a detailed explanation of the operating system switching process.
[0074] Figure 3 This is a flowchart illustrating an operating system switching method provided in an embodiment of this application. Figure 3 As shown, the method includes:
[0075] S301, Determine the interval duration and the camera parameters of the front camera.
[0076] The interval is the time interval between two consecutive acquisitions of face images, and the camera parameters include, but are not limited to, the following: focal length, horizontal field of view, vertical field of view, or resolution.
[0077] Optionally, the interval duration can be adjusted based on the battery level of the terminal device.
[0078] Using scenario examples, if the terminal device's battery level is higher than a first value, the interval duration is shortened; if the terminal device's battery level is lower than a second value, the interval duration is increased. Adjusting the interval duration based on the terminal device's battery level can effectively save battery power.
[0079] Alternatively, the interval duration can be configured as a fixed value based on the user's preset settings.
[0080] S302. The front-facing camera captures images of the target area at regular intervals to obtain multiple raw images.
[0081] The target acquisition range is the shooting range of the front-facing camera.
[0082] For example, the target acquisition range is determined based on the camera parameters of the front-facing camera.
[0083] With the help of scenario examples, controlling the image acquisition range by controlling the target acquisition range can prevent false detections caused by users unintentionally looking at the screen when they are not using the terminal device, thereby improving the switching accuracy of the operating system.
[0084] S303. Determine multiple face images based on multiple original images.
[0085] For example, multiple raw images are captured in real time, and these raw images reflect whether the user is currently looking at the screen. These raw images may or may not include facial information, and the multiple facial images identified from these raw images are those that include facial information.
[0086] One feasible implementation method is to determine multiple face images by: performing recognition processing on multiple original images using a face recognition algorithm to obtain multiple first recognition results, wherein the first recognition results include whether the image contains face information or not; determining multiple intermediate images from the multiple original images based on the multiple first recognition results, wherein each intermediate image contains face information; and determining multiple face images based on the multiple intermediate images.
[0087] For example, a face recognition algorithm identifies the original image based on facial features, thereby determining whether each original image contains facial information.
[0088] With a scenario example, we can illustrate how to extract an image containing facial information from multiple original images as an intermediate image.
[0089] Optionally, facial recognition algorithms may focus on pupil features.
[0090] With the aid of scenario examples, this application uses the gaze focus position as the trigger condition for operating system switching, focusing on pupil characteristics to accurately determine the gaze focus position.
[0091] In this feasible implementation, facial recognition algorithms can effectively filter out images that do not contain facial information, thereby improving the switching efficiency of the operating system.
[0092] One feasible implementation method is to determine multiple face images by: performing recognition processing on multiple intermediate images using an eye state recognition model to obtain multiple second recognition results, wherein the second recognition results include whether the image contains open eye information or not; and determining multiple face images from the multiple intermediate images based on the multiple second recognition results, wherein each face image contains open eye information.
[0093] The eye state recognition model is a machine learning or deep learning model that determines whether the eyes are open or closed. It is trained on a large number of eye images to learn to distinguish different eye states.
[0094] Below, in conjunction with Figure 4 This section explains how to identify multiple facial images.
[0095] Figure 4 This is a schematic diagram illustrating the determination of multiple face images provided in an embodiment of this application. Figure 4 As shown, a face recognition algorithm is used to identify multiple intermediate images containing facial information from multiple original images. An eye state recognition model is then used to identify multiple face images containing information about open eyes from these intermediate images.
[0096] In this feasible implementation, by filtering multiple face images containing information about open eyes, the gaze focus position can be accurately calculated based on the face images, thereby improving the switching accuracy of the operating system.
[0097] S304. Determine the screen parameters of the terminal device.
[0098] The screen parameters include at least the following: size, resolution, pixel density, and screen position.
[0099] For example, the dimensions are the width and height of the screen. The screen position is the distance between the screen and the camera.
[0100] S305. Determine the pupil position of the face image using an eye-tracking algorithm, and calculate the gaze direction based on the pupil position.
[0101] For example, the eye region is located from a face image. The pupil position is located in the eye region using image processing techniques such as threshold segmentation, edge detection, and template matching.
[0102] Optionally, the corneal reflector point is determined, and the direction of vision is calculated geometrically using the pupil position and the corneal reflector point.
[0103] Optionally, the image of the pupil position can be input into the trained model to obtain the gaze direction corresponding to the pupil position.
[0104] Below, in conjunction with Figure 5 The calculation of the line of sight direction is explained.
[0105] Figure 5 This is a schematic diagram illustrating the calculation of the line-of-sight direction provided in an embodiment of this application. For example... Figure 5 As shown, the pupil position is located based on the face image, the corneal reflection point is determined at the pupil position, and the gaze direction is calculated geometrically based on the pupil position and the corneal reflection point. Alternatively, the image of the pupil position is determined based on the pupil position, and the image of the pupil position is input into the model to obtain the predicted gaze direction.
[0106] S306. Based on screen parameters, gaze direction, and front camera camera parameters, calculate the gaze focus position corresponding to the face image.
[0107] For example, the vector of the gaze direction is determined, and the intersection point of the gaze direction vector and the screen is calculated based on the gaze direction vector and camera parameters. A coordinate system is established on the screen based on the screen parameters, and the screen coordinates corresponding to the intersection point are determined based on the intersection point and the coordinate system. These screen coordinates are then used as the gaze focus position.
[0108] With the help of a scenario example, the positional and distance relationships between the face image and the camera can be determined by the camera parameters. Based on the positional and distance relationships, the direction of the gaze is mapped onto the screen to obtain the intersection point.
[0109] S307. Determine the distance threshold.
[0110] For example, there is an error in the process of calculating the focal position of the line of sight, and a distance threshold is used to compensate for the error in calculating the focal position of the line of sight.
[0111] S308. If the distance between the gaze focus position and the target gaze position of a consecutive preset number of face images is less than the distance threshold, then determine to perform the switch.
[0112] Below, in conjunction with Figure 6 The procedure for determining whether to perform a switchover is explained.
[0113] Figure 6 This is a schematic diagram illustrating the determination of whether to perform a switching operation, provided in an embodiment of this application. Figure 6 As shown, the distance between the gaze focus position and the target gaze position for each face image is calculated, resulting in multiple calculated distances. These multiple calculated distances are then used to make a judgment based on a preset number and distance threshold, yielding the final result.
[0114] With a scenario example, for instance, if the preset number is 5 and the distance threshold is 3 pixels, if the calculated distance between 3 consecutive face images is less than 3 pixels, then the switching will be performed; otherwise, the switching will not be performed.
[0115] It is understandable that judging based solely on a single facial image could lead to false detections due to users' eyes unintentionally scanning the screen. By setting a preset number of images, false detections can be avoided, thereby improving the accuracy of the operating system's switching.
[0116] S309. Switch the currently running operating system to the target operating system.
[0117] It should be noted that the execution process of S309 is the same as that of S204, and will not be repeated here.
[0118] Figure 7 This is a schematic diagram of the structure of an operating system switching device provided in an embodiment of this application. Figure 7 As shown, the operating system switching device 70 may include: a determining module 71, an identifying module 72, a judging module 73, and a switching module 74, wherein,
[0119] The determination module 71 is used to determine multiple face images and the target gaze position. The multiple face images are obtained by capturing images of the user's face through the front-facing camera of the terminal device. The terminal device includes at least two operating systems.
[0120] The recognition module 72 is used to recognize and process multiple face images through an eye-tracking algorithm to obtain the gaze focus position corresponding to each face image. The gaze focus position is the position where the user's gaze is focused on the screen of the terminal device.
[0121] The judgment module 73 is used to determine whether to perform a switch based on the target gaze position and the gaze focus position corresponding to each face image.
[0122] Switching module 74 is used to switch the currently running operating system to the target operating system if the condition is met. The target operating system is an operating system other than the currently running operating system.
[0123] Optionally, module 71 can be executed. Figure 2 S201 in the embodiment.
[0124] Optionally, the recognition module 72 can perform... Figure 2 S202 in the embodiment.
[0125] Optionally, the judgment module 73 can execute... Figure 2 S203 in the embodiment.
[0126] Optionally, switching module 74 can be executed. Figure 2 S204 in the embodiment.
[0127] It should be noted that the operating system switching device shown in the embodiments of this application can execute the technical solution shown in the above method embodiments, and its implementation principle and beneficial effects are similar, so they will not be described again here.
[0128] In one possible implementation, the determining module 71 is specifically used for:
[0129] Determine the interval duration and the camera parameters of the front-facing camera;
[0130] Multiple raw images are obtained by capturing images of the target area at regular intervals using the front-facing camera.
[0131] Multiple face images are identified based on multiple original images.
[0132] In one possible implementation, the determining module 71 is specifically used for:
[0133] Determine the interval duration and the camera parameters of the front-facing camera;
[0134] Multiple original images are processed by a face recognition algorithm to obtain multiple first recognition results. The first recognition results include whether the image contains face information or not.
[0135] Multiple intermediate images are determined from multiple original images based on multiple first recognition results, and each intermediate image contains facial information;
[0136] Multiple face images are determined based on multiple intermediate images.
[0137] In one possible implementation, the determining module 71 is specifically used for:
[0138] Multiple intermediate images are processed by an eye state recognition model to obtain multiple second recognition results. The second recognition results include whether the image contains information about open eyes or does not contain information about open eyes.
[0139] Multiple face images are determined from multiple intermediate images based on multiple second recognition results, and each face image contains information about open eyes.
[0140] Figure 8 This is a schematic diagram of the structure of an operating system switching device provided in an embodiment of this application. Figure 7 Based on the illustrated embodiments, as Figure 8 As shown, the switching device 80 of the operating system further includes: a computing module 75, an execution module 76, and a verification module 77, wherein:
[0141] Calculation module 75 is used for:
[0142] Determine the screen parameters of the terminal device;
[0143] The pupil position of a face image is determined by an eye-tracking algorithm, and the direction of gaze is calculated based on the pupil position.
[0144] Based on screen parameters, gaze direction, and front-facing camera parameters, the gaze focus position corresponding to the face image is calculated.
[0145] Execution module 76 is used for:
[0146] Determine the distance threshold;
[0147] If the distance between the gaze focus position and the target gaze position of a consecutive preset number of face images is less than a distance threshold, then a switch will be executed.
[0148] Verification module 77 is used for:
[0149] Determine the operation habit information, which is determined based on historical switching records;
[0150] Based on user habits, target gaze position, and gaze focus position for each face image, determine whether to switch.
[0151] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 9 As shown, the electronic device includes:
[0152] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logical instructions stored in the memory 292 to execute the methods of the above embodiments.
[0153] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0154] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, thereby implementing the methods in the above-described method embodiments.
[0155] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0156] This application provides a non-transitory computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in the foregoing embodiments.
[0157] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method as described in the foregoing embodiments.
[0158] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0159] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0160] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0161] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0162] When the integrated unit / module is implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. The processor can be any suitable hardware processor, such as CPU, GPU, FPGA, DSP, and ASIC. The storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0163] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0164] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0165] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0166] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method of switching an operating system, characterized by, The method comprises the following steps: determining a plurality of facial images and a target gaze position, wherein the plurality of facial images are obtained by image acquisition of a user's face through a front camera of a terminal device, and the terminal device comprises at least two operating systems; performing recognition processing on the plurality of facial images through an eye tracking algorithm to obtain a gaze focus position corresponding to each facial image, wherein the gaze focus position is a position where the user's gaze focuses on a screen of the terminal device; determining whether to perform switching according to the target gaze position and the gaze focus position corresponding to each facial image; if yes, switching a currently running operating system to a target operating system, wherein the target operating system is an operating system other than the currently running operating system.
2. The method of claim 1, wherein, The method for determining a plurality of facial images comprises the following steps: determining an interval duration and camera parameters of the front camera; performing image acquisition on a target acquisition range every interval duration through the front camera to obtain a plurality of original images; determining the plurality of facial images according to the plurality of original images.
3. The method of claim 2, wherein, The method for determining the plurality of facial images according to the plurality of original images comprises the following steps: performing recognition processing on the plurality of original images through a facial recognition algorithm to obtain a plurality of first recognition results, wherein the first recognition results comprise image containing facial information or image not containing facial information; determining a plurality of intermediate images from the plurality of original images according to the plurality of first recognition results, wherein each intermediate image contains facial information; determining the plurality of facial images according to the plurality of intermediate images.
4. The method of claim 3, wherein, The method for determining the plurality of facial images according to the plurality of intermediate images comprises the following steps: performing recognition processing on the plurality of intermediate images through an eye state recognition model to obtain a plurality of second recognition results, wherein the second recognition results comprise image containing open eye information or image not containing open eye information; determining the plurality of facial images from the plurality of intermediate images according to the plurality of second recognition results, wherein each facial image contains open eye information.
5. The method according to any one of claims 1-4, characterized in that, For any facial image, performing recognition processing on the facial image through an eye tracking algorithm to obtain a gaze focus position corresponding to the facial image, comprising the following steps: determining screen parameters of the terminal device; determining a pupil position of the facial image through the eye tracking algorithm, and calculating a gaze direction according to the pupil position; calculating the gaze focus position corresponding to the facial image according to the screen parameters, the gaze direction, and camera parameters of the front camera.
6. The method according to any one of claims 1-5, characterized in that, The method further comprises the following steps: determining a distance threshold; if distances between gaze focus positions corresponding to a continuous preset number of facial images and the target gaze position are all less than the distance threshold, determining to perform switching.
7. The method of claim 6, wherein, The method further comprises the following steps: determining operation habit information, wherein the operation habit information is determined according to historical switching records; determining whether to perform switching according to the operation habit information, the target gaze position, and the gaze focus position corresponding to each facial image.
8. An apparatus for switching an operating system, characterized by comprising: The method comprises the following steps: A determining module is configured to determine a plurality of face images and a target visual line position, the plurality of face images being obtained by image collection of a user face through a front camera of a terminal device, and the terminal device comprising at least two operating systems. An identifying module is configured to perform identification processing on the plurality of face images through an eyeball tracking algorithm to obtain a visual line focus position corresponding to each face image, the visual line focus position being a position where a user visual line focuses on a screen of the terminal device. A judging module is configured to determine whether to perform switching according to the target visual line position and the visual line focus position corresponding to each face image. A switching module is configured to switch a currently running operating system to a target operating system if the determination result is yes, the target operating system being an operating system other than the currently running operating system.
9. An electronic device, comprising: Comprise: A processor and a memory connected with the processor in communication; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1-7.