Privacy protection method, privacy protection device, electronic device and storage medium

By batch suspending and modifying the application status to invisible in the privacy mode of electronic devices, the broadcast storm problem when disabling the application is solved, and efficient and reliable privacy protection is achieved.

CN118445836BActive Publication Date: 2025-08-15HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311636309.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-08-15
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

In confidential meeting scenarios, when electronic devices disable multiple applications, it will cause a large number of disabling broadcast information to be disabled, causing broadcast storms, and affecting the efficiency and reliability of the privacy protection process.

Method used

By calling the batch suspend interface in the privacy mode of the electronic device, multiple applications to be suspended are batch suspended, and their status is modified to be invisible, and only one suspended broadcast information is sent to avoid sending disable broadcast information separately.

Benefits of technology

It effectively prevents broadcast storms during the privacy protection process, improves the reliability and efficiency of the privacy mode, and ensures visibility query and control of application status switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118445836B_ABST
    Figure CN118445836B_ABST
Patent Text Reader

Abstract

The present application discloses a privacy protection method, a privacy protection device, an electronic device, and a storage medium. The privacy protection method includes: when the application layer determines that the privacy mode of the electronic device has been triggered, calling a batch suspension interface to batch suspend multiple applications associated with the privacy mode to be suspended; the application framework layer switches the application state of each suspended application from a visible state to an invisible state; and the application framework layer sends a suspension broadcast message to a registered broadcast receiver of the application layer, where the suspension broadcast message carries the invisible states of the multiple suspended applications. This method enables the batch suspension of multiple privacy protection applications by calling a batch suspension interface when the privacy mode of the electronic device is triggered, and only sends one broadcast message, avoiding the need to send a corresponding disable broadcast message when disabling each privacy protection application, thereby preventing the occurrence of broadcast storms during the privacy protection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and in particular to a privacy protection method, a privacy protection device, an electronic device, and a storage medium. Background Art

[0002] With the popularization of electronic devices, especially smart mobile terminals such as mobile phones, more and more applications are integrated into mobile phones, involving all aspects of people's daily lives, such as instant messaging, mobile payment, etc.

[0003] In some private scenarios, there is a need for privacy protection of electronic devices. For example, in a confidential meeting scenario, the user hopes that only basic communication function applications can be used on the electronic device, and other applications are disabled.

[0004] Currently, in confidential meeting scenarios, electronic devices meet the privacy protection requirements by disabling all applications other than basic communication functions in batches. However, when each other application in an electronic device is disabled, the electronic device will send a corresponding disablement broadcast message. If an electronic device disables a large number of other applications, the electronic device will send a large number of disablement broadcast messages, resulting in a broadcast storm during the privacy protection process. Summary of the Invention

[0005] In view of this, embodiments of the present application provide a privacy protection method, a privacy protection device, an electronic device, and a storage medium to overcome the above problems of the prior art.

[0006] In the first aspect, an embodiment of the present application provides a privacy protection method, which is applied to an electronic device, wherein the electronic device includes an application layer and an application framework layer. The privacy protection method includes: when the application layer determines that the privacy mode of the electronic device is triggered, calling a batch suspension interface to batch suspend multiple applications to be suspended that are associated with the privacy mode; the application framework layer switches the application state of each suspended application from a visible state to an invisible state; the application framework layer sends a suspension broadcast message to a registered broadcast receiver of the application layer, and the suspension broadcast message carries the invisible state of multiple suspended applications.

[0007] The solution provided in this application suspends multiple privacy protection applications in batches by calling a batch suspension interface when the privacy mode of an electronic device is triggered, modifies the application status of each privacy protection application to an invisible state, and only sends one suspension broadcast message, avoiding sending corresponding disable broadcast information separately when disabling each privacy protection application, thereby preventing the occurrence of broadcast storms during the privacy protection process.

[0008] Among them, in some optional embodiments, the application framework layer switches the application state of each suspended application from a visible state to an invisible state, including: the application framework layer modifies the application package information of each suspended application from visible application package information to invisible application package information through the package management service, the visible application package information is used to represent that the corresponding application is in a visible state, and the invisible application package information is used to represent that the corresponding application is in an invisible state; the application framework layer stores the invisible application package information to the initial package information file through the package management service to obtain the first target package information file.

[0009] The solution provided by this embodiment realizes changing the application status of a suspended application to an invisible state by changing the application package information of the suspended application to invisible application package information.

[0010] Among them, in some optional embodiments, the privacy protection method also includes: the application layer receives a first application query request; the application layer responds to the first application query request and sends a first query instruction to the application framework layer; the application framework layer queries the first target application package information of the first target application from the first target package information file through the package management service according to the first query instruction, and the first target application package information is visible application package information; the application framework layer sends the first target application package information to the application layer.

[0011] The solution provided in this embodiment realizes the determination of application visibility by querying application package information through the package management service in privacy mode, which is beneficial for users to confirm whether the privacy protection application is in an invisible state based on the application visibility query result.

[0012] Among them, in some optional embodiments, the privacy protection method also includes: the application layer sends a first startup request to the application framework layer, and the first startup request is used to start the second target application; the application framework layer responds to the first startup request, queries the application status of the second target application from the first target package information file through the activity management service, obtains the first application status query result, and controls the second target application based on the first application status query result, and the first application status query result includes a first visible status result for characterizing that the application package information of the second target application is visible application package information, and a first invisible status result for characterizing that the application package information of the second target application is invisible application package information.

[0013] The solution provided in this embodiment realizes determining application visibility by querying application package information through the activity management service in privacy mode, so that the application framework layer prevents the running of invisible applications based on the first application status query result.

[0014] Among them, in some optional embodiments, the application framework layer controls the second target application based on the first application status query result, including: when the first application status query result is a first visible status result, the application framework layer starts the second target application through the activity management service; when the first application status query result is a first invisible status result, the application framework layer prevents the second target application from running through the activity management service.

[0015] The solution provided by this embodiment ensures that when the application framework layer finds that the application state of the second target application is invisible, it prevents the second target application from being started in the privacy scenario, thereby ensuring high reliability of the privacy mode.

[0016] Among them, in some optional embodiments, the application framework layer switches the application state of each suspended application from a visible state to an invisible state, including: the application framework layer modifies the application component information of each suspended application from visible application component information to invisible application component information through the package management service, the visible application component information is used to represent that the corresponding application is in a visible state, and the invisible application component information is used to represent that the corresponding application is in an invisible state; the application framework layer stores the invisible application component information to the initial package information file through the package management service to obtain a second target package information file.

[0017] The solution provided by this embodiment realizes changing the application state of a suspended application to an invisible state by changing the application component information of the suspended application to invisible application component information.

[0018] Among them, in some optional embodiments, the privacy protection method also includes: the application layer receives a second application query request; the application layer responds to the second application query request and sends a second query instruction to the application framework layer; the application framework layer queries the third target application component information of the third target application from the second target package information file through the package management service according to the second query instruction, and the third target application package information corresponding to the third target application component information is visible application package information, and the visible application package information is used to indicate that the corresponding application is in a visible state; the application layer receives the third target application component information returned by the package management service; the application framework layer sends the third target application component information to the application layer.

[0019] The solution provided in this embodiment realizes the determination of application visibility by querying application component information through the package management service in privacy mode, which is beneficial for users to confirm whether the privacy protection application is in an invisible state based on the application visibility query results.

[0020] Among them, in some optional embodiments, the privacy protection method also includes: the application layer sends a second startup request to the application framework layer, and the second startup request is used to start the fourth target application; the application framework layer responds to the second startup request, queries the application status of the fourth target application from the second target package information file through the activity management service, obtains the second application status query result, and controls the fourth target application based on the second application status query result, and the second application status query result includes a second visible status result for characterizing that the application package information of the fourth target application is visible application package information, and a second invisible status result for characterizing that the application package information of the fourth target application is invisible application package information.

[0021] The solution provided in this embodiment realizes determining application visibility by querying application component information through the activity management service in privacy mode, so that the application framework layer prevents the running of invisible applications based on the second application state query result.

[0022] Among them, in some optional embodiments, the application framework layer controls the fourth target application based on the second application status query result, including: when the second application status query result is a second visible status result, the application framework layer starts the fourth target application through the activity management service; when the second application status query result is a second invisible status result, the application framework layer prevents the fourth target application from running through the activity management service.

[0023] The solution provided by this embodiment ensures that when the application framework layer finds that the application state of the fourth target application is invisible, it prevents the fourth target application from being started in the privacy scenario, thereby ensuring high reliability of the privacy mode.

[0024] Among them, in some optional embodiments, the privacy protection method also includes: the application layer receives a first exit privacy instruction; the application layer responds to the first exit privacy instruction, calls the batch suspension interface to unsuspend each suspended application associated with the privacy mode; the application framework layer switches the application state of each unsuspended application from an invisible state to a visible state; the application framework layer sends an unsuspend broadcast message to a registered broadcast receiver, and the unsuspend broadcast message carries the visible state of multiple unsuspended applications.

[0025] The solution provided in this embodiment implements the batch unsuspending of multiple privacy protection applications by calling a batch suspension interface when the electronic device exits privacy mode, and modifies the application status of each privacy protection application to a visible state. Only one unsuspend broadcast message is sent, avoiding the need to send a corresponding restore broadcast message when restoring the visibility of each privacy protection application separately, thereby preventing the occurrence of broadcast storms during the exit from privacy protection.

[0026] In the second aspect, an embodiment of the present application provides a privacy protection method, which is applied to an electronic device, and the electronic device includes an application layer, an application framework layer and a data layer. The privacy protection method includes: when the application layer determines that the privacy mode of the electronic device is triggered, sending a privacy protection instruction to the application framework layer; the application framework layer sends a privacy protection information acquisition instruction to the data layer according to the privacy protection instruction, and the data layer pre-stores a preset application list associated with the privacy mode, and the preset application list includes multiple privacy protection application information and multiple non-privacy protection application information; the data layer responds to the privacy protection information acquisition instruction and sends multiple privacy protection application information to the application framework layer; the application framework layer batch closes multiple privacy protection applications according to the multiple privacy protection application information.

[0027] The solution provided in this embodiment realizes that when the privacy mode of the electronic device is triggered, multiple privacy protection applications associated with the privacy mode are closed in batches without sending a closing broadcast message, thereby avoiding sending a corresponding disabling broadcast message when disabling each privacy protection application separately, and preventing the occurrence of broadcast storms during the privacy protection process.

[0028] Among them, in some optional embodiments, the privacy protection method also includes: the application layer receives a third application query request; the application layer responds to the third application query request and sends a third query instruction to the application framework layer; the application framework layer sends a non-privacy protection information acquisition instruction to the data layer according to the third query instruction; the data layer responds to the non-privacy protection information acquisition instruction and sends multiple non-privacy protection application information to the application framework layer; the application framework layer forwards multiple non-privacy protection application information to the application layer.

[0029] The solution provided by this embodiment realizes the query of non-privacy protection applications in privacy mode, which helps users confirm whether the privacy protection application is in an invisible state based on the query results of the non-privacy protection applications.

[0030] Among them, in some optional embodiments, the privacy protection method also includes: the application layer sends a third startup request to the application framework layer, and the third startup request is used to start the fifth target application; the application framework layer responds to the third startup request and sends a confirmation instruction carrying the fifth target application information of the fifth target application to the data layer; the data layer responds to the confirmation instruction, confirms whether the fifth target application is a non-privacy protection application, and sends a confirmation result to the application framework layer, the confirmation result includes a first confirmation result used to characterize that the fifth target application belongs to a non-privacy protection application, and a second confirmation result used to characterize that the fifth target application does not belong to a non-privacy protection application; the application framework layer controls the fifth target application according to the confirmation result.

[0031] The solution provided in this embodiment realizes querying whether the fifth target application is a non-privacy protection application according to the preset application list in privacy mode, so that the application framework layer prevents the fifth target application from being started when it is found that the fifth target application is a privacy protection application.

[0032] Among them, in some optional embodiments, the application framework layer controls the fifth target application according to the confirmation result, including: when the confirmation result is a first confirmation result, the application framework layer starts the fifth target application through the activity management service; when the confirmation result is a second confirmation result, the application framework layer prevents the fifth target application from running through the activity management service.

[0033] The solution provided by this embodiment ensures that when the application framework layer inquires that the fifth target application is a privacy protection application, it prevents the fifth target application from being started in a privacy scenario, thereby ensuring high reliability of the privacy mode.

[0034] Among them, in some optional embodiments, the privacy protection method also includes: the application layer receives a second exit privacy instruction; the application layer responds to the second exit privacy instruction and sends a recovery instruction to the application framework layer; the application framework layer starts multiple privacy protection applications according to the recovery instruction.

[0035] The solution provided in this embodiment enables batch startup of multiple privacy protection applications when an electronic device exits privacy mode, without sending a resume startup broadcast message. This avoids sending a corresponding resume startup broadcast message separately when resuming startup of each privacy protection application, thereby preventing the occurrence of a broadcast storm during the exit from privacy protection.

[0036] On the third aspect, an embodiment of the present application provides a privacy protection device, which is applied to an electronic device. The electronic device includes an application layer and an application framework layer. The privacy protection device includes a suspension call module, an invisible switching module, and a suspension broadcast module. The suspension call module is used to call a batch suspension interface to suspend multiple applications to be suspended in batches that are associated with the privacy mode when the application layer determines that the privacy mode of the electronic device is triggered; the invisible switching module is used for the application framework layer to switch the application state of each suspended application from a visible state to an invisible state; the suspension broadcast module is used for the application framework layer to send a suspension broadcast message to a registered broadcast receiver of the application layer, and the suspension broadcast message carries the invisible state of multiple suspended applications.

[0037] In a fourth aspect, an embodiment of the present application provides a privacy protection device, which is applied to an electronic device. The electronic device includes an application layer, an application framework layer, and a data layer. The privacy protection device includes a privacy protection sending module, a privacy protection acquisition module, a privacy information sending module, and a closing module. The privacy protection sending module is used to send a privacy protection instruction to the application framework layer when the application layer determines that the privacy mode of the electronic device is triggered; the privacy protection acquisition module is used for the application framework layer to send a privacy protection information acquisition instruction to the data layer according to the privacy protection instruction. The data layer pre-stores a preset application list associated with the privacy mode, and the preset application list includes multiple privacy protection application information and multiple non-privacy protection application information; the privacy information sending module is used for the data layer to respond to the privacy protection information acquisition instruction and send multiple privacy protection application information to the application framework layer; the closing module is used for the application framework layer to close multiple privacy protection applications according to the multiple privacy protection application information.

[0038] In the fifth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the electronic device executes the privacy protection method provided in the first or second aspect above.

[0039] In the sixth aspect, an embodiment of the present application provides a chip for use in an electronic device. The chip includes a processor, which is used to read and execute a computer program stored in a memory. When the computer program is executed by the processor, the electronic device can execute the privacy protection method provided in the first or second aspect above.

[0040] In some optional embodiments, the chip further includes a memory, and the memory is connected to the processor via a circuit or wire.

[0041] In some optional embodiments, the chip further includes a communication interface.

[0042] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, in which program code is stored. The program code can be called by an electronic device to execute the privacy protection method provided in the first or second aspect above.

[0043] In an eighth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the privacy protection method provided in the first or second aspect above.

[0044] It can be understood that the beneficial effects of the third to eighth aspects mentioned above can be found in the relevant descriptions in the first or second aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0046] Figure 1 A schematic structural diagram of a software system of an electronic device provided in an embodiment of the present application is shown.

[0047] Figure 2 A flowchart of the privacy protection method provided in an embodiment of the present application is shown.

[0048] Figure 3 A schematic diagram of an application scenario in which an electronic device is in a privacy mode in the privacy protection method provided in an embodiment of the present application is shown.

[0049] Figure 4 A flowchart of a privacy protection method in an application scenario provided by an embodiment of the present application is shown.

[0050] Figure 5 A flowchart of a privacy protection method in another application scenario provided by an embodiment of the present application is shown.

[0051] Figure 6 Another flowchart of the privacy protection method provided in an embodiment of the present application is shown.

[0052] Figure 7 A flowchart of a privacy protection method in another application scenario provided by an embodiment of the present application is shown.

[0053] Figure 8 A structural block diagram of a privacy protection device provided in an embodiment of the present application is shown.

[0054] Figure 9 Another structural block diagram of the privacy protection device provided in an embodiment of the present application is shown.

[0055] Figure 10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0056] Figure 11 A functional block diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0057] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.

[0058] The disclosure below provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or reference letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0059] With the popularization of electronic devices, especially smart mobile terminals such as mobile phones, more and more applications are integrated into mobile phones, involving all aspects of people's daily lives, such as instant messaging, mobile payment, etc.

[0060] In some private scenarios, there is a need for privacy protection of electronic devices. For example, in a confidential meeting scenario, the user hopes that only basic communication function applications can be used on the electronic device, and other applications are disabled.

[0061] Currently, in confidential meeting scenarios, electronic devices meet the privacy protection requirements by disabling all applications other than basic communication functions in batches. However, when each other application in an electronic device is disabled, the electronic device will send a corresponding disablement broadcast message. If an electronic device disables a large number of other applications, the electronic device will send a large number of disablement broadcast messages, resulting in a broadcast storm during the privacy protection process.

[0062] In response to the above problems, the privacy protection method, privacy protection device, electronic device and storage medium provided in the embodiments of the present application, the privacy protection method is applied to the electronic device, and the electronic device includes an application layer and an application framework layer. When the application layer determines that the privacy mode of the electronic device is triggered, the batch suspension interface is called to batch suspend multiple applications to be suspended that are associated with the privacy mode. The application framework layer switches the application state of each suspended application from a visible state to an invisible state. The application framework layer sends a suspension broadcast message to the registered broadcast receiver of the application layer. The suspension broadcast message carries the invisible state of multiple suspended applications. When the privacy mode of the electronic device is triggered, multiple privacy protection applications are suspended in batches by calling the batch suspension interface, and the application state of each privacy protection application is modified to an invisible state, and only one suspension broadcast message is sent, so as to avoid sending the corresponding disable broadcast message separately when disabling each privacy protection application, thereby preventing the occurrence of broadcast storms during the privacy protection process.

[0063] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0064] The privacy protection method provided in the embodiments of the present application can be applied to electronic devices. Electronic devices can include various terminal devices, which can also be called terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc.

[0065] The terminal device may be a mobile phone, a robot vacuum, a drone, a smart TV, a wearable device, a personal digital assistant (PDA), a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal used in industrial control, a wireless terminal used in self-driving, a wireless terminal used in remote medical surgery, a wireless terminal used in smart grids, a wireless terminal used in transportation safety, a wireless terminal used in smart cities, a wireless terminal used in smart homes, etc. The terminal device type is not limited here and can be set according to actual needs.

[0066] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.

[0067] See also Figure 1 , which shows a schematic diagram of the structure of the software system of an electronic device provided by one embodiment of the present application. The software system includes several layers, each with a clear role and division of labor, and communication between layers via software interfaces. In some embodiments, the Android system is divided into four layers: application layer, application framework layer, system library layer, and kernel layer, from top to bottom.

[0068] The application layer may include a series of applications. For example, the application layer may include a camera, a gallery, calls, wireless local area networks (WLAN), music, video, a media provider (MediaProvider), a FUSE (Filesystem in Userspace) file system, and the like.

[0069] The Media Provider is used to create multimedia files in the FUSE file system or access multimedia files in the FUSE file system. Each application in the application layer can create multimedia files in the FUSE file system through the Media Provider or access multimedia files in the FUSE file system through the Media Provider.

[0070] The FUSE file system is used to store the multimedia files that the media provider creates. Of course, in other embodiments, the FUSE file system also can be used to store other data.

[0071] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, content provider, resource manager, view system, package management service (PMS), and activity management service (AMS).

[0072] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0073] Content providers are used to store and retrieve data and make it accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0074] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0075] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0076] The Package Manager service, as a package manager, is responsible for installing, managing, and uninstalling applications on Android devices. It scans designated directories on the system for files ending in APK, parses these files, and extracts all application information, storing it in packages.xml.

[0077] When a new application is installed, the package management service will identify all components of the application (such as activities, services, and broadcast receivers) and assign corresponding permissions to these components. At the same time, the package management service also monitors the status of installed applications to ensure the integrity and security of the applications.

[0078] The package management service also manages the application's DE (Device Encrypted) and CE (Credential Encrypted) data. The DE data key is only accessible after the system has performed a verified boot. The CE directory encrypts data using a key associated with a user's authentication method (e.g., pattern, password, etc.), which is only accessible after the user has authenticated.

[0079] The CE directory of the application may include the original uid of the application. The package management service is used to execute the file management method of this embodiment.

[0080] The Activity Management Service, as the activity manager service, is primarily responsible for managing and tracking the activity tasks and lifecycles of all applications. When an application is opened, the Activity Management Service starts the application's process and allocates processor resources and memory to it. When the application is no longer in the foreground or background, or when the system runs low on memory, the Activity Management Service terminates or kills the application's process.

[0081] System libraries may include Surface Manager, Media Libraries, Android Rruntime, etc.

[0082] The Android runtime consists of core libraries and a virtual machine (VM). The Android runtime is responsible for scheduling and management of the Android system. The core libraries consist of two parts: one containing the Java language's callable functions and the other the Android core library. The application layer and the application framework layer run in the VM. The VM executes the Java files in the application and framework layers as binary files. The VM is responsible for managing object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0083] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0084] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0085] The kernel layer can include modules such as audio driver, display driver, Wi-Fi driver, Bluetooth driver, and sensor driver.

[0086] also, Figure 1 Also shown is a data layer related to the software system, which is used to store data preset by the user. For example, the data layer may pre-store data related to the privacy mode of the electronic device.

[0087] It is understandable that Figure 1 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer layers than shown, and each layer may include more or fewer components, and this application does not limit this.

[0088] It should be noted that although the embodiment of the present application is described using the Android system as an example, its basic principles are also applicable to Electronic devices using operating systems such as Harmony.

[0089] See also Figure 2 , which shows a flowchart of a privacy protection method provided by an embodiment of the present application. In a specific embodiment, the privacy protection method can be applied to electronic devices. Figure 2The process shown is described in detail, and the privacy protection method may include the following steps S110 to S130.

[0090] Step S110: When the application program layer determines that the privacy mode of the electronic device is triggered, the batch suspension interface is called to batch suspend multiple to-be-suspended applications associated with the privacy mode.

[0091] In the embodiment of the present application, the electronic device can be set with multiple scene modes, such as normal use mode, flight mode and privacy mode. In normal use mode, all applications of the electronic device can be used for normal communication. In flight mode, all applications of the electronic device cannot be used for communication. In privacy mode, some applications of the electronic device associated with the privacy mode (i.e., privacy protection applications) are invisible and unusable, such as Figure 3 As shown, it shows a schematic diagram of an application scenario in which an electronic device is in privacy mode.

[0092] The electronic device is equipped with a batch suspension interface that can be used to suspend multiple applications in batches. After suspension, the applications are in a suspended state. When the application layer determines that the privacy mode of the electronic device has been triggered, it can call the batch suspension interface to suspend multiple applications associated with the privacy mode in batches. After being suspended, the multiple applications are in a suspended state.

[0093] In some embodiments, the application layer is provided with a privacy mode application, and the user can click on the privacy mode application icon associated with the privacy mode application on the electronic device. The application layer perceives the user's click operation through the privacy mode application, and the application layer determines that the privacy mode of the electronic device is triggered.

[0094] In some embodiments, the application layer is provided with a privacy mode application, and the electronic device may further include a voice recognition module. The user can send a voice message carrying a privacy protection instruction within the voice collection range of the voice recognition module. The voice recognition module collects the voice information and performs voice recognition on the voice information to obtain the privacy protection instruction, and generates a trigger signal for triggering the privacy mode application according to the privacy protection instruction. The application layer perceives the trigger signal sent by the voice recognition module through the privacy mode application and determines that the privacy mode of the electronic device is triggered.

[0095] In some embodiments, the application layer is provided with a privacy mode application, and the user can send a privacy protection instruction to the client. The client receives and responds to the privacy protection instruction and sends a corresponding trigger instruction signal to the privacy mode application. The application layer perceives the trigger signal sent by the client through the privacy mode application and determines that the privacy mode of the electronic device is triggered.

[0096] The client can connect to the privacy mode application through the network and interact with the privacy mode application through the network.

[0097] The client can be any one of a mobile client (for example, a mobile phone client, a personal digital assistant (PDA) client, a tablet personal computer (Tablet PC) client, a laptop client, a smart watch client, a smart bracelet client or a wearable client, etc.) or a fixed client (for example, a desktop computer client, a smart panel client, etc.). The type of client is not limited here and can be set according to actual needs.

[0098] The network can be any one of a ZigBee network, a Bluetooth (BT) network, a Wireless Fidelity (Wi-Fi) network, a Thread network, a Long Range Radio (LoRa) network, a Low-Power Wide-Area Network (LPWAN), an infrared network, a Narrow Band Internet of Things (NB-IoT), a Controller Area Network (CAN), a Digital Living Network Alliance (DLNA) network, a Wide Area Network (WAN), a Local Area Network (LAN), a Metropolitan Area Network (MAN) or a Wireless Personal Area Network (WPAN), etc. The type of network is not limited here and can be set according to actual needs.

[0099] Step S120: the application framework layer switches the application state of each suspended application from a visible state to an invisible state.

[0100] In an embodiment of the present application, when the application layer determines that the privacy mode of the electronic device is triggered, it calls the batch suspension interface to batch suspend multiple applications to be suspended that are associated with the privacy mode. Then, it can send a first modification request to the application framework layer. The application framework layer receives and responds to the first modification request, and switches the application state of each suspended application from a visible state to an invisible state.

[0101] The application being in a visible state indicates that the application can be queried by the package management service, and the application being in an invisible state indicates that the application cannot be queried by the package management service.

[0102] In some embodiments, when the application layer determines that the privacy mode of the electronic device is triggered, it calls the batch suspension interface to batch suspend multiple applications to be suspended that are associated with the privacy mode, and then sends a first modification request to the application framework layer. The application framework layer receives and responds to the first modification request, modifies the application package information of each suspended application from visible application package information to invisible application package information through the package management service, and stores the invisible application package information in the initial package information file through the package management service to obtain a first target package information file, thereby realizing the modification of the application status of the suspended application to an invisible state by modifying the application package information of the suspended application to the invisible application package information.

[0103] The visible application package information may be used to indicate that the corresponding application is in a visible state, and the invisible application package information may be used to indicate that the corresponding application is in an invisible state.

[0104] In some embodiments, when the application layer determines that the privacy mode of the electronic device is triggered, it calls the batch suspension interface to batch suspend multiple applications to be suspended that are associated with the privacy mode, and then sends a first modification request to the application framework layer. The application framework layer receives and responds to the first modification request, modifies the application component information of each suspended application from visible application component information to invisible application component information through the package management service, and stores the invisible application component information in the initial package information file through the package management service to obtain a second target package information file, thereby realizing the modification of the application status of the suspended application to an invisible state by modifying the application component information of the suspended application to invisible application component information.

[0105] The visible application component information may be used to indicate that the corresponding application is in a visible state, and the invisible application component information may be used to indicate that the corresponding application is in an invisible state.

[0106] Step S130: The application framework layer sends a suspension broadcast message to the registered broadcast receiver of the application layer.

[0107] In an embodiment of the present application, after the application framework layer switches the application state of each suspended application from a visible state to an invisible state, it can send a suspension broadcast message to the registered broadcast receiver of the application layer. The suspension broadcast message can carry the invisible state of multiple suspended applications, thereby realizing that when the privacy mode of the electronic device is triggered, multiple privacy protection applications are suspended in batches by calling the batch suspension interface, and the application state of each privacy protection application is modified to an invisible state, and only one suspension broadcast message is sent, thereby avoiding sending corresponding disable broadcast messages separately when disabling each privacy protection application, thereby preventing the occurrence of broadcast storms during the privacy protection process.

[0108] In some embodiments, when a user needs to query an application in privacy mode, a first application query request can be sent to the application layer. The application layer receives the first application query request, responds to the first application query request, and sends a first query instruction to the application framework layer. The application framework layer receives and responds to the first query instruction, queries the first target application package information of the first target application from the first target package information file through the package management service, and sends the first target application package information to the application layer. The application layer receives the first target application package information returned by the application framework layer. The first target application package information is visible application package information, which realizes the determination of application visibility through the query of application package information by the package management service in privacy mode, which is beneficial for users to confirm whether the privacy protection application is in an invisible state based on the application visibility query result.

[0109] In some embodiments, when a user needs to start a second target application in privacy mode, a first start request can be sent to the application layer. The application layer receives the first start request and sends the first start request to the application framework layer. The application framework layer receives the first start request and responds to the first start request. The application status of the second target application is queried from the first target package information file through the activity management service, and the first application status query result is obtained. The second target application is controlled based on the first application status query result, thereby determining the application visibility through the query of the application package information by the activity management service in privacy mode, so that the application framework layer can prevent the invisible application from running based on the first application status query result.

[0110] The first launch request carries second target application information of the second target application, and the first launch request can be used to launch the second target application. The first application status query result includes a first visible status result indicating that the application package information of the second target application is visible application package information, and a first invisible status result indicating that the application package information of the second target application is invisible application package information.

[0111] When the first application status query results in the first visible state, the application framework layer uses the activity management service to start the second target application. When the first application status query results in the first invisible state, the application framework layer uses the activity management service to block the second target application. This ensures that when the application framework layer finds that the second target application's application status is invisible, it prevents the second target application from being started in a privacy scenario, ensuring the high reliability of privacy mode.

[0112] In some embodiments, when a user needs to query an application in privacy mode, a second application query request can be sent to the application layer. The application layer receives the second application query request, responds to the second application query request, and sends a second query instruction to the application framework layer. The application framework layer receives and responds to the second application query instruction, queries the third target application component information of the third target application from the second target package information file through the package management service, and sends the third target application component information to the application layer. The application layer receives the third target application component information returned by the application framework layer. The third target application package information corresponding to the third target application component information is visible application package information, which realizes the determination of application visibility through the query of application component information by the package management service in privacy mode, which is beneficial for users to confirm whether the privacy protection application is in an invisible state based on the application visibility query results.

[0113] In some embodiments, when a user needs to start a fourth target application in privacy mode, a second start request can be sent to the application layer. The application layer receives the second start request and sends the second start request to the application framework layer. The application framework layer receives the second start request and responds to the second start request. The application status of the fourth target application is queried from the second target package information file through the activity management service, and the second application status query result is obtained. The fourth target application is controlled based on the second application status query result, thereby determining the application visibility by querying the application component information through the activity management service in privacy mode, so that the application framework layer can prevent the invisible application from running based on the second application status query result.

[0114] The second launch request carries fourth target application information of the fourth target application, and the second launch request can be used to launch the fourth target application. The second application status query result can include a second visible status result indicating that the application package information of the fourth target application is visible application package information, and a second invisible status result indicating that the application package information of the fourth target application is invisible application package information.

[0115] When the second application status query results in the second visible state, the application framework layer uses the activity management service to start the fourth target application. When the second application status query results in the second invisible state, the application framework layer uses the activity management service to block the fourth target application. This ensures that when the application framework layer finds that the fourth target application's application status is invisible, it prevents the fourth target application from being started in a privacy scenario, ensuring the high reliability of privacy mode.

[0116] In some embodiments, when a user needs to exit privacy mode, a first exit privacy instruction can be sent to the application layer. The application layer receives and responds to the first exit privacy instruction, calls the batch suspension interface to unsuspend each suspended application associated with the privacy mode, and sends a second modification request to the application framework layer. The application framework layer receives and responds to the second modification request, switches the application state of each unsuspended application from an invisible state to a visible state, and sends an unsuspension broadcast message to the registered broadcast receiver of the application layer. The unsuspension broadcast message can carry the visible state of multiple unsuspended applications, so that when the electronic device exits privacy mode, multiple privacy protection applications can be unsuspended in batches by calling the batch suspension interface, and the application state of each privacy protection application can be modified to a visible state, and only one unsuspension broadcast message is sent, so as to avoid sending corresponding recovery broadcast messages separately when restoring the visibility of each privacy protection application, thereby preventing the occurrence of broadcast storms during the exit from privacy protection.

[0117] As an implementation method, the application package information of each unsuspended application is invisible application package information. The application layer can send a second modification request to the application framework layer. The application framework layer receives and responds to the second modification request, and modifies the application package information of each unsuspended application from invisible application package information to visible application package information through the package management service, and stores the visible application package information in the first target package information file through the package management service to obtain the third target package information file, thereby realizing the modification of the application status of the unsuspended application to a visible status by modifying the application package information of the unsuspended application to visible application package information.

[0118] As an implementation method, the application component information of each unsuspended application is invisible application component information. The application layer can send a second modification request to the application framework layer. The application framework layer receives and responds to the second modification request, and modifies the application component information of each unsuspended application from invisible application component information to visible application component information through the package management service, and stores the visible application component information in the second target package information file through the package management service to obtain a fourth target package information file, thereby realizing the modification of the application status of the unsuspended application to a visible status by modifying the application component information of the unsuspended application to visible application component information.

[0119] In one application scenario, such as Figure 4 As shown, the electronic device may include an application layer and an application framework layer, and the privacy inclusion method may include steps S1001 to S1014.

[0120] Step S1001: The application layer receives a user trigger operation for applying a privacy mode.

[0121] Step S1002: the application layer responds to the triggering operation and calls a batch suspension interface to suspend multiple applications to be suspended that are associated with the privacy mode.

[0122] Step S1003: Send a first modification request to the application framework layer.

[0123] Step S1004: The application framework layer receives and responds to the first modification request, modifies the application package information of each suspended application from visible application package information to invisible application package information through the package management service, and stores the invisible application package information in the initial package information file (packages.xml file).

[0124] Step S1005: The application framework layer sends a suspension broadcast message to the registered broadcast receiver of the application.

[0125] Step S1006: The application program layer receives the first application query request.

[0126] Step S1007: The application layer responds to the first application query request and sends a first application query instruction to the application framework layer.

[0127] Step S1008: The application framework layer queries the first target application package information from the packages.xml file through the package management service according to the first query instruction.

[0128] Step S1009: The application framework layer sends the first target application package information to the application layer.

[0129] Step S1010: The application layer receives a first startup request.

[0130] Step S1011: forwarding the first startup request to the application framework layer.

[0131] Step S1012: the application framework layer responds to the first start request and queries the application status of the second target application from the packages.xml file through the activity management service to obtain a first application status query result.

[0132] The first application status query result includes a first visible status result and a first invisible status result.

[0133] When the first application status query result is a first visible status result, executing step S1013;

[0134] When the first application status query result is a first invisible status result, step S1014 is executed.

[0135] Step S1013: The application framework layer sends a first startup instruction to the application layer to start the second target application.

[0136] Step S1014: the application framework layer sends a first blocking instruction to the application layer to block the second target application from running.

[0137] In one application scenario, such as Figure 5 As shown, the electronic device may include an application layer and an application framework layer, and the privacy inclusion method may include steps S2001 to S2014.

[0138] Step S2001: The application layer receives a user trigger operation for applying a privacy mode.

[0139] Step S2002: The application layer responds to the triggering operation and calls a batch suspension interface to suspend multiple applications to be suspended that are associated with the privacy mode.

[0140] Step S2003: Send a first modification request to the application framework layer.

[0141] Step S2004: The application framework layer receives and responds to the first modification request, modifies the application component information of each suspended application from visible application component information to invisible application component information through the package management service, and stores the invisible application component information in the initial package information file (packages.xml file).

[0142] Step S2005: The application framework layer sends a suspension broadcast message to the registered broadcast receiver of the application.

[0143] Step S2006: The application program layer receives the second application query request.

[0144] Step S2007: The application layer responds to the second application query request and sends a second application query instruction to the application framework layer.

[0145] Step S2008: The application framework layer queries the third target application component information from the packages.xml file through the package management service according to the second query instruction.

[0146] Step S2009: The application framework layer sends the third target application component information to the application layer.

[0147] Step S2010: The application layer receives a second startup request.

[0148] Step S2011: forwarding the second startup request to the application framework layer.

[0149] Step S2012: the application framework layer responds to the second start request and queries the application state of the fourth target application from the packages.xml file through the activity management service to obtain a second application state query result.

[0150] The second application state query result includes a second visible state result and a second invisible state result.

[0151] When the second application state query result is a second visible state result, executing step S2013;

[0152] When the second application state query result is a second invisible state result, step S2014 is executed.

[0153] Step S2013: The application framework layer sends a second startup instruction to the application layer to start the fourth target application.

[0154] Step S2014: The application framework layer sends a second blocking instruction to the application layer to block the fourth target application from running.

[0155] The privacy protection method provided in this embodiment is applied to an electronic device, which includes an application layer and an application framework layer. When the application layer determines that the privacy mode of the electronic device is triggered, it calls a batch suspension interface to batch suspend multiple applications to be suspended that are associated with the privacy mode. The application framework layer switches the application state of each suspended application from a visible state to an invisible state. The application framework layer sends a suspension broadcast message to a registered broadcast receiver of the application layer. The suspension broadcast message carries the invisible state of multiple suspended applications. When the privacy mode of the electronic device is triggered, multiple privacy protection applications are suspended in batches by calling a batch suspension interface, and the application state of each privacy protection application is modified to an invisible state. Only one suspension broadcast message is sent, so as to avoid sending corresponding disable broadcast messages separately when disabling each privacy protection application, thereby preventing the occurrence of broadcast storms during the privacy protection process.

[0156] See also Figure 6 , which shows a flowchart of a privacy protection method provided by another embodiment of the present application. In a specific embodiment, the privacy protection method can be applied to electronic devices. Figure 6 The process shown is described in detail, and the privacy protection method may include the following steps S210 to S240.

[0157] Step S210: When the application layer determines that the privacy mode of the electronic device is triggered, it sends a privacy protection instruction to the application framework layer.

[0158] In this embodiment, when the application layer determines that the privacy mode of the electronic device is triggered, it can generate and send a privacy protection instruction to the application framework layer, and the application framework layer receives the privacy protection instruction sent by the application layer.

[0159] In some embodiments, the application layer is provided with a privacy mode application, and the user can click on the privacy mode application icon associated with the privacy mode application on the electronic device. The application layer perceives the user's click operation through the privacy mode application, and the application layer determines that the privacy mode of the electronic device is triggered.

[0160] In some embodiments, the application layer is provided with a privacy mode application, and the electronic device may further include a voice recognition module. The user can send a voice message carrying a privacy protection instruction within the voice collection range of the voice recognition module. The voice recognition module collects the voice information and performs voice recognition on the voice information to obtain the privacy protection instruction, and generates a trigger signal for triggering the privacy mode application according to the privacy protection instruction. The application layer perceives the trigger signal sent by the voice recognition module through the privacy mode application and determines that the privacy mode of the electronic device is triggered.

[0161] In some embodiments, the application layer is provided with a privacy mode application, and the user can send a privacy protection instruction to the client. The client receives and responds to the privacy protection instruction and sends a corresponding trigger instruction signal to the privacy mode application. The application layer perceives the trigger signal sent by the client through the privacy mode application and determines that the privacy mode of the electronic device is triggered.

[0162] Step S220: The application framework layer sends a privacy protection information acquisition instruction to the data layer according to the privacy protection instruction.

[0163] In this embodiment, after receiving the privacy protection instruction sent by the application layer, the application framework layer may send a privacy protection information acquisition instruction to the data layer according to the privacy protection instruction.

[0164] The data layer may pre-store a preset application list associated with the privacy mode, where the preset application list includes a plurality of privacy protection application information and a plurality of non-privacy protection application information.

[0165] Step S230: The data layer responds to the privacy protection information acquisition instruction and sends multiple privacy protection application information to the application framework layer.

[0166] In this embodiment, after receiving the privacy protection information acquisition instruction sent by the application framework layer, the data layer responds to the privacy protection information acquisition instruction, reads multiple privacy protection application information in the preset application list, and sends multiple privacy protection application information to the application framework layer.

[0167] Step S240: the application framework layer batch-closes multiple privacy protection applications according to the multiple privacy protection application information.

[0168] In this embodiment, the application framework layer can close multiple privacy protection applications based on multiple privacy protection application information. Each privacy protection application information corresponds to a privacy protection application. When the privacy mode of the electronic device is triggered, multiple privacy protection applications associated with the privacy mode are closed in batches without sending a shutdown broadcast message. This avoids sending corresponding disable broadcast information separately when disabling each privacy protection application, thereby preventing the occurrence of broadcast storms during the privacy protection process.

[0169] In some embodiments, when a user needs to query an application in privacy mode, a third application query request can be sent to the application layer. The application layer receives and responds to the third application query request and sends a third query instruction to the application framework layer. The application framework layer receives and responds to the third query instruction and sends a non-privacy protection information acquisition instruction to the data layer. The data layer receives and responds to the non-privacy protection information acquisition instruction, reads multiple non-privacy protection application information in a preset application list, and sends multiple non-privacy protection application information to the application framework layer. The application framework layer receives multiple non-privacy protection application information and forwards multiple non-privacy protection application information to the application layer, thereby realizing the query of non-privacy protection applications in privacy mode, which is beneficial for users to confirm whether the privacy protection application is in an invisible state based on the queried non-privacy protection application query results.

[0170] In some embodiments, when a user needs to start the fifth target application in privacy mode, a third start request can be sent to the application layer. The application layer receives the third start request and sends the third start request to the application framework layer. The application framework layer receives and responds to the third start request and sends a confirmation instruction carrying the fifth target application information of the fifth target application to the data layer. The data layer receives and responds to the confirmation instruction, confirms whether the fifth target application is a non-privacy protection application based on the fifth target application information, obtains a confirmation result, and sends the confirmation result to the application framework layer. The application framework layer receives the confirmation result returned by the data layer and controls the fifth target application based on the confirmation result, thereby realizing the query of whether the fifth target application is a non-privacy protection application according to the preset application list in privacy mode, so that the application framework layer prevents the fifth target application from being started when it is queried that the fifth target application is a privacy protection application.

[0171] Among them, the third startup request carries the fifth target application information of the fifth target application, the third startup request can be used to start the fifth target application, and the confirmation result may include a first confirmation result used to characterize that the fifth target application belongs to a non-privacy protection application, and a second confirmation result used to characterize that the fifth target application does not belong to a non-privacy protection application.

[0172] If the confirmation result is the first, the application framework layer uses the activity management service to start the fifth target application. If the confirmation result is the second, the application framework layer uses the activity management service to block the fifth target application from running. This ensures that if the application framework layer checks that the fifth target application is a privacy-protected application, it will block the fifth target application from being started in a privacy-protected scenario, ensuring the high reliability of the privacy mode.

[0173] In some embodiments, when the user needs to exit the privacy mode, a second exit privacy instruction can be sent to the application layer. The application layer receives and responds to the second exit privacy instruction and sends a recovery instruction to the application framework layer. The application framework layer receives and responds to the recovery instruction and batch-starts multiple privacy protection applications. This enables batch starting of multiple privacy protection applications when the electronic device exits the privacy mode, and does not send a recovery start broadcast message. This avoids sending a corresponding recovery start broadcast message separately when resuming each privacy protection application, thereby preventing the occurrence of a broadcast storm during the exit from privacy protection.

[0174] In one application scenario, such as Figure 7 As shown, the electronic device may include an application layer, an application framework layer, and a data layer, and the privacy inclusion method may include steps S3001 to S3019.

[0175] Step S3001: The application layer receives a user trigger operation for applying a privacy mode.

[0176] Step S3002: The application layer responds to the triggering operation and sends a privacy protection instruction to the application framework layer.

[0177] Step S3003: The application framework layer sends a privacy protection information acquisition instruction to the data layer according to the privacy protection instruction.

[0178] Step S3004: The data layer responds to the privacy protection information acquisition instruction and sends multiple privacy protection application information to the application framework layer.

[0179] Step S3005: The application framework layer batch-closes multiple privacy protection applications based on the multiple privacy protection application information.

[0180] Step S3006: The application program layer receives the third application query request.

[0181] Step S3007: The application layer responds to the third application query request and sends a third application query instruction to the application framework layer.

[0182] Step S3008: The application framework layer sends a non-privacy protection information acquisition instruction to the data layer according to the third query instruction.

[0183] Step S3009: The data layer responds to the non-privacy protection information acquisition instruction and reads the non-privacy protection application information in the preset application list.

[0184] Step S3010: Send multiple non-privacy protection application information to the application framework layer.

[0185] Step S3011: the application framework layer receives a plurality of non-privacy protection application information and forwards the plurality of non-privacy protection application information to the application layer.

[0186] Step S3012: The application layer receives the third startup request.

[0187] Step S3013: Forward the third startup request to the application framework layer.

[0188] Step S3014: the application framework layer responds to the third start request and sends a confirmation instruction carrying the fifth target application information of the fifth target application to the data layer.

[0189] Step S3015: The data layer responds to the confirmation instruction, confirms whether the fifth target application is a non-privacy protection application according to the fifth target application information, and obtains a confirmation result.

[0190] The confirmation result includes a first confirmation result and a second confirmation result.

[0191] Step S3016: The data layer sends the confirmation result to the application framework layer.

[0192] Step S3017: The application framework layer receives the confirmation result and controls the fifth target application according to the confirmation result.

[0193] When the confirmation result is the first confirmation result, execute step S3018;

[0194] When the confirmation result is the second confirmation result, step S3019 is executed.

[0195] Step S3018: The application framework layer sends a third startup instruction to the application layer to start the fifth target application.

[0196] Step S3019: The application framework layer sends a third blocking instruction to the application layer to prevent the fifth target application from running.

[0197] The privacy protection method provided in this embodiment is applied to an electronic device, which includes an application layer, an application framework layer, and a data layer. When the application layer determines that the privacy mode of the electronic device is triggered, it sends a privacy protection instruction to the application framework layer. The application framework layer sends a privacy protection information acquisition instruction to the data layer based on the privacy protection instruction. The data layer responds to the privacy protection information acquisition instruction and sends multiple privacy protection application information to the application framework layer. The application framework layer batch closes multiple privacy protection applications based on the multiple privacy protection application information, thereby realizing that when the privacy mode of the electronic device is triggered, multiple privacy protection applications associated with the privacy mode are batch closed without sending a shutdown broadcast message, avoiding sending corresponding disable broadcast information separately when disabling each privacy protection application, and preventing the occurrence of broadcast storms during the privacy protection process.

[0198] See also Figure 8 , which shows a privacy protection device 300 provided by an embodiment of the present application. The privacy protection device 300 can be applied to electronic devices. The following takes electronic devices as an example. Figure 8 The privacy protection device 300 shown in FIG. 3 is described in detail. The privacy protection device 300 may include a suspension calling module 310 , an invisible switching module 320 , and a suspension broadcasting module 330 .

[0199] The suspension call module 310 can be used to call the batch suspension interface to suspend multiple suspended applications associated with the privacy mode in batches when the application layer determines that the privacy mode of the electronic device is triggered; the invisible switching module 320 can be used by the application framework layer to switch the application state of each suspended application from a visible state to an invisible state; the suspension broadcast module 330 can be used by the application framework layer to send a suspension broadcast message to the registered broadcast receiver of the application layer, and the suspension broadcast message can carry the invisible state of multiple suspended applications.

[0200] In some implementations, the invisible switching module 320 may include a first modifying unit and a first storing unit.

[0201] The first modification unit can be used by the application framework layer to modify the application package information of each suspended application from visible application package information to invisible application package information through the package management service. The visible application package information can be used to represent that the corresponding application is in a visible state, and the invisible application package information can be used to represent that the corresponding application is in an invisible state; the first storage unit can be used by the application framework layer to store the invisible application package information to the initial package information file through the package management service to obtain the first target package information file.

[0202] In some implementations, the privacy protection device 300 may further include a first receiving module, a first responding module, a first query module, and a packet information sending module.

[0203] The first receiving module can be used for the application layer to receive the first application query request; the first responding module can be used for the application layer to respond to the first application query request and send the first query instruction to the application framework layer; the first query module can be used for the application framework layer to query the first target application package information of the first target application from the first target package information file through the package management service according to the first query instruction, and the first target application package information can be visible application package information; the package information sending module can be used for the application framework layer to send the first target application package information to the application layer.

[0204] In some implementations, the privacy protection device 300 may further include a first request sending module and a second response module.

[0205] The first request sending module can be used by the application layer to send a first startup request to the application framework layer, and the first startup request can be used to start the second target application; the second response module can be used by the application framework layer to respond to the first startup request, query the application status of the second target application from the first target package information file through the activity management service, obtain the first application status query result, and control the second target application based on the first application status query result. The first application status query result may include a first visible status result for characterizing that the application package information of the second target application is visible application package information, and a first invisible status result for characterizing that the application package information of the second target application is invisible application package information.

[0206] In some embodiments, the second response module may include a first starting unit and a first preventing unit.

[0207] The first starting unit can be used to start the second target application through the activity management service when the first application status query result is the first visible status result; the first blocking unit can be used to block the second target application from running through the activity management service when the first application status query result is the first invisible status result.

[0208] In some implementations, the invisible switching module 320 may further include a second modifying unit and a second storage unit.

[0209] The second modification unit can be used for the application framework layer to modify the application component information of each suspended application from visible application component information to invisible application component information through the package management service. The visible application component information can be used to represent that the corresponding application is in a visible state, and the invisible application component information can be used to represent that the corresponding application is in an invisible state; the second storage unit can be used for the application framework layer to store the invisible application component information to the initial package information file through the package management service to obtain a second target package information file.

[0210] In some embodiments, the privacy protection device 300 may further include a second receiving module, a third responding module, a second query module, and a component information sending module.

[0211] The second receiving module can be used for the application layer to receive the second application query request; the third response module can be used for the application layer to respond to the second application query request and send a second query instruction to the application framework layer; the second query module can be used for the application framework layer to query the third target application component information of the third target application from the second target package information file through the package management service according to the second query instruction, and the third target application package information corresponding to the third target application component information can be visible application package information, and the visible application package information is used to indicate that the corresponding application is in a visible state; the component information sending module can be used for the application framework layer to send the third target application component information to the application layer.

[0212] In some implementations, the privacy protection device 300 may further include a second request sending module and a fourth response module.

[0213] The second request sending module can be used by the application layer to send a second startup request to the application framework layer, and the second startup request can be used to start the fourth target application; the fourth response module can be used by the application framework layer to respond to the second startup request, query the application status of the fourth target application from the second target package information file through the activity management service, obtain the second application status query result, and control the fourth target application based on the second application status query result. The second application status query result may include a second visible status result for characterizing that the application package information of the fourth target application is visible application package information, and a second invisible status result for characterizing that the application package information of the fourth target application is invisible application package information.

[0214] In some embodiments, the fourth response module may include a second starting unit and a second preventing unit.

[0215] The second starting unit can be used to start the fourth target application running through the activity management service by the application framework layer when the second application status query result is the second visible status result; the second blocking unit can be used to block the fourth target application running through the activity management service by the application framework layer when the second application status query result is the second invisible status result.

[0216] In some embodiments, the privacy protection device 300 may further include a first exit module, a fifth response module, a visible switching module, and a broadcast cancellation module.

[0217] The first exit module can be used by the application layer to receive the first exit privacy instruction; the fifth response module can be used by the application layer to respond to the first exit privacy instruction, calling the batch suspension interface to unsuspend each suspended application associated with the privacy mode; the visible switching module can be used by the application framework layer to switch the application state of each unsuspended application from an invisible state to a visible state; the unsuspension broadcast module can be used by the application framework layer to send an unsuspension broadcast message to a registered broadcast receiver, and the unsuspension broadcast message can carry the visible state of multiple unsuspended applications.

[0218] The privacy protection method provided in this embodiment is applied to an electronic device, which includes an application layer and an application framework layer. When the application layer determines that the privacy mode of the electronic device is triggered, it calls a batch suspension interface to batch suspend multiple applications to be suspended that are associated with the privacy mode. The application framework layer switches the application state of each suspended application from a visible state to an invisible state. The application framework layer sends a suspension broadcast message to a registered broadcast receiver of the application layer. The suspension broadcast message carries the invisible state of multiple suspended applications. When the privacy mode of the electronic device is triggered, multiple privacy protection applications are suspended in batches by calling a batch suspension interface, and the application state of each privacy protection application is modified to an invisible state. Only one suspension broadcast message is sent, so as to avoid sending corresponding disable broadcast messages separately when disabling each privacy protection application, thereby preventing the occurrence of broadcast storms during the privacy protection process.

[0219] See also Figure 9 , which shows a privacy protection device 500 provided by another embodiment of the present application. The privacy protection device 500 can be applied to electronic devices. The following takes electronic devices as an example. Figure 9 The privacy protection device 500 shown in FIG. 5 is described in detail. The privacy protection device 500 may include a privacy protection sending module 510 , a privacy protection obtaining module 520 , a private information sending module 530 and a closing module 540 .

[0220] The privacy protection sending module 510 can be used to send a privacy protection instruction to the application framework layer when the application layer determines that the privacy mode of the electronic device is triggered; the privacy protection acquisition module 520 can be used for the application framework layer to send a privacy protection information acquisition instruction to the data layer according to the privacy protection instruction. The data layer can pre-store a preset application list associated with the privacy mode. The preset application list can include multiple privacy protection application information and multiple non-privacy protection application information; the privacy information sending module 530 can be used for the data layer to respond to the privacy protection information acquisition instruction and send multiple privacy protection application information to the application framework layer; the closing module 540 can be used for the application framework layer to batch close multiple privacy protection applications according to multiple privacy protection application information.

[0221] In some embodiments, the privacy protection device 500 may further include a third receiving module, a sixth responding module, a non-privacy protection obtaining module, a non-privacy information sending module, and a forwarding module.

[0222] The third receiving module can be used for the application layer to receive the third application query request; the sixth response module can be used for the application layer to respond to the third application query request and send a third query instruction to the application framework layer; the non-privacy protection acquisition module can be used for the application framework layer to send a non-privacy protection information acquisition instruction to the data layer according to the third query instruction; the non-privacy information sending module can be used for the data layer to respond to the non-privacy protection information acquisition instruction and send multiple non-privacy protection application information to the application framework layer; the forwarding module can be used for the application framework layer to forward multiple non-privacy protection application information to the application layer.

[0223] In some implementations, the privacy protection device 500 may further include a third request sending module, a seventh response module, an eighth response module, and a control module.

[0224] The third request sending module can be used by the application layer to send a third startup request to the application framework layer, and the third startup request can be used to start the fifth target application; the seventh response module can be used by the application framework layer to respond to the third startup request and send a confirmation instruction carrying the fifth target application information of the fifth target application to the data layer; the eighth response module can be used by the data layer to respond to the confirmation instruction, confirm whether the fifth target application is a non-privacy protection application, and send a confirmation result to the application framework layer, and the confirmation result may include a first confirmation result used to characterize that the fifth target application is a non-privacy protection application, and a second confirmation result used to characterize that the fifth target application is not a non-privacy protection application; the control module can be used by the application framework layer to control the fifth target application according to the confirmation result.

[0225] In some embodiments, the control module may include a third starting unit and a third preventing unit.

[0226] The third starting unit can be used to start the fifth target application through the activity management service at the application framework layer when the confirmation result is the first confirmation result; the third blocking unit can be used to block the fifth target application from running through the activity management service at the application framework layer when the confirmation result is the second confirmation result.

[0227] In some implementations, the privacy protection device 500 may further include a second exit module, a recovery instruction sending module, and a batch startup module.

[0228] The second exit module can be used for the application layer to receive the second exit privacy instruction; the recovery instruction sending module can be used for the application layer to respond to the second exit privacy instruction and send the recovery instruction to the application framework layer; the batch startup module can be used for the application framework layer to batch start multiple privacy protection applications according to the recovery instruction.

[0229] The privacy protection method provided in this embodiment is applied to an electronic device, which includes an application layer, an application framework layer, and a data layer. When the application layer determines that the privacy mode of the electronic device is triggered, it sends a privacy protection instruction to the application framework layer. The application framework layer sends a privacy protection information acquisition instruction to the data layer based on the privacy protection instruction. The data layer responds to the privacy protection information acquisition instruction and sends multiple privacy protection application information to the application framework layer. The application framework layer batch closes multiple privacy protection applications based on the multiple privacy protection application information, thereby realizing that when the privacy mode of the electronic device is triggered, multiple privacy protection applications associated with the privacy mode are batch closed without sending a shutdown broadcast message, avoiding sending corresponding disable broadcast information separately when disabling each privacy protection application, and preventing the occurrence of broadcast storms during the privacy protection process.

[0230] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to in detail. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiments. Any processing method described in the method embodiment can be implemented by the corresponding processing module in the device embodiment, and will not be repeated in detail in the device embodiment.

[0231] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.

[0232] See also Figure 10 , which shows a hardware structure diagram of an electronic device 600 provided by an embodiment of the present application. Figure 10 As shown, the electronic device 600 may include a processor 610, an external memory interface 620, an internal memory 621, a Universal Serial Bus (USB) interface 630, a charging management module 640, a power management module 641, a battery 642, an antenna 1, an antenna 2, a mobile communication module 650, a wireless communication module 660, an audio module 670, a speaker 670A, a receiver 670B, a microphone 670C, an earphone interface 670D, a sensor module 680, a button 690, a motor 691, an indicator 692, a camera 693, a display screen 694, and a Subscriber Identification Module (SIM) card interface 695, etc. Among them, the sensor module 680 may include a pressure sensor 680A, a gyroscope sensor 680B, an air pressure sensor 680C, a magnetic sensor 680D, an acceleration sensor 680E, a distance sensor 680F, a proximity light sensor 680G, a fingerprint sensor 680H, a temperature sensor 680J, a touch sensor 680K, an ambient light sensor 680L, a bone conduction sensor 680M, etc.

[0233] It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 600. In other embodiments of the present application, the electronic device 600 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0234] For example, Figure 10 The processor 610 shown may include one or more processing units, for example, the processor 610 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor (NPU), etc. The different processing units may be independent devices or integrated into one or more processors.

[0235] The controller may be the nerve center and command center of the electronic device 600. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0236] Processor 610 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 610 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 610. If processor 610 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 610 latency, and thus improves system efficiency.

[0237] In some embodiments, the processor 610 may include one or more interfaces. The interfaces 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.

[0238] In some embodiments, the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). The processor 610 may include multiple I2C buses. The processor 610 may be coupled to the touch sensor 680K, charger, flash, camera 693, etc. through different I2C bus interfaces. For example, the processor 610 may be coupled to the touch sensor 680K through the I2C interface, so that the processor 610 and the touch sensor 680K communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 600.

[0239] In some embodiments, the I2S interface can be used for audio communication. The processor 610 can include multiple I2S buses. The processor 610 can be coupled to the audio module 670 via the I2S bus to enable communication between the processor 610 and the audio module 670.

[0240] In some embodiments, the audio module 670 can transmit audio signals to the wireless communication module 660 through the I2S interface to implement the function of answering calls through a Bluetooth headset.

[0241] In some embodiments, the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. The audio module 670 and the wireless communication module 660 can be coupled via a PCM bus interface.

[0242] In some embodiments, the audio module 670 can also transmit audio signals to the wireless communication module 660 via the PCM interface to implement the function of answering calls through a Bluetooth headset. It should be understood that both the I2S interface and the PCM interface can be used for audio communication.

[0243] In some embodiments, the UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. The UART interface is generally used to connect the processor 610 and the wireless communication module 660. For example, the processor 610 communicates with the Bluetooth module in the wireless communication module 660 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 670 can transmit audio signals to the wireless communication module 660 via the UART interface, implementing the function of playing music through a Bluetooth headset.

[0244] In some embodiments, the MIPI interface can be used to connect the processor 610 to peripheral devices such as the display screen 694 and the camera 693. MIPI interfaces include the Camera Serial Interface (CSI) and the Display Serial Interface (DSI). The processor 610 and the camera 693 communicate via the CSI interface to implement the camera function of the electronic device 600. The processor 610 and the display screen 694 communicate via the DSI interface to implement the display function of the electronic device 600.

[0245] In some embodiments, the GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. The GPIO interface can be used to connect the processor 610 to the camera 693, the display 694, the wireless communication module 660, the audio module 670, the sensor module 680, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0246] Illustratively, USB interface 630 is an interface that complies with USB standards, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. USB interface 630 can be used to connect a charger to charge electronic device 600, or to transfer data between electronic device 600 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices.

[0247] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 600. In other embodiments of the present application, the electronic device 600 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.

[0248] The charging management module 640 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 640 can receive charging input from the wired charger via the USB interface 630. In some wireless charging embodiments, the charging management module 640 can receive wireless charging input via the wireless charging coil of the electronic device 600. While charging the battery 642, the charging management module 640 can also provide power to the electronic device via the power management module 641.

[0249] The power management module 641 can be used to connect the battery 642, the charging management module 640, and the processor 610. The power management module 641 receives input from the battery 642 and / or the charging management module 640, and provides power to the processor 610, the internal memory 621, the external memory, the display 694, the camera 693, and the wireless communication module 660. The power management module 641 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 641 can also be set in the processor 610. In other embodiments, the power management module 641 and the charging management module 640 can also be set in the same device.

[0250] The wireless communication function of the electronic device 600 can be implemented through the antenna 1, the antenna 2, the mobile communication module 650, the wireless communication module 660, the modem processor, and the baseband processor.

[0251] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 600 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0252] The mobile communication module 650 can provide a wireless communication solution for the electronic device 600, such as at least one of the following: a second generation (2G) mobile communication solution, a third generation (3G) mobile communication solution, a fourth generation (4G) mobile communication solution, or a fifth generation (5G) mobile communication solution. The mobile communication module 650 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 650 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and then transmit them to the modem processor for demodulation. The mobile communication module 650 can also amplify the signal modulated by the modem processor, converting the amplified signal into electromagnetic waves and radiating them via the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 650 can be provided in the processor 610. In some embodiments, at least some of the functional modules of the mobile communication module 650 can be provided in the same device as at least some of the modules of the processor 610.

[0253] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted 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 being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 670A, the receiver 670B, etc.) or displays an image or video through the display screen 694. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 610 and be provided in the same device as the mobile communication module 650 or other functional modules.

[0254] The wireless communication module 660 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 600. The wireless communication module 660 can be one or more devices that integrate at least one communication processing module. The wireless communication module 660 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 610. The wireless communication module 660 can also receive the signal to be sent from the processor 610, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0255] In some embodiments, antenna 1 of electronic device 600 is coupled to mobile communication module 650, and antenna 2 of electronic device 600 is coupled to wireless communication module 660, so that electronic device 600 can communicate with a network and other electronic devices through wireless communication technology. The wireless communication technology may include at least one of the following communication technologies: 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 IR technology. The GNSS may include at least one of the following positioning technologies: Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Beidou Navigation Satellite System (BDS), Quasi-zenith Satellite System (QZSS), and Satellite Based Augmentation Systems (SBAS).

[0256] Electronic device 600 implements display functionality through a GPU, display screen 694, and an application processor. A GPU is a microprocessor for image processing that connects display screen 694 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 610 may include one or more GPUs that execute program instructions to generate or modify display information.

[0257] Display screen 694 is used to display images, videos, etc. Display screen 694 includes a display panel. The display panel can be a liquid crystal display (LCD), organic light emitting diode (OLED), active-matrix organic light emitting diode (AMOLED), flexible light emitting diode (FLED), mini-LED, micro-LED, micro-OLED, quantum dot light emitting diode (QLED), etc. In some embodiments, electronic device 600 may include one or N display screens 694, where N is a positive integer greater than 1.

[0258] The electronic device 600 can implement a shooting function through an ISP, a camera 693, a video codec, a GPU, a display screen 694, and an application processor.

[0259] The ISP processes data fed back by camera 693. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and transformed into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 693.

[0260] The camera 693 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 light 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 some embodiments, the electronic device 600 may include 1 or N cameras 693, where N is a positive integer greater than 1.

[0261] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 600 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0262] Video codecs are used to compress or decompress digital video. Electronic device 600 may support one or more video codecs. This allows electronic device 600 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0263] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in electronic device 600, such as image recognition, face recognition, voice recognition, and text comprehension.

[0264] The external memory interface 620 can be used to connect an external memory card, such as a Secure Digital (SD) card, to expand the storage capacity of the electronic device 600. The external memory card communicates with the processor 610 via the external memory interface 620 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0265] The internal memory 621 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 610 executes various functional applications and data processing of the electronic device 600 by running the instructions stored in the internal memory 621. The internal memory 621 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 600 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 621 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory (UFS), etc.

[0266] The electronic device 600 can implement audio functions such as music playback and recording through the audio module 670, the speaker 670A, the receiver 670B, the microphone 670C, the headphone jack 670D, and the application processor.

[0267] The audio module 670 can be used to convert digital audio information into analog audio signal output, and can also be used to convert analog audio input into digital audio signals. The audio module 670 can also be used to encode and decode audio signals. In some embodiments, the audio module 670 can be provided in the processor 610, or some functional modules of the audio module 670 can be provided in the processor 610.

[0268] The speaker 670A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 600 can listen to music or listen to hands-free calls through the speaker 670A.

[0269] The receiver 670B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 600 receives a call or a voice message, the user can place the receiver 670B close to the ear to hear the voice.

[0270] Microphone 670C, also known as "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 the microphone 670C to input the sound signal into the microphone 670C. The electronic device 600 can be provided with at least one microphone 670C. In other embodiments, the electronic device 600 can be provided with two microphones 670C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 600 can also be provided with three, four or more microphones 670C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0271] The headphone jack 670D is used to connect a wired headphone and can be a USB interface 630, or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.

[0272] Pressure sensor 680A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 680A can be located on display screen 694. There are many types of pressure sensors 680A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 680A, the capacitance between the electrodes changes. Electronic device 600 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 694, electronic device 600 detects the touch intensity based on pressure sensor 680A. Electronic device 600 can also calculate the touch location based on the detection signal from pressure sensor 680A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0273] The gyroscope sensor 680B can be used to determine the motion posture of the electronic device 600. In some embodiments, the angular velocity of the electronic device 600 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 680B. The gyroscope sensor 680B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 680B detects the angle of the electronic device 600 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 600 through reverse movement to achieve anti-shake. The gyroscope sensor 680B can also be used for navigation and somatosensory game scenes.

[0274] The air pressure sensor 680C is used to measure air pressure. In some embodiments, the electronic device 600 uses the air pressure value measured by the air pressure sensor 680C to calculate altitude, assist in positioning and navigation.

[0275] The magnetic sensor 680D includes a Hall sensor. The electronic device 600 can use the magnetic sensor 680D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 600 is a flip phone, the electronic device 600 can detect the opening and closing of the flip cover using the magnetic sensor 680D and set features such as automatic unlocking of the flip cover based on the detected opening and closing status of the leather case or flip cover.

[0276] Accelerometer 680E can detect the magnitude of acceleration of electronic device 600 in all directions (generally three axes). When electronic device 600 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0277] The distance sensor 680F is used to measure distance. The electronic device 600 can measure distance using infrared or laser. In some embodiments, when photographing a scene, the electronic device 600 can use the distance sensor 680F to measure distance to achieve fast focusing.

[0278] The proximity light sensor 680G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 600 emits infrared light outward through the light emitting diode. The electronic device 600 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 600. When insufficient reflected light is detected, the electronic device 600 can determine that there is no object near the electronic device 600. The electronic device 600 can use the proximity light sensor 680G to detect when the user holds the electronic device 600 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 680G can also be used for automatic unlocking and locking of the screen in leather case mode and pocket mode.

[0279] The fingerprint sensor 680H is used to collect fingerprints. The electronic device 600 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.

[0280] The temperature sensor 680J is used to detect temperature. In some embodiments, the electronic device 600 uses the temperature detected by the temperature sensor 680J to implement a temperature processing strategy. For example, when the temperature reported by the temperature sensor 680J exceeds a threshold, the electronic device 600 reduces the performance of the processor located near the temperature sensor 680J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 600 heats the battery 642 to prevent the electronic device 600 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 600 boosts the output voltage of the battery 642 to prevent abnormal shutdown due to low temperature.

[0281] Touch sensor 680K, also known as a "touch panel," can be provided on display screen 694. The touch sensor 680K and display screen 694 form a touch screen, also known as a "touch screen." Touch sensor 680K is used to detect touch operations applied thereto or in the vicinity thereof. Touch sensor 680K can transmit the detected touch operations to application processor 610 to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 694. In other embodiments, touch sensor 680K can also be provided on the surface of electronic device 600, at a location different from that of display screen 694.

[0282] Ambient light sensor 680L is used to sense ambient light brightness. Electronic device 600 can adaptively adjust the brightness of display screen 694 based on the perceived ambient light brightness. Ambient light sensor 680L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 680L can also work with proximity light sensor 680G to detect whether electronic device 600 is in a pocket to prevent accidental touches.

[0283] The bone conduction sensor 680M can acquire vibration signals. In some embodiments, the bone conduction sensor 680M can acquire vibration signals from the vibrating bones of the human body. The bone conduction sensor 680M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 680M can also be set in headphones to form bone conduction headphones. The audio module 670 can parse the vibration signals of the vibrating bones of the human body acquired by the bone conduction sensor 680M into voice signals to implement voice functions. The application processor 610 can parse heart rate information based on the blood pressure signals acquired by the bone conduction sensor 680M to implement heart rate detection functions.

[0284] Keys 690 include a power button, a volume button, and the like. Keys 690 may be mechanical keys or touch-sensitive keys. Electronic device 600 may receive key inputs and generate key signal inputs related to user settings and function control of electronic device 600.

[0285] Motor 691 can generate vibration prompts. Motor 691 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 694, motor 691 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.

[0286] Indicator 692 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0287] The SIM card interface 695 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 600 by inserting it into or removing it from the SIM card interface 695. The electronic device 600 can support 1 or N SIM card interfaces 695, where N is a positive integer greater than 1. The SIM card interface 695 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 695 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 695 can also be compatible with different types of SIM cards. The SIM card interface 695 can also be compatible with external memory cards. The electronic device 600 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 600 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 600 and cannot be separated from the electronic device 600.

[0288] See also Figure 11 , which shows a functional block diagram of an electronic device 600 according to an embodiment of the present application. Figure 11 As shown, the electronic device 600 includes: at least one processor 610 ( Figure 11 Only one processor is shown in the figure), a memory 696, and a computer program 697 stored in the memory 696 and executable on at least one processor 610. When the processor 610 executes the computer program 697, the electronic device 600 implements the steps of any one of the above methods.

[0289] Those skilled in the art will understand that Figure 11 This is merely an example of the electronic device 600 and does not constitute a limitation on the electronic device 600. In practice, the electronic device 600 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0290] The processor 610 may be a central processing unit (CPU), other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0291] In some embodiments, the memory 696 may be an internal storage unit of the electronic device 600, such as a hard disk or memory of the electronic device 600. In other embodiments, the memory 696 may also be an external storage device of the electronic device 600, such as a plug-in hard disk equipped on the electronic device 600, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Alternatively, the memory 696 may include both an internal storage unit of the electronic device 600 and an external storage device. The memory 696 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of a computer program. The memory 696 may also be used to temporarily store data that has been output or is about to be output.

[0292] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0293] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0294] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is called by an electronic device, it can implement the methods described in the above-mentioned various method embodiments.

[0295] An embodiment of the present application also provides a computer program product, wherein the computer-readable storage medium stores program code. When the computer program product is run on an electronic device, the electronic device executes the above-mentioned related steps to implement the methods described in the above-mentioned various method embodiments.

[0296] If the above-mentioned 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 computer-readable storage medium. Based on this understanding, the present application implements all or part of the process of the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, mobile hard disk, magnetic disk or optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0297] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0298] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0299] In the embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, 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.

[0300] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0301] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0302] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0303] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0304] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some implementations," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0305] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A privacy protection method, characterized in that: Applied to an electronic device, the electronic device includes an application layer and an application framework layer, and the privacy protection method includes: When the application layer determines that the privacy mode of the electronic device is triggered, calling a batch suspension interface to batch suspend multiple to-be-suspended applications associated with the privacy mode; The application framework layer switches the application state of each suspended application from a visible state to an invisible state; The application framework layer sends a suspension broadcast message to a registered broadcast receiver of the application layer, where the suspension broadcast message carries the invisible status of multiple suspended applications.

2. The privacy protection method according to claim 1, characterized in that: The application framework layer switches the application state of each suspended application from a visible state to an invisible state, including: The application framework layer modifies the application package information of each suspended application from visible application package information to invisible application package information through the package management service, wherein the visible application package information is used to indicate that the corresponding application is in a visible state, and the invisible application package information is used to indicate that the corresponding application is in the invisible state; The application framework layer stores the invisible application package information into an initial package information file through the package management service to obtain a first target package information file.

3. The privacy protection method according to claim 2, characterized in that: The privacy protection method further includes: The application layer receives a first application query request; The application layer responds to the first application query request and sends a first query instruction to the application framework layer; The application framework layer queries the first target application package information of the first target application from the first target package information file through the package management service according to the first query instruction, where the first target application package information is the visible application package information; The application framework layer sends the first target application package information to the application layer.

4. The privacy protection method according to claim 2, wherein: The privacy protection method further includes: The application layer sends a first start request to the application framework layer, where the first start request is used to start a second target application; The application framework layer responds to the first startup request, queries the application status of the second target application from the first target package information file through the activity management service, obtains a first application status query result, and controls the second target application based on the first application status query result, wherein the first application status query result includes a first visible status result for characterizing that the application package information of the second target application is visible application package information, and a first invisible status result for characterizing that the application package information of the second target application is the invisible application package information.

5. The privacy protection method according to claim 4, characterized in that: The application framework layer controls the second target application according to the first application status query result, including: When the first application state query result is the first visible state result, the application framework layer starts the second target application through the activity management service; When the first application state query result is the first invisible state result, the application framework layer prevents the second target application from running through the activity management service.

6. The privacy protection method according to claim 1, wherein: The application framework layer switches the application state of each suspended application from a visible state to an invisible state, including: The application framework layer modifies the application component information of each suspended application from visible application component information to invisible application component information through the package management service, wherein the visible application component information is used to indicate that the corresponding application is in a visible state, and the invisible application component information is used to indicate that the corresponding application is in the invisible state; The application framework layer stores the invisible application component information into an initial package information file through the package management service to obtain a second target package information file.

7. The privacy protection method according to claim 6, characterized in that: The privacy protection method further includes: The application layer receives a second application query request; The application layer responds to the second application query request and sends a second query instruction to the application framework layer; The application framework layer queries the second target package information file for third target application component information of the third target application through the package management service according to the second query instruction, wherein the third target application package information corresponding to the third target application component information is visible application package information, and the visible application package information is used to indicate that the corresponding application is in a visible state; The application framework layer sends the third target application component information to the application layer.

8. The privacy protection method according to claim 6, characterized in that: The privacy protection method further includes: The application layer sends a second start request to the application framework layer, where the second start request is used to start a fourth target application; The application framework layer responds to the second startup request, queries the application status of the fourth target application from the second target package information file through the activity management service, obtains a second application status query result, and controls the fourth target application based on the second application status query result, wherein the second application status query result includes a second visible status result for characterizing that the application package information of the fourth target application is visible application package information, and a second invisible status result for characterizing that the application package information of the fourth target application is invisible application package information.

9. The privacy protection method according to claim 8, characterized in that: The application framework layer controls the fourth target application according to the second application status query result, including: When the second application state query result is the second visible state result, the application framework layer starts running the fourth target application through the activity management service; When the second application state query result is the second invisible state result, the application framework layer prevents the fourth target application from running through the activity management service.

10. The privacy protection method according to any one of claims 1 to 9, characterized in that: The privacy protection method further includes: The application layer receives a first exit privacy instruction; The application layer responds to the first privacy exit instruction and calls the batch suspension interface to unsuspend each suspended application associated with the privacy mode; The application framework layer switches the application state of each unsuspended application from the invisible state to the visible state; The application framework layer sends a release broadcast message to the registered broadcast receiver, where the release broadcast message carries the visible status of multiple released applications.

11. A privacy protection device, characterized in that: Applied to an electronic device, the electronic device includes an application layer and an application framework layer, and the privacy protection device includes: a suspension calling module, configured to call a batch suspension interface to batch suspend a plurality of to-be-suspended applications associated with the privacy mode when the application layer determines that the privacy mode of the electronic device is triggered; An invisible switching module, configured for the application framework layer to switch the application state of each suspended application from a visible state to an invisible state; The suspension broadcast module is used for the application framework layer to send suspension broadcast information to the registered broadcast receiver of the application layer, and the suspension broadcast information carries the invisible status of multiple suspended applications.

12. An electronic device, characterized in that: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device executes the privacy protection method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by an electronic device to execute the privacy protection method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • System, device and method for enforcing privacy during a communication session with a voice assistant

    CA3007707A1

  • Privacy authority management method and device

    CN103577750A