Privacy protection method and related equipment
By using low-power cameras and chips in smart terminal devices for ambient light brightness detection and user identity identification, the high power consumption problem caused by continuous user identity identification is solved and effective protection of user privacy is achieved.
Patent Information
- Application Number
- CN202311400199.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2043-10-25
AI Technical Summary
When smart terminal devices provide continuous user identity identification, they will lead to higher system power consumption, increase power consumption and affect system performance.
By detecting the ambient light brightness, when the brightness is greater than or equal to the preset value, a low-power camera is used to collect images and identify the object detection and recognition model run by the low-power chip. If the recognition fails, the privacy data will only be prompted through the preset notification method.
Identification through low-power cameras and chips in bright light environments reduces system power consumption, and effectively protects user privacy by only prompting for privacy data rather than directly displaying it.
Smart Images

Figure CN119939641A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a privacy protection method and related equipment. Background Art
[0002] Nowadays, smart terminal devices such as smartphones and tablets all have a locking function. In the locked state, users are restricted from accessing smart terminal devices, for example, they can only view notification messages, set drop-down menus, turn on the camera, etc. In the unlocked state, users can access various data of smart terminal devices, such as accessing applications, communication records, images, documents, performing payment operations, etc. When the owner fails to lock the terminal device in time, or the terminal device is illegally unlocked, non-owner users may access the data of the terminal device, resulting in the leakage of the owner's privacy. In this case, it is necessary for the terminal device to provide continuous user identity recognition, such as face recognition. However, continuous user identity recognition will result in higher system power consumption. Summary of the invention
[0003] In view of the above, it is necessary to provide a privacy protection method and related equipment to solve the problem that the above-mentioned continuous user identification will lead to high system power consumption.
[0004] In a first aspect, the present application provides a privacy protection method, which is applied to an electronic device, and the method includes: detecting the ambient light brightness of the environment in which the electronic device is located; if the ambient light brightness is greater than or equal to a preset value, controlling a low-power camera to capture a first image; calling a first target detection model running on a low-power chip to detect whether the first image contains a target object; if it is detected that the first image contains a target object, calling a first target recognition model running on the low-power chip to detect whether the target object in the first image matches a preset target object; if the target object in the first image does not match the preset target object, responding to the privacy data received by the electronic device, prompting the privacy data using a preset notification method.
[0005] Through the above technical solution, in a bright light environment, image data is collected by a low-power camera, and the image data is identified by an algorithm running on a low-power chip, thereby reducing system power consumption when the electronic device provides continuous identity recognition. In addition, when the electronic device receives private data, it only prompts the private data instead of directly displaying the private data, which can effectively protect user privacy.
[0006] In a possible implementation, the prompting of the privacy data using the preset notification method includes: if the target object in the first image does not match the preset target object, the first target recognition service of the kernel layer of the electronic device reports the result of the user identity recognition failure to the second target recognition service of the hardware abstraction layer of the electronic device; the second target recognition service reports the result of the user identity recognition failure to the third target recognition service of the application layer of the electronic device; the third target recognition service sends the result of the user identity recognition failure to the target application that receives the privacy data, and the target application prompts the privacy data using the preset notification method based on the result of the user identity recognition failure.
[0007] Through the above technical solution, the result of user identity failure can be accurately and efficiently transmitted to the target application that receives the privacy data through the reporting mechanism between different levels of the electronic device software architecture, so as to prompt the privacy data in time.
[0008] In a possible implementation, the prompting of the privacy data using the preset notification method also includes: if the target object in the first image does not match the preset target object, the first target recognition service compares the result of the user identity recognition failure with the last user identity recognition result; if the last user identity recognition result is an recognition failure, the target application prompts the privacy data using the preset notification method based on the last user identity recognition result.
[0009] Through the above technical solution, when the current user identification result is the same as the previous user identification result, that is, when the user identification result remains unchanged, there is no need to report the current user identification result. The target application can directly process the privacy data according to the previous user identification result, thereby reducing system power consumption.
[0010] In a possible implementation, the using the preset notification method to prompt the privacy data further includes: if the last user identity recognition result is a successful recognition, the first target recognition service reports the result of the user identity recognition failure to the second target recognition service.
[0011] Through the above technical solution, when the current user identification result is different from the previous user identification result, that is, when the user identification result changes, the current user identification result is reported in time to ensure that the target application performs corresponding processing on the privacy data.
[0012] In a possible implementation, the method further includes: if the target object in the first image matches the preset target object, in response to the private data received by the electronic device, displaying the private data using the preset notification method.
[0013] Through the above technical solution, when the user identity recognition result is successful, the private data can be directly displayed to prevent the user from missing the message.
[0014] In a possible implementation, the method further includes: if it is detected that the first image contains a target object, determining whether the frame rate of the target object in the first image is greater than or equal to a preset frame rate; if the frame rate of the target object in the first image is greater than or equal to the preset frame rate, based on the last user identity recognition result, displaying the privacy data or prompting the privacy data using the preset notification method.
[0015] Through the above technical solution, the frame rate of the target object included in the first image is greater than or equal to the preset frame rate, that is, when the low-power camera continuously detects the target object, there is no need to extract and identify the features of the target object, and the privacy data is directly processed according to the last user identity recognition result, thereby reducing the number of times the first target recognition model runs and effectively reducing system power consumption.
[0016] In a possible implementation, the method further includes: if the frame rate of the target objects included in the first image is greater than or equal to a preset frame rate, determining whether the number of the target objects in the first image has not changed; if the number of the target objects in the first image has not changed, displaying the privacy data or prompting the privacy data using the preset notification method according to the last user identity recognition result.
[0017] Through the above technical solution, when the frame rate of the target objects included in the first image is greater than or equal to the preset frame rate and the number of target objects has not changed, that is, when the number of target objects continuously detected by the low-power camera remains unchanged, there is no need to extract and identify features of the target objects. The privacy data can be directly processed according to the last user identity recognition result, thereby reducing the number of times the first target recognition model is run, and effectively reducing system power consumption.
[0018] In one possible implementation, the displaying of the privacy data using a preset notification method includes: if the target object in the first image matches the preset target object, the first target recognition service of the kernel layer of the electronic device reports the result of successful user identity recognition to the second target recognition service of the hardware abstraction layer of the electronic device; the second target recognition service reports the result of successful user identity recognition to the third target recognition service of the application layer of the electronic device; the third target recognition service sends the result of successful user identity recognition to the target application, and the target application displays the privacy data according to the result of successful user identity recognition using the preset notification method.
[0019] Through the above technical solution, the result of successful user identity identification can be accurately and efficiently transmitted to the target application that receives the privacy data through the reporting mechanism between different levels of the electronic device software architecture, so that the privacy data can be displayed in time.
[0020] In a possible implementation, the displaying of the privacy data using a preset notification method includes: if the target object in the first image matches the preset target object, the first target recognition service compares the result of the successful user identity recognition with the result of the last user identity recognition; if the result of the last user identity recognition is a successful recognition, the target application displays the privacy data using the preset notification method according to the result of the last user identity recognition.
[0021] Through the above technical solution, when the current user identity identification result is the same as the previous user identity identification result, that is, when the user identity identification result remains unchanged, there is no need to report the current user identity identification result. The target application can directly display the privacy data based on the previous successful user identity identification result, thereby reducing system power consumption.
[0022] In a possible implementation, the displaying of the privacy data using a preset notification method includes: if the target object in the first image matches the preset target object, the first target recognition service compares the result of the successful user identity recognition with the result of the previous user identity recognition; if the result of the previous user identity recognition is a recognition failure, the first target recognition service reports the result of the successful user identity recognition to the second target recognition service.
[0023] Through the above technical solution, when the current user identification result is different from the previous user identification result, that is, when the user identification result changes, the current successful user identification result is reported in time to ensure that the target application displays the private data.
[0024] In one possible implementation, calling the first target detection model running on the low-power chip to detect whether the first image contains a target object includes: detecting target features in the first image through the first target detection model; if the target features in the first image are not detected, determining that the first image does not contain the target object; or if the target features in the first image are detected, determining that the first image contains the target object.
[0025] Through the above technical solution, the first target detection model running on a low-power chip is used to detect whether the first image contains a target object, which can reduce the system power consumption during the operation of the model while ensuring the detection accuracy of the target object.
[0026] In a possible implementation, calling the first target recognition model run by the low-power chip to detect whether the target object in the first image matches the preset target object includes: extracting the first feature vector of the first image through the first target recognition model; calculating the similarity between the first feature vector of the first image and the second feature vector of the preset target object; if the similarity between the first feature vector of the first image and the second feature vector of the preset target object is greater than or equal to a preset similarity threshold, determining that the target object in the first image matches the preset target object; or if the similarity between the first feature vector of the first image and the second feature vector of the preset target object is less than the preset similarity threshold, determining that the target object in the first image does not match the preset target object.
[0027] Through the above technical solution, the first target recognition model running on a low-power chip is used to identify whether the target object in the first image matches the preset target object, which can reduce the system power consumption during the model operation process while ensuring the recognition accuracy of the target object.
[0028] In a possible implementation, the preset notification method includes pop-up window display, notification information bar display and lock screen interface display.
[0029] Through the above technical solution, the above preset notification method is used to notify the private data, which can ensure that the user can know in time that the electronic device has received the private data to avoid missing important information.
[0030] In a possible implementation, the method further includes: if the target object in the first image does not match the preset target object, responding to an access request to the application, and determining whether the application is a privacy application; if the application is a privacy application, not responding to the access request; or if the application is not a privacy application, determining whether the application contains privacy data; if the application contains privacy data, hiding the privacy data.
[0031] Through the above technical solution, when the user identification result is a failure, that is, when the current user of the electronic device is not the owner, the access request to the privacy application will not be responded to, or the privacy data in the non-privacy application will be hidden, so as to effectively protect the user privacy and avoid privacy leakage.
[0032] In a possible implementation manner, the method further includes: if the target object in the first image does not match the preset target object, prohibiting operation on the private data.
[0033] Through the above technical solution, when the user identification result is a failure, that is, when the current user of the electronic device is not the owner, operations on private data can be prohibited to prevent the user's private data from being deleted or modified, thereby effectively protecting user privacy.
[0034] In one possible implementation, the method also includes: if the ambient light brightness is less than the preset value, controlling the time-of-flight camera to capture a second image; calling a second target detection model run by the processor to detect whether the second image contains the target object; if it is detected that the second image contains the target object, calling a second target recognition model run by the processor to detect whether the target object in the second image matches the preset target object; if it is detected that the target object in the second image does not match the preset target object, responding to the privacy data received by the electronic device, prompting the privacy data using the preset notification method.
[0035] Through the above technical solution, in a dark environment, the time-of-flight camera collects image data, and the algorithm running on the processor recognizes the target of the image data without the assistance of an external light source, thereby reducing system power consumption when the electronic device provides continuous identity recognition. In addition, when the electronic device receives private data, it only prompts the private data instead of directly displaying the private data, which can effectively protect user privacy.
[0036] In a possible implementation manner, the method further includes: if the target object in the second image matches the preset target object, displaying the private data using the preset notification method.
[0037] Through the above technical solution, private data can be directly displayed to prevent users from missing messages.
[0038] In one possible implementation, the first target detection model and the first target recognition model both adopt low-power model parameters, wherein the low-power model parameters include operator type, number of channels, quantization method, number of parameter storage bits, number of feature map bits, number of feature vectors and data type.
[0039] Through the above technical solution, the first target detection model and the first target recognition model run by the low-power chip adopt low-power model parameters, which can reduce the amount of calculation during the operation of the model, thereby reducing system power consumption.
[0040] In a second aspect, the present application provides an electronic device, comprising a memory and a processor: wherein the memory is used to store program instructions; the processor is used to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device executes the above-mentioned privacy protection method.
[0041] In a third aspect, the present application provides a chip coupled to a memory in an electronic device, wherein the chip is used to control a processor of the electronic device to execute the above-mentioned privacy protection method.
[0042] In a fourth aspect, the present application provides a computer storage medium storing program instructions, which, when executed on an electronic device, enables a processor of the electronic device to execute the above-mentioned privacy protection method.
[0043] In addition, the technical effects brought about by the second to fourth aspects can be found in the descriptions related to the methods of each design in the above method part, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic diagram of a user interface of an electronic device provided in one embodiment of the present application.
[0045] Figure 2 It is a software architecture diagram of an electronic device provided in one embodiment of the present application.
[0046] Figure 3 This is a flowchart of a privacy protection method provided by an embodiment of the present application.
[0047] Figure 4 It is another schematic diagram of the software architecture diagram of the electronic device provided by an embodiment of the present application.
[0048] Figure 5 It is a schematic diagram of another user interface of an electronic device provided by an embodiment of the present application.
[0049] Figure 6 It is a schematic diagram of another user interface of an electronic device provided by an embodiment of the present application.
[0050] Figure 7 It is a schematic diagram of another user interface of an electronic device provided by an embodiment of the present application.
[0051] Figure 8 This is a flowchart of a privacy protection method provided by another embodiment of the present application.
[0052] Fig. 9 This is a flowchart of a privacy protection method provided by another embodiment of the present application.
[0053] Fig.10 This is a flowchart of a privacy protection method provided by another embodiment of the present application.
[0054] Fig.11 This is a partial processing sequence diagram of a privacy protection method provided in an embodiment of the present application.
[0055] Fig.12 This is another part of the processing sequence diagram of the privacy protection method provided in one embodiment of the present application.
[0056] Fig.13 This is a hardware architecture diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0057] The terms "first" and "second" involved in an embodiment of the present application are only used for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in an embodiment of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" refers to one or more. "Multiple" refers to two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c. In the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0059] Nowadays, smart terminal devices such as smartphones and tablets all have a locking function. In the locked state, the user's access rights to the terminal device are restricted, for example, they can only view notification messages, set up drop-down menus, turn on the camera, etc. In the unlocked state, the user can access various data of the smart terminal device, such as accessing applications, communication records, images, documents, performing payment operations, etc. When the owner fails to lock the terminal device in time, or the terminal device is illegally unlocked, non-owner users may access the data of the terminal device, resulting in the leakage of the owner's privacy. In this case, it is necessary for the terminal device to provide continuous user identity recognition, such as face recognition. However, continuous user identity recognition will lead to higher system power consumption, increase power consumption, and may also affect the processing of other processes, causing the system to freeze.
[0060] Taking the display scenario of push messages as an example, when an electronic device receives a push message from an application, it usually displays the specific content of the push message in a pop-up window at the top of the user interface. Figure 1 As shown, when the owner invites other non-owner users to view photos in the gallery application of the electronic device, if the electronic device directly displays the push message of the instant messaging application in the form of a pop-up window, the non-owner users can also see the specific content of the push message, resulting in the leakage of the owner's privacy, thereby causing inconvenience to the owner.
[0061] To protect the privacy of the owner, the electronic device can provide continuous user identity recognition, such as capturing the face of the current user of the electronic device through a camera, and comparing the captured face with the face of the owner. If the captured face is the same as the face of the owner, the current user of the electronic device is determined to be the owner, and the electronic device can display a pop-up window showing the specific content of the push message; if the captured face is different from the face of the owner, the current user of the electronic device is determined to be a non-owner, and the electronic device only prompts the receipt of a push message from a certain application through a pop-up window, without displaying the specific content of the push message.
[0062] However, when an electronic device provides continuous user identity recognition, the camera needs to be kept on and provide real-time face recognition (including face detection and face comparison). This can easily lead to higher system power consumption, accelerate the power consumption of the electronic device, and thus affect the user experience.
[0063] To solve the above problems, an embodiment of the present application provides a privacy protection method, which collects image data through a low-power camera in a bright light environment, and performs target recognition on the collected image data through an algorithm running in a low-power chip, thereby effectively reducing system power consumption when the electronic device provides continuous user identity recognition.
[0064] See also Figure 2 As shown, it is a software architecture diagram of the electronic device provided in the embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. For example, the Android system is from top to bottom an application layer 101, a framework layer 102, an Android runtime (Android runtime) and a system library 103, a hardware abstraction layer 104, a kernel layer 105, and a hardware layer 106.
[0065] The application layer 101 may include a series of application packages, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, device control service and other applications.
[0066] The framework layer 102 provides an application programming interface (API) and a programming framework for the application programs of the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.
[0067] Among them, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for electronic devices. For example, the management of call status (including connected, hung up, etc.). The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of an icon or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0068] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system. The core library contains two parts: one is the function that the Java language needs to call, and the other is the Android core library.
[0069] The application layer 101 and the framework layer 102 run in a virtual machine. The virtual machine executes the Java files of the application layer and the framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0070] The system library 103 may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (eg, OpenGL ES), a 2D graphics engine (eg, SGL), and the like.
[0071] Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of multiple commonly used audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.
[0072] The hardware abstraction layer 104 runs in the user space, encapsulates the kernel layer driver, and provides a calling interface to the upper layer.
[0073] The kernel layer 105 is a layer between hardware and software, and includes at least a display driver, a touch driver, an audio driver, and a sensor driver.
[0074] The kernel layer 105 is the core of the operating system of the electronic device. It is the first layer of software expansion based on hardware, provides the most basic functions of the operating system, is the basis of the operating system, is responsible for managing the system's processes, memory, device drivers, files and network systems, and determines the performance and stability of the system. For example, the kernel layer can determine the operating time of an application on a certain part of the hardware.
[0075] The kernel layer 105 includes programs closely related to the hardware, such as interrupt handlers, device drivers, etc., and also includes basic, common, and high-frequency modules, such as clock management modules, process scheduling modules, etc., and also includes key data structures. The kernel layer can be set in the processor or solidified in the internal memory.
[0076] The hardware layer 106 includes the hardware of the electronic device, such as a display screen, buttons, a camera, etc.
[0077] For the detailed implementation process of the privacy protection method, please refer to the description in the various embodiments below.
[0078] See also Figure 3 FIG. 1 is a flowchart of a privacy protection method provided by an embodiment of the present application. The method is applied in an electronic device, and the privacy protection method includes:
[0079] S101, detecting the ambient light brightness of the environment where the electronic device is located, and determining whether the ambient light brightness is greater than or equal to a preset value. If the ambient light brightness is greater than or equal to the preset value, executing S102; if the ambient light brightness is less than the preset value, executing S106.
[0080] See also Figure 4, which is another schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application. In an embodiment of the present application, the hardware layer of the electronic device includes an ambient light sensor 180L. After the electronic device is turned on, the electronic device controls the ambient light sensor 180L to detect the ambient light brightness of the environment in which the electronic device is located at a first preset time interval, and determines whether the ambient light brightness is greater than or equal to a preset value. The first preset time is 3 seconds, 4 seconds, 5 seconds or other time, and the preset value is 15 lux (lux), 20 lux, 25 lux or other brightness values.
[0081] In another embodiment of the present application, it is also possible to determine whether the smoothed value of the brightness of multiple ambient lights detected within a preset time period is greater than or equal to a preset value. If the smoothed value of the brightness of multiple ambient lights detected within the preset time period is greater than or equal to the preset value, S102 is executed; if the smoothed value of the brightness of multiple ambient lights detected within the preset time period is less than the preset value, S106 is executed.
[0082] In another embodiment of the present application, the preset time period is 1 minute, and the smoothed value of multiple ambient light brightnesses can be the average value of multiple ambient light brightnesses detected every first preset time within the preset time period or the average value of multiple ambient light brightnesses remaining after removing outliers, and outliers can include the maximum and minimum values of the multiple ambient light brightnesses detected within the preset time period.
[0083] S102, controlling the low power camera to capture a first image.
[0084] like Figure 4 As shown, the hardware layer of the electronic device also includes a low-power camera 1061. In one embodiment of the present application, the low-power camera is an active optical (AO) camera. The low-power camera can be a front camera of the electronic device or be arranged near the front camera of the electronic device. The electronic device controls the low-power camera to collect the first image of the scene in front of the display screen of the electronic device every second preset time. Among them, the second preset time is 0.2 seconds, 0.3 seconds, 0.5 seconds or other time. Among them, the active optical camera uses active optical technology for depth of field perception and tracking, uses an infrared light source and an infrared light receiver, and calculates depth information by measuring the round-trip time of light between the object and the camera. Compared with the time-of-flight camera, the low-power camera has lower power consumption when working and is widely used in fields such as face recognition and gesture control.
[0085] In another embodiment of the present application, a low-power camera is an always-on (Always On, AO) camera. The image sensor used in the always-on camera has low power consumption, can dynamically control power consumption, and can also collect image data suitable for deep learning models, thereby suppressing the information processing load caused by the external processor and reducing system power consumption.
[0086] S103, calling the first target detection model running on the low power chip to detect whether the first image contains a target object. If it is detected that the first image contains a target object, execute S104; if it is not detected that the first image contains a target object, return to execute S101.
[0087] In one embodiment of the present application, the kernel layer of the electronic device includes a sensor hub 1050, the hardware layer includes a low-power chip 1062, the sensor hub 1050 includes a first target recognition service 1051, and the first target recognition service 1051 includes a first target detection model 1052. Among them, the low-power chip 1062 is an eNPU (Embedded Neural-network Processing Unit) chip. The target feature in the first image is detected by the first target detection model. If the target feature in the first image is not detected, it is determined that the first image does not contain the target object; if the target feature in the first image is detected, it is determined that the first image contains the target object. The type of the first target detection model and the type of the target feature are determined according to the type of the target object. The target object includes a face and / or a gesture. The first target detection model includes a first face detection model and / or a first gesture detection model. The target feature includes a face feature and a gesture feature.
[0088] In one embodiment of the present application, the first face detection model is a convolutional neural network model, which trains and generates a face rectangular frame as feature data, and the face rectangular frame is the smallest rectangular frame that includes multiple parts of the face, and the multiple parts may include eyebrows, eyes, nose, and mouth. In other embodiments of the present application, the multiple parts may also include facial features.
[0089] In one embodiment of the present application, a face rectangular frame in a first image captured by a low-power camera is detected by a first face detection model. If a face rectangular frame in the first image captured by the low-power camera is not detected, it is determined that the first image captured by the low-power camera does not include a face. If a face rectangular frame in the first image captured by the low-power camera is detected, it is determined that the first image captured by the low-power camera includes a face, and the face information is output. Wherein, the face information includes, but is not limited to: the number of faces and the coordinates of at least one vertex on the face rectangular frame, the number of faces is the same as the number of rectangular frames, the coordinates of at least one vertex on the rectangular frame may include the coordinates of the upper left vertex and the lower right vertex of the rectangular frame, and the coordinates of the vertex of the rectangular frame are pixel coordinates. For example, the face information output by the first face detection model is "2, target1 rect (500 * 40, 600 * 80), target2 rect (700 * 200, 800 * 240)". In other embodiments of the present application, the first face detection model may also be a cascade classifier based on Haar features, a Dlib face detection algorithm, and the like.
[0090] In one embodiment of the present application, the first target detection model adopts low-power model parameters, and the model parameters of the first target detection model include, but are not limited to: operator type, number of channels, quantization method, parameter storage bit number, feature map bit number. Among them, the operator of the first target detection model includes, but is not limited to: convolution and activation function, the convolution type is standard convolution (Regular Convolution), that is, ordinary convolution, the activation function type is ReLU function, compared with depth separation depthwise convolution and PReLU activation function with parameters, ordinary convolution and ReLU activation function are more suitable for low-power chip eNPU, effectively reducing the amount of model calculation, and reducing system power consumption during model operation. The number of channels of the first target detection model (such as the number of channels of input data and output data) is a multiple of 32, the quantization method quantizes 32-bit floating point numbers, or converts floating point numbers into fixed point numbers, and uses low-precision floating point numbers to reduce the storage requirements and computational overhead of the model. The parameter storage bit number is 8bit, that is, the model parameters are stored using 8bit data, and the feature map bit number is 8bit, that is, the feature map is calculated using 8bit data. The first target detection model uses low-power model parameters to reduce the amount of calculation during model operation and reduce system power consumption.
[0091] In another embodiment of the present application, if it is not detected that the target object is included in the first image, S105 may also be executed.
[0092] S104, calling the first target recognition model running on the low-power chip to detect whether the target object in the first image matches the preset target object. If it is detected that the target object in the first image does not match the preset target object, execute S105; if it is detected that the target object in the first image matches the preset target object, return to execute S101.
[0093] In one embodiment of the present application, the first target recognition service 1051 also includes a first target recognition model 1053 run by the low-power chip 1062. The type of the first target recognition model and the preset target object are determined according to the type of the target object. The target object includes a face and / or a gesture. The first target recognition model includes a first face recognition model and / or a first gesture recognition model. The preset target object includes a preset face and / or a preset gesture. The preset face can be a face set by the machine owner or the machine owner, and the preset gesture can be a gesture preset by the machine owner. The first feature vector of the first image is extracted by the first target recognition model, and the similarity between the first feature vector of the first image and the second feature vector of the preset target object is calculated. If the similarity between the first feature vector of the first image and the second feature vector of the preset target object is greater than or equal to the preset similarity threshold, it is determined that the target object in the first image matches the preset target object; if the similarity between the first feature vector of the first image and the second feature vector of the preset target object is less than the preset similarity threshold, it is determined that the target object in the first image does not match the preset target object.
[0094] In one embodiment of the present application, the first face recognition model may also be a convolutional neural network model, which uses the positions of facial feature points as feature data for training and generation. The first face recognition model detects multiple feature points in the face rectangular frame extracted by the first face detection model through a key point detector. For example, the multiple feature points include the beginnings and end of the two eyes and the beginning of the nose; extracts the coordinates of the multiple feature points as feature vectors of the face in the first image captured by the low-power camera, where the coordinates of the feature points are the pixel coordinates of the feature points in the image, for example, the feature vector is points[(94, 238), (98, 271), (105, 303), (113, 334), (125, 362)]; calculates the feature points of the face in the first image captured by the low-power camera. The method comprises the following steps: determining the similarity between the feature vector of the human face in the first image captured by the low-power camera and the feature vector of the preset human face; determining whether the similarity between the feature vector of the human face in the first image captured by the low-power camera and the feature vector of the preset human face is greater than or equal to the preset similarity threshold; if the similarity between the feature vector of the human face in the first image captured by the low-power camera and the feature vector of the preset human face is greater than or equal to the preset similarity threshold, determining that the human face in the first image matches the preset human face; if the similarity between the feature vector of the human face in the first image and the feature vector of the preset human face is less than the preset similarity threshold, determining that the human face in the first image captured by the low-power camera does not match the preset human face.
[0095] In one embodiment of the present application, the first target recognition model also uses low-power model parameters. In addition to the above parameters, the model parameters of the first target recognition model also include the number and data type of feature vectors. For example, the number of feature vectors is 512, and the data type is 8-bit fixed-point numbers. Compared with floating-point numbers, the representation method of 8-bit fixed-point numbers is simpler and the operation speed is faster, which can improve the calculation efficiency of similarity. The first target recognition model also uses the SIMD (Single Instruction Multiple Data) instruction set to read and calculate feature vectors. The SIMD instruction set is provided by Qualcomm Hexagon digital signal processors, which can improve computing efficiency, support efficient multi-threaded programming, and provide large-scale parallel computing capabilities.
[0096] In one embodiment of the present application, the similarity may be cosine similarity, and the calculation formula (1) of cosine similarity is:
[0097]
[0098] In other embodiments of the present application, the similarity may also be the Euclidean distance.
[0099] S105, in response to the private data received by the electronic device, the private data is prompted by using a preset notification method.
[0100] In one embodiment of the present application, a privacy application or a non-privacy application containing privacy data can send a subscription request to a third target identification service of the application layer to subscribe to the user identity identification result. The third target identification service can send a subscription request to a second target identification service of the hardware abstraction layer to subscribe to the user identity identification result obtained by the second target identification service. The second target identification service can send a subscription request to the first target identification service of the kernel layer to subscribe to the user identity identification result obtained by the first target identification service.
[0101] In one embodiment of the present application, the second target recognition service of the hardware abstraction layer can also subscribe to different sensor services from the sensor center of the kernel layer, for example, subscribe to the sensing service of the ambient light sensor, so that the ambient light sensor of the sensor center sends the detected ambient light brightness to the second target recognition service. After receiving the ambient light brightness, the second target recognition service determines whether the ambient light brightness is greater than or equal to a preset value. If the ambient light brightness is greater than or equal to the preset value, the second target recognition service subscribes to the first target recognition service, and the first target recognition service starts running to control the low-power camera to capture the first image. When the first target detection model detects that the first image contains a target object and the first target recognition model detects that the target object in the first image is not a preset target object, the first target recognition service reports the result of identity recognition failure to the second target recognition service, and the second target recognition service reports the result of identity recognition failure to the third target recognition service. The third target recognition service further reports the result of identity recognition failure to the target application that receives the privacy data, and the target application prompts the privacy data using a preset notification method.
[0102] In one embodiment of the present application, the user can preset the push data received by the preset type of application or all applications in the electronic device as private data, wherein the preset type of application includes, but is not limited to: email application, communication application, work application, health application. For example, the push data of the email application includes the summary of the newly received email, the push data of the communication application includes the messages sent by other users, the push data of the work application includes the work plan, and the push data of the health application includes physiological data.
[0103] In one embodiment of the present application, if it is detected that the target object in the first image does not match the preset target object, that is, when the user who is using the electronic device is not the owner, when the electronic device receives push data from an application, it is determined whether the push data from the application is preset privacy data. If the push data from the application is the preset privacy data, the privacy data is prompted using a preset notification method instead of directly displaying the specific content of the privacy data, so as to protect the privacy of the owner.
[0104] In one embodiment of the present application, the preset notification methods include, but are not limited to: pop-up window display, notification information bar display, and lock screen interface display. For example, when the instant messaging application A of the electronic device receives a message sent by other users, such as Figure 5 As shown, a pop-up window is displayed at the top of the user interface to prompt the electronic device of the private data received in the form of a pop-up notification. The content of the prompt information may be "Instant messaging application A receives a new message." Figure 6 As shown, a prompt message is displayed in the pull-down notification bar of the electronic device, thereby prompting the electronic device of the received private data in the form of a notification in the notification bar, and the content of the prompt message may be "Instant messaging application A receives a new message". Figure 7 As shown, a prompt message is displayed on the lock screen interface of the electronic device, thereby prompting the electronic device of the received private data in the form of a lock screen interface notification, and the content of the prompt message may be "Instant messaging application A receives a new message."
[0105] In another embodiment of the present application, if it is detected that the target object in the first image captured by the low-power camera does not match the preset target object, the privacy data may be neither displayed nor prompted until it is detected that the target object in the first image captured by the low-power camera matches the preset target object, and then the privacy data is displayed using a preset notification method.
[0106] In an embodiment of the present application, continuous user identity recognition is performed based on an algorithm running on a low-power camera and a low-power chip to determine whether the user in front of the electronic device is an authorized user or an unauthorized user. When the user in front of the electronic device is an unauthorized user, when the electronic device receives private data, it only displays a prompt message to prompt the received private data, instead of directly displaying the specific content of the private data, thereby effectively protecting user privacy.
[0107] S106, controlling a time of flight (TOF) camera to collect a second image.
[0108] like Figure 4As shown, in one embodiment of the present application, the hardware layer of the electronic device also includes a time-of-flight camera 1063. If the ambient light brightness is less than a preset value, the time-of-flight camera is controlled to capture a second image of the scene in front of the display screen of the electronic device every second preset time. The time-of-flight camera is a front camera of the electronic device or is arranged near the front camera of the electronic device, and is used to capture a second image of the scene in front of the display screen of the electronic device. The time-of-flight camera determines the distance by emitting infrared light or laser pulses and measuring the time required for the light signal to travel from the camera to the target object and back. The time-of-flight camera can obtain the depth information of the scene in real time and is widely used in augmented reality, virtual reality, robot navigation and other fields.
[0109] S107, calling the second target detection model run by the processor to detect whether the second image contains the target object. If it is detected that the second image contains the target object, execute S108; if it is not detected that the second image contains the target object, return to execute S101.
[0110] like Figure 4 As shown, in one embodiment of the present application, the hardware abstraction layer of the electronic device includes an intelligent sensor fusion service (ISF Service) 1040, and the intelligent sensor fusion service 1040 includes a second target recognition service 1041, and the second target recognition service 1041 includes a first target detection model 1042 and a second target recognition model 1043 run by a processor. In one embodiment of the present application, the method by which the second target detection model detects whether the target object is contained in the second image is the same as the method by which the first target detection model detects whether the target object is contained in the first image, and is not described in detail here. In another embodiment of the present application, if the target object is not detected in the second image, S105 can also be executed.
[0111] S108, calling the second target recognition model run by the processor to detect whether the target object in the second image matches the preset target object. If it is detected that the target object in the second image does not match the preset target object, execute S105; if it is detected that the target object in the second image matches the preset target object, return to execute S101.
[0112] In one embodiment of the present application, the method by which the second target recognition model detects whether the target object in the second image matches the preset target object is the same as the method by which the first target recognition model detects whether the target object in the first image matches the preset target object, and is not elaborated here.
[0113] In one embodiment of the present application, the second target detection model and the second target recognition model are loaded in advance by means of pre-parsing and serialized loading, and are loaded at runtime, which only takes up a certain amount of memory space and reduces power consumption during non-use time periods. Pre-parsing refers to creating a trained model as a file in advance, and serialized loading refers to loading the model structure and parameters from the file to implement model functions, such as target detection and recognition.
[0114] See also Figure 8 FIG. 1 is a flowchart of a privacy protection method provided by another embodiment of the present application. The method is applied in an electronic device, and the privacy protection method includes:
[0115] S201, detecting the ambient light brightness of the environment where the electronic device is located, and determining whether the ambient light brightness is greater than or equal to a preset value. If the ambient light brightness is greater than or equal to the preset value, executing S202; if the ambient light brightness is less than the preset value, executing S206.
[0116] S202, controlling the low power camera to capture a first image.
[0117] S203, calling the first target detection model running on the low power chip to detect whether the first image contains a target object. If it is detected that the first image contains a target object, execute S204; if it is not detected that the first image contains a target object, return to execute S201.
[0118] S204, calling the first target recognition model running on the low-power chip to detect whether the target object in the first image matches the preset target object. If it is detected that the target object in the first image does not match the preset target object, execute S205; if it is detected that the target object in the first image matches the preset target object, return to execute S201.
[0119] S205, in response to the private data received by the electronic device, the private data is prompted by using a preset notification method.
[0120] S206, in response to the private data received by the electronic device, display the private data using a preset notification method.
[0121] In one embodiment of the present application, if it is detected that the target object in the first image matches the preset target object, the first target service reports the result of successful user identification to the second target identification service, the second target identification service then reports the result of successful identification to the third target identification service, the third target identification service further reports the result of successful identification to the target application that received the private data, and the target application directly displays the private data using a preset notification method. For example, when the instant messaging application A of the electronic device receives a message sent by other users, such as Figure 1As shown, a pop-up window is displayed at the top of the user interface to display the specific content of the privacy data, thereby displaying the privacy data in the form of a pop-up notification. The specific content of the privacy data may be "Xiao Zhang: There is an emergency meeting at 3 pm that requires your attendance."
[0122] S207, controlling the time-of-flight camera to capture a second image.
[0123] S208, calling the second target detection model run by the processor to detect whether the second image contains the target object. If it is detected that the second image contains the target object, execute S209; if it is not detected that the second image contains the target object, return to execute S201.
[0124] S209, calling the second target recognition model run by the processor to detect whether the target object in the second image matches the preset target object. If it is detected that the target object in the second image does not match the preset target object, execute S205; if it is detected that the target object in the second image matches the preset target object, execute S206.
[0125] In one embodiment of the present application, the method also includes: if the target object in the first image does not match the preset target object, responding to the access request to the application and determining whether the application is a privacy application; if the application is a privacy application, not responding to the access request; or if the application is not a privacy application, determining whether the application contains privacy data; if the application contains privacy data, hiding the privacy data, and responding to the access request to the application after hiding the privacy data.
[0126] In one embodiment of the present application, the privacy data also includes all data corresponding to the privacy application and data related to user privacy in the non-privacy application. The user can set an application as a privacy application or a non-privacy application in the system settings. If an application is set as a privacy application by the user, all data of the privacy application are private data. The user can also set data related to user privacy as private data in a non-privacy application. For example, the user sets the gallery application as a non-privacy application in the system settings, but sets a certain album as private data in the gallery application.
[0127] For example, work application B has been preset as a privacy application by the user. If the target object in the first image or the second image does not match the preset target object, when work application B receives an access request, the access request may be a request to open work application B, or a request to switch the current user interface to the interface of work application B when work application B is running in the background. Work application B is determined to be a privacy application. At this time, the access request is not responded to, that is, work application B is not opened or the interface of work application B is not displayed, thereby preventing the owner's children from sending work information indiscriminately, preventing the owner's assistant from viewing the owner's confidential information at work, and preventing the owner's partner from using the work application and causing confidential information to be leaked.
[0128] For another example, the album application C has been preset as a non-privacy application by the user, but the album a in the album application C has been preset as private data by the user. If the target object in the first image or the second image does not match the preset target object, when the album application C receives the access request, the album application C can be opened normally or the current interface can be switched to the album application C. Then, when it is determined that album a is private data, after the album application C is opened or the current interface is switched to the album application C, the album a in the album application C is hidden, thereby preventing the assistant or partner of the owner from viewing the specified photos in the album.
[0129] In another embodiment of the present application, the desktop of the electronic device can be the interface of a desktop application. If the target object in the first image or the second image does not match the preset target object, the icon of the privacy application can be hidden when the interface of the electronic device is switched to the desktop, thereby preventing non-owner users from opening the privacy application.
[0130] In one embodiment of the present application, the method further includes: if the target object in the first image does not match the preset target object, prohibiting the operation of the private data. The operation of the private data includes, but is not limited to: viewing, modifying, deleting, and downloading.
[0131] For example, the system settings application D has been set as a non-privacy application by the user, but some setting items in the system settings application D (such as alarm settings, ringtone settings, volume settings, desktop icon layout settings, etc.) have been set as privacy data by the user. If the target object in the first image or the second image does not match the preset target object, when the system settings application D receives modifications to the alarm time, ringtone, volume, and desktop icon layout, operations on the alarm, ringtone, volume, and desktop icon layout are disabled, thereby preventing the system settings from being tampered with by the owner's children.
[0132] For another example, application E has been set as a privacy application by the user. If the target object in the first image or the second image does not match the preset target object, when application E receives a deletion operation, the operation on application E is disabled, thereby preventing application E from being accidentally deleted by the owner's children.
[0133] In another embodiment of the present application, when the electronic device receives private data, or when the electronic device receives a request to access private data, or when the electronic device receives an operation on private data, user identification can be turned on, that is, the ambient light brightness is detected by an ambient light sensor, image data is collected by a low-power camera or a time-of-flight camera, and target detection and identification are performed by a target detection model and a target recognition model to obtain an identification result, determine whether the identification result has changed, and if the identification result has changed, report the identification result to the target application, and the target application displays or prompts the private data according to the identification result, responds or does not respond to the request to access the private data, prohibits or does not prohibit the operation on the private data, etc. In other words, the continuous identity authentication service is started only when privacy protection is needed, thereby reducing system power consumption.
[0134] See also Fig. 9 FIG. 1 is a flowchart of a privacy protection method provided by another embodiment of the present application. The method is applied in an electronic device, and the privacy protection method includes:
[0135] S301, detecting the ambient light brightness of the environment where the electronic device is located, and determining whether the ambient light brightness is greater than or equal to a preset value. If the ambient light brightness is greater than or equal to the preset value, executing S302; if the ambient light brightness is less than the preset value, executing S308.
[0136] S302, controlling the low power camera to capture a first image.
[0137] S303, calling the first target detection model running on the low power chip to detect whether the first image contains the target object. If it is detected that the first image contains the target object, execute S304; if it is not detected that the first image contains the target object, execute S305.
[0138] S304, determining whether the frame rate at which the target object is detected in the first image is greater than or equal to a preset frame rate. If the frame rate at which the target object is detected in the first image is greater than or equal to the preset frame rate, executing S306; if the frame rate at which the target object is detected in the first image is less than the preset frame rate, executing S308.
[0139] In an embodiment of the present application, the frame rate is a frequency at which the target object is detected in the first image, and the preset frame rate is 5 Hz, 6 Hz, 7 Hz or other frame rates.
[0140] S305, determine whether the last identity authentication result is successful. If the last identity authentication result is a failure, execute S306; if the last identity authentication result is a success, execute S307.
[0141] In one embodiment of the present application, if the frame rate of the target object contained in the first image is greater than or equal to the preset frame rate, the first target recognition service does not need to perform identity authentication, nor does it need to report the identity authentication result to the second target recognition service, thereby reducing system power consumption. The target application that receives the private data directly prompts or displays the private data using a preset notification method based on the last identity authentication result.
[0142] S306, in response to the private data received by the electronic device, the private data is prompted using a preset notification method.
[0143] S307, in response to the private data received by the electronic device, display the private data using a preset notification method.
[0144] S308, calling the first target recognition model running on the low-power chip to detect whether the target object in the first image matches the preset target object. If it is detected that the target object in the first image does not match the preset target object, execute S306; if it is detected that the target object in the first image matches the preset target object, execute S307.
[0145] S309, controlling the time-of-flight camera to capture a second image.
[0146] S310, calling the second target detection model run by the processor to detect whether the second image contains the target object. If it is detected that the second image contains the target object, execute S311; if it is not detected that the second image contains the target object, return to execute S309.
[0147] S311, calling the second target recognition model run by the processor to detect whether the target object in the second image matches the preset target object. If it is detected that the target object in the second image does not match the preset target object, execute S306; if it is detected that the target object in the second image matches the preset target object, execute S307.
[0148] In another embodiment of the present application, step S304 can be replaced by: determining whether the frame rate at which the target object is detected in the first image is greater than or equal to the preset frame rate, and determining whether the number of target objects in the first image has not changed. If the frame rate at which the target object is detected in the first image is greater than or equal to the preset frame rate, and the number of target objects in the first image has not changed, execute S306; if the frame rate at which the target object is detected in the first image is less than the preset frame rate, or the number of target objects in the first image has changed, execute S308.
[0149] See also Fig.10 FIG. 1 is a flowchart of a privacy protection method provided by another embodiment of the present application. The method is applied in an electronic device, and the privacy protection method includes:
[0150] S401, detecting the ambient light brightness of the environment where the electronic device is located, and determining whether the ambient light brightness is greater than or equal to a preset value. If the ambient light brightness is greater than or equal to the preset value, executing S402; if the ambient light brightness is less than the preset value, executing S408.
[0151] S402, controlling the low power camera to capture a first image.
[0152] S403, calling the first target detection model running on the low power chip to detect whether the first image contains the target object. If it is detected that the first image contains the target object, execute S404; if it is not detected that the first image contains the target object, execute S405.
[0153] S404, determining whether the frame rate of the target object in the first image is greater than or equal to a preset frame rate. If the frame rate of the target object in the first image is greater than or equal to the preset frame rate, executing S406; if the frame rate of the target object in the first image is less than the preset frame rate, executing S408.
[0154] S405, determining whether the last identity authentication result is successful. If the last identity authentication result is a failure, executing S406; if the last identity authentication result is a success, executing S407.
[0155] S406, in response to the private data received by the electronic device, the private data is prompted using a preset notification method.
[0156] S407, in response to the private data received by the electronic device, display the private data using a preset notification method.
[0157] S408, calling the first target recognition model running on the low-power chip to detect whether the target object in the first image matches the preset target object. If it is detected that the target object in the first image does not match the preset target object, execute S406; if it is detected that the target object in the first image matches the preset target object, execute S407.
[0158] S409, controlling the time-of-flight camera to capture a second image.
[0159] S410, calling the second target detection model run by the processor to detect whether the second image contains the target object. If it is detected that the second image contains the target object, execute S411; if it is not detected that the second image contains the target object, execute S412.
[0160] S411, calling the second target recognition model run by the processor to detect whether the target object in the second image matches the preset target object. If it is detected that the target object in the second image does not match the preset target object, execute S406; if it is detected that the target object in the second image matches the preset target object, execute S407.
[0161] S412, determining whether the number of times that the target object is not detected in the second image continuously is greater than or equal to a preset number of times. If the number of times that the target object is not detected in the second image continuously is greater than or equal to the preset number of times, executing S413; if the number of times that the target object is not detected in the second image continuously is less than the preset number of times, returning to executing S409. In one embodiment of the present application, the preset number of times is 2, 3, 4 or other values.
[0162] S413, determine whether the last identity authentication result is successful. If the last identity authentication result is a failure, execute S406; if the last identity authentication result is a success, execute S407.
[0163] In another embodiment of the present application, it is also possible to determine whether the frame rate of the target object in the second image is greater than or equal to the preset frame rate, and to determine whether the number of target objects in the second image has not changed. If the frame rate of the target object in the second image is greater than or equal to the preset frame rate, and the number of target objects in the second image has not changed, it is determined that the user authentication result is unchanged, and the target application displays or prompts the privacy data according to the last authentication result. If the frame rate of the target object in the second image is less than the preset frame rate, or the number of target objects in the second image has changed, return to execute S409.
[0164] See also Figure 11-12 , which is a processing sequence diagram of a privacy protection method provided in one embodiment of the present application.
[0165] S501, a target application at the application layer subscribes to an identity authentication result from a third target identification service at the application layer.
[0166] S502: The third target identification service subscribes to the identity authentication result from the second target identification service of the hardware abstraction layer.
[0167] S503: The second target recognition service subscribes to the sensor center of the kernel layer for the ambient light brightness detected by the ambient light sensor.
[0168] S504: The second target recognition service obtains the ambient light brightness sent by the sensor service.
[0169] S505: The second target recognition service determines whether the ambient light brightness is greater than or equal to a preset value.
[0170] S506: If the ambient light brightness is greater than or equal to the preset value, the second target recognition service subscribes to the identity authentication result from the first target recognition service of the kernel layer, and sends an identity authentication instruction to the first target detection service.
[0171] S507: The first object detection service responds to the identity authentication instruction and sends an image acquisition instruction to the low power camera.
[0172] S508: The low-power camera captures a first image and sends the first image to a first target detection model.
[0173] S509: The first target detection model executed by the low-power chip in the kernel layer detects whether the first image contains the target object.
[0174] S510, if the first image contains the target object, the first target recognition service determines whether the frame rate at which the first image contains the target object is greater than or equal to the preset frame rate, and determines whether the number of target objects in the first image has not changed. If the frame rate at which the first image contains the target object is greater than or equal to the preset frame rate, and the number of target objects in the first image has not changed, return to execute S508. If the frame rate at which the first image contains the target object is less than the preset frame rate, or the number of target objects in the first image has changed, execute S511.
[0175] S511, the first target recognition service sends the first image to the first target recognition model, and the first target recognition model running on the low-power chip detects whether the target object in the first image matches the preset target object, determines the identity recognition result, and returns the determined identity recognition result to the first target recognition service.
[0176] S512: The first target identification service determines whether the current identity identification result is the same as the previous identity identification result.
[0177] S513: If the current identity recognition result is different from the previous identity recognition result, the first target recognition service reports the current identity recognition result to the second target recognition service.
[0178] S514, the second target identification service reports the current identity identification result to the third target identification service.
[0179] S515, the third target identification service sends the current identity identification result to the target application.
[0180] S516: If the ambient light brightness is less than a preset value, the second target recognition service sends an image acquisition instruction to the time-of-flight camera.
[0181] S517, the time-of-flight camera captures a second image and sends the second image to a second target detection model.
[0182] S518: Detect, by means of a second target detection model executed by the processor, whether the second image contains the target object.
[0183] S519, if the second image is not detected to contain the target object, the second target recognition service determines whether the number of consecutive failures to detect the second image to contain the target object is greater than or equal to a preset number of times. If the number of consecutive failures to detect the second image to contain the target object is greater than or equal to the preset number of times, execute S520; if the number of consecutive failures to detect the second image to contain the target object is less than the preset number of times, return to execute S517.
[0184] S520: The second target identification service determines that the identity authentication result has not changed.
[0185] S521: If it is detected that the second image contains the target object, the second image is sent to the second target recognition model, and the second target recognition model run by the processor detects whether the target object in the second image matches the preset target object to determine the identity recognition result.
[0186] S522, the second target identification service determines whether the current identity identification result is the same as the previous identity identification result.
[0187] S523: If the current identity recognition result is different from the previous identity recognition result, the second target recognition service reports the current identity recognition result to the third target recognition service.
[0188] S524, the third target identification service sends the current identity identification result to the target application.
[0189] In one embodiment of the present application, if the current identity recognition result is successful, that is, the target object in the first image matches the preset object, the target application displays the received private data; if the current identity recognition result is unsuccessful, that is, the target object in the first image does not match the preset object, the target application prompts the received private data. If the current identity recognition result is the same as the previous identity recognition result, that is, the identity recognition result remains unchanged, if the previous identity recognition result is successful, the target application displays the received private data; if the previous identity recognition result is unsuccessful, the target application prompts the received private data.
[0190] Through the above-mentioned embodiments of the present application, the first target identification service and the second target identification service will report the identity identification result only when the identity identification result changes, thereby avoiding the increase in system power consumption caused by reporting the identity identification result when the identity identification result remains unchanged.
[0191] The present application also provides an electronic device 100. Fig.13 As shown, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device 100.
[0192] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0193] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0194] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0195] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0196] The processor 110 may also be provided with a memory for storing instructions and data. In one embodiment of the present application, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use instructions or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0197] In one embodiment of the present application, the processor 110 may include one or more interfaces. The interface may include an Inter-integrated Circuit (I2C) interface, an Inter-integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General-Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface, etc.
[0198] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (Serial Data Line, SDA) and a serial clock line (Serial Clock Line, SCL). In one embodiment of the present application, the processor 110 may include multiple groups of I2C buses. The processor 110 can be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 can be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface to realize the touch function of the electronic device 100.
[0199] The I2S interface can be used for audio communication. In one embodiment of the present application, the processor 110 may include multiple I2S buses. The processor 110 may be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In one embodiment of the present application, the audio module 170 may transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call via a Bluetooth headset.
[0200] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In one embodiment of the present application, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In one embodiment of the present application, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering a call via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0201] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In one embodiment of the present application, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In one embodiment of the present application, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0202] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In one embodiment of the present application, the processor 110 and the camera 193 communicate via the CSI interface to realize the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the electronic device 100.
[0203] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In one embodiment of the present application, the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0204] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices 100, such as AR devices, etc.
[0205] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0206] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.
[0207] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0208] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0209] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0210] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (Low Noise Amplifier, LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In one embodiment of the present application, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In one embodiment of the present application, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0211] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In one embodiment of the present application, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be arranged in the same device as the mobile communication module 150 or other functional modules.
[0212] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0213] In one embodiment of the present application, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include Global System For Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a Global Positioning System (GPS), a Global Navigation Satellite System (GLONASS), a Beidou Navigation Satellite System (BDS), a Quasi-Zenith Satellite System (QZSS) and / or a Satellite Based Augmentation System (SBAS).
[0214] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for face recognition, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0215] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can utilize a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, Microled, Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In one embodiment of the present application, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0216] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0217] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In one embodiment of the present application, ISP can be set in camera 193.
[0218] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In one embodiment of the present application, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0219] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0220] The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0221] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0222] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0223] Random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.;
[0224] Non-volatile memory may include disk storage devices and flash memory.
[0225] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle. It can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level. It can be divided into universal flash storage (UFS), embedded Multi Media Card (eMMC), etc. according to the storage specification.
[0226] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0227] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0228] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0229] The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 110. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 110, the screen display detection method executed on the electronic device 100 in the above embodiment can be implemented to implement the screen display detection function of the electronic device 100.
[0230] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0231] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In one embodiment of the present application, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0232] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0233] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0234] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0235] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm Open Mobile Terminal Platform (OMTP) standard interface or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
[0236] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0237] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0238] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0239] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In one embodiment of the present application, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100. An embodiment of the present application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on the electronic device 100, the electronic device 100 executes the above-mentioned related method steps to implement the privacy protection method in the above-mentioned embodiment.
[0240] The embodiment of the present application also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement the privacy protection method in the above-mentioned embodiment.
[0241] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the privacy protection method in the above-mentioned method embodiments.
[0242] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.
[0243] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0244] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0245] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0246] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0247] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially 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, and the software product is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (RandomAccess Memory, RAM), disk or optical disk and other media that can store program code.
[0248] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A privacy protection method, applied to an electronic device, characterized in that: The method comprises: Detecting the ambient light brightness of the environment in which the electronic device is located; If the ambient light brightness is greater than or equal to a preset value, controlling the low-power camera to capture a first image; Invoke a first target detection model running on a low-power chip to detect whether the first image contains a target object; If it is detected that the first image contains a target object, calling the first target recognition model run by the low-power chip to detect whether the target object in the first image matches a preset target object; If the target object in the first image does not match the preset target object, in response to the private data received by the electronic device, the private data is prompted using a preset notification method.
2. The privacy protection method according to claim 1, characterized in that: The using the preset notification method to prompt the private data includes: If the target object in the first image does not match the preset target object, the first target recognition service of the kernel layer of the electronic device reports the result of user identity recognition failure to the second target recognition service of the hardware abstraction layer of the electronic device; The second target identification service reports the result of the user identity identification failure to a third target identification service of the application layer of the electronic device; The third target identification service sends the result of the user identity identification failure to the target application that receives the private data, and the target application prompts the private data using the preset notification method according to the result of the user identity identification failure.
3. The privacy protection method according to claim 2, characterized in that: The using the preset notification method to prompt the privacy data also includes: If the target object in the first image does not match the preset target object, the first target recognition service compares the result of the user identity recognition failure with the result of the last user identity recognition; If the last user identity recognition result is a recognition failure, the target application prompts the private data using the preset notification method according to the last user identity recognition result.
4. The privacy protection method according to claim 3, characterized in that: The using the preset notification method to prompt the privacy data also includes: If the last user identity recognition result is a successful recognition, the first target recognition service reports the user identity recognition failure result to the second target recognition service.
5. The privacy protection method according to claim 1, characterized in that: The method further comprises: If the target object in the first image matches the preset target object, in response to the private data received by the electronic device, the private data is displayed using the preset notification method.
6. The privacy protection method according to claim 5, characterized in that: The method further comprises: If it is detected that the first image contains the target object, determining whether a frame rate of the first image containing the target object is greater than or equal to a preset frame rate; If the frame rate of the target object in the first image is greater than or equal to a preset frame rate, the private data is displayed or prompted using the preset notification method according to the last user identity recognition result.
7. The privacy protection method according to claim 6, characterized in that: The method further comprises: If the frame rate of the target objects in the first image is greater than or equal to a preset frame rate, determining whether the number of the target objects in the first image has not changed; If the number of the target objects in the first image does not change, the private data is displayed or prompted using the preset notification method according to the last user identity recognition result.
8. The privacy protection method according to claim 5, characterized in that: The displaying of the private data by using a preset notification method includes: If the target object in the first image matches the preset target object, the first target recognition service of the kernel layer of the electronic device reports the result of successful user identity recognition to the second target recognition service of the hardware abstraction layer of the electronic device; The second target identification service reports the result of successful user identification to a third target identification service at the application layer of the electronic device; The third target identification service sends the result of successful user identity identification to the target application, and the target application displays the private data using the preset notification method according to the result of successful user identity identification.
9. The privacy protection method according to claim 8, characterized in that: The displaying of the private data by using a preset notification method includes: If the target object in the first image matches the preset target object, the first target recognition service compares the result of successful user identity recognition with the result of the last user identity recognition; If the last user identity recognition result is a successful recognition, the target application displays the private data using the preset notification method according to the last user identity recognition result.
10. The privacy protection method according to claim 8, characterized in that: The displaying of the private data by using a preset notification method includes: If the target object in the first image matches the preset target object, the first target recognition service compares the result of successful user identity recognition with the result of the last user identity recognition; If the last user identity recognition result is an recognition failure, the first target recognition service reports the result of the user identity recognition success to the second target recognition service.
11. The privacy protection method according to claim 1, characterized in that: The calling of the first target detection model to be run by the low-power chip to detect whether the first image contains a target object includes: Detecting target features in the first image using the first target detection model; If the target feature in the first image is not detected, determining that the first image does not contain the target object; or If the target feature in the first image is detected, it is determined that the first image contains the target object.
12. The privacy protection method according to claim 1, wherein: The calling of the first target recognition model executed by the low-power chip to detect whether the target object in the first image matches the preset target object includes: Extracting a first feature vector of the first image by using the first object recognition model; Calculating the similarity between a first feature vector of the first image and a second feature vector of the preset target object; If the similarity between the first feature vector of the first image and the second feature vector of the preset target object is greater than or equal to a preset similarity threshold, determining that the target object in the first image matches the preset target object; or If the similarity between the first feature vector of the first image and the second feature vector of the preset target object is less than the preset similarity threshold, it is determined that the target object in the first image does not match the preset target object.
13. The privacy protection method according to claim 1, wherein: The preset notification methods include pop-up window display, notification information bar display and lock screen interface display.
14. The privacy protection method according to claim 1, wherein: The method further comprises: If the target object in the first image does not match the preset target object, responding to the access request to the application, determining whether the application is a private application; If the application is a private application, do not respond to the access request; or If the application is not a private application, determining whether the application contains private data; If the application contains private data, the private data is hidden.
15. The privacy protection method according to claim 1, wherein: The method further comprises: If the target object in the first image does not match the preset target object, operation on the private data is prohibited.
16. The privacy protection method according to claim 1, characterized in that: The method further comprises: If the ambient light brightness is less than the preset value, controlling the time-of-flight camera to capture a second image; Invoke a second target detection model executed by the processor to detect whether the second image contains the target object; If it is detected that the second image contains the target object, calling the second target recognition model run by the processor to detect whether the target object in the second image matches the preset target object; If it is detected that the target object in the second image does not match the preset target object, in response to the privacy data received by the electronic device, the preset notification method is used to prompt the privacy data.
17. The privacy protection method according to claim 16, characterized in that: The method further comprises: If the target object in the second image matches the preset target object, the private data is displayed using the preset notification method.
18. The privacy protection method according to claim 1, characterized in that: Both the first target detection model and the first target recognition model adopt low-power model parameters, wherein the low-power model parameters include operator type, number of channels, quantization method, number of parameter storage bits, number of feature map bits, number of feature vectors and data type.
19. An electronic device, characterized in that: The electronic device comprises a memory and a processor: Wherein, the memory is used to store program instructions; The processor is used to read and execute the program instructions stored in the memory. When the program instructions are executed by the processor, the electronic device executes the privacy protection method as described in any one of claims 1 to 18.
20. A chip coupled to a memory in an electronic device, characterized in that: The chip is used to control the electronic device to execute the privacy protection method as described in any one of claims 1 to 18.
21. A computer storage medium, characterized in that The computer storage medium stores program instructions, and when the program instructions are executed on an electronic device, a processor of the electronic device executes the privacy protection method according to any one of claims 1 to 18.
Citation Information
Patent Citations
Code scanning method and mobile terminal
CN110516488A
Face recognition method and electronic equipment
CN110852217A
Method and device for realizing dynamic icon of video file
CN112346616A
Notification display method, mobile terminal and storage medium
CN112486619A
Low-power-consumption face recognition method based on TinyML
CN113391695A