Control method of electronic device and electronic device

By introducing a Trusted Execution Environment (TEE) module into electronic devices to monitor events and control the power-down module, the problem of software instructions being easily enabled by malicious programs in the prior art is solved, hardware-level privacy protection is achieved, and the security of electronic devices is improved.

CN118981768BActive Publication Date: 2026-01-16HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411091225.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2026-01-16
Estimated Expiration
2043-12-18

AI Technical Summary

Technical Problem

In existing technologies, the disabling of modules or devices in privacy mode of electronic devices is mainly achieved through software instructions, which poses a risk of being illegally enabled by malicious programs and makes it difficult to ensure strict protection of user privacy.

Method used

A Trusted Execution Environment (TEE) module is used to monitor target events, and the power-on and power-off of the target module is controlled by the power-off command of the hardware device to achieve hardware-level module disabling and improve security.

Benefits of technology

Hardware control ensures that the module is powered down in a timely manner when the target event occurs, preventing unauthorized startup, improving the accuracy and security of privacy protection, and reducing the risk of user privacy leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981768B_ABST
    Figure CN118981768B_ABST
Patent Text Reader

Abstract

The embodiment of the application is suitable for the terminal technical field, and provides a control method of an electronic device and the electronic device. By applying the method, the trusted execution environment module in the electronic device can send a power-off instruction to the driving module when receiving information that a target event occurs, and the driving module disconnects the control switch of the target module to realize the power-off of the target module. The control switch of the target module and the driving module can be configured or installed in the trusted execution environment module. In this way, the process of receiving the power-off instruction by the driving module and the process of disconnecting the control switch of the target module by the driving module can be completed in the trusted execution environment module, and the security of the processing process is improved. In addition, disconnecting the control switch of the target module to power off the target module belongs to physical layer control, and compared with stopping the use of the target module in the form of software instructions, the security of the control process is greatly improved, and the possibility of user privacy leakage is further reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original application with the application number 202311754303.8 and the original filing date of December 18, 2023, and the entire contents of the original application are incorporated herein by reference. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the technical field of terminals, and in particular to a control method of an electronic device and the electronic device. BACKGROUND

[0003] The development of information technology and mobile communication technology has brought many conveniences to people's life. People can use electronic devices such as mobile phones to conveniently complete operations such as shopping, taking a taxi, and paying fees. In the process of using electronic devices, the information mastered by electronic devices is also increasing. Once this information is leaked, it may adversely affect the user's daily life.

[0004] In the prior art, in order to prevent information leakage in electronic devices, some electronic devices can be set to disable the functions of individual modules or devices in privacy mode. For example, in the privacy mode of the electronic device, after the electronic device is turned off, the camera can be disabled. In this way, the electronic device in the off-screen state cannot collect images or shoot videos through the camera, reducing the possibility of information leakage and protecting the user's privacy. The above privacy protection in the prior art is mainly realized by a software control method. The electronic device issues a disable instruction in the form of software instructions to individual modules or devices to stop the running of these modules or devices. However, in some cases, these modules or devices that stop running may still be enabled, making it difficult to strictly protect the user's privacy. For example, the electronic device is invaded by a malicious program. In the off-screen state, the malicious program may illegally call the camera and collect images without the user's knowledge, causing the user's privacy to be leaked. SUMMARY

[0005] The control method of an electronic device and the electronic device provided by the embodiments of the present application can improve the control of the privacy mode from the software framework to the power-on and power-off of the hardware device, realizing more strict and accurate privacy protection.

[0006] To achieve the above object, the technical scheme adopted by the present application is as follows:

[0007] In a first aspect, a control method of an electronic device is provided, comprising: monitoring a target event by a trusted execution environment module of the electronic device; when receiving information that the target event occurs, sending a power-off instruction to a driving module, the power-off instruction being used to drive a target module to power off. The driving module is deployed in the trusted execution environment module, and the trusted execution environment module is configured with a control switch of the target module.

[0008] The control method of the electronic device provided in the embodiments of the present application can construct a trusted execution environment (TEE) module in the electronic device, and the processing of sensitive data in the electronic device can be implemented by the TEE module, so as to implement the privacy calculation and protection of the sensitive data. When the TEE module receives information that a target event occurs, the TEE module can send a power-off instruction to a driving module, and the driving module drives the target modules in the electronic device to power off. The embodiments of the present application deploy the driving module in the TEE module, so that the data processing of the driving module can be completed in the trusted execution environment, thereby improving the security of data processing. By configuring the control switch of the target module in the TEE module, the control switch belongs to a hardware control switch, and when the driving module in the TEE module drives the control switch of the target module to be disconnected, the target modules can be powered off, the on-off of the target modules in the physical layer is implemented, and any operation in the software layer cannot control the operation of the target modules, so that not only the control in the hardware level is implemented, but also the security of the control process is improved.

[0009] It should be understood that the target event can be some events occurring on the electronic device, and if the operation of the target module is not properly controlled when such events occur or happen, the user privacy may be adversely affected due to the continuous operation of the target module. For example, if the electronic device is a foldable screen device, if the camera, microphone and other modules are allowed to continue to operate after the foldable screen device is folded, the camera, microphone and other modules may collect the private data of the user without the user's knowledge, thereby increasing the risk of user privacy leakage. Therefore, when the target event occurs, the driving module can be used to physically power off the target modules, thereby reducing the risk of user privacy leakage.

[0010] In a possible implementation manner of the embodiments of the present application, the target module can include at least one of the following modules in the electronic device: a camera module, a microphone module, a positioning module, a star flash module, or a sensor hub.

[0011] In another possible implementation manner of the embodiments of the present application, the number of target modules is a plurality, and the control switches of the plurality of target modules are integrated in the same port in the TEE module. In this way, the power-off instruction received by the driving module can be used to simultaneously drive the control switches of the plurality of target modules to be disconnected, so that the plurality of target modules are powered off at the same time, thereby ensuring the timing consistency.

[0012] In a possible implementation of the embodiments of the present application, when the information of the occurrence of the target event is received, the power-off instruction is sent to the driver module, including: when the information of the occurrence of the target event is received, the information of the occurrence of the target event is broadcast to the target module through the privacy mode CA, which can be used to instruct the target module to make power-off preparation, that is, on-site protection before power-off; when the information of the completion of power-off preparation fed back by the target module through the privacy mode CA is received, it indicates that the on-site protection of each target module is completed, at this time, the TEE module can send the power-off instruction to the driver module. In this way, when the information of the occurrence of the target event is received, the TEE module can timely notify the target module to make power-off preparation through the privacy mode TA, avoid sudden power-off of the target module, and help to protect the normal operation of other modules and the system.

[0013] The information of the completion of power-off preparation of the target module can be fed back to the TEE module by the target module through the privacy mode CA, that is, the privacy mode CA can send the information of the completion of power-off preparation of each target module to the TEE module after each target module completes the power-off preparation. If the TEE module does not receive the information of the completion of power-off preparation fed back by the target module through the privacy mode CA, the TEE module can directly send the power-off instruction to the driver module at a preset time after the occurrence of the target event. The above-mentioned preset time can be a certain time point after the TEE module receives the information of the occurrence of the target event, or a certain time point after the privacy mode CA broadcasts the target event to the target module. Exemplarily, after the occurrence of the target event, the privacy mode CA will broadcast the information of the occurrence of the target event to the target module, if the TEE module does not receive the information of the completion of power-off preparation of each target module fed back by the privacy mode CA within x seconds after the privacy mode CA broadcasts the information, the TEE module can directly notify the driver module to power off through the privacy mode TA, and the value of x can be determined according to actual needs.

[0014] It should be understood that the power-off preparation can include at least one of the following processes: terminating the service currently executed by the target module and storing the key data of the service; or decoupling the target module from other modules; or decoupling each module inside the target module. Through the above-mentioned processes, the problem of data loss caused by sudden power-off of the target module can be avoided, and the problem that other modules associated with the target module cannot normally operate after the target module is powered off can be prevented; by decoupling each module inside the target module, each module inside the target module can be protected, and the probability that the target module cannot be started after being powered on again can be reduced.

[0015] In a possible implementation of the embodiments of the present application, when the TEE module receives the information that the target event occurs, the TEE module can check the authenticity of the target event, and then send the power-off instruction to the driver module after the target event is checked. Specifically, when the TEE module receives the information that the target event occurs, the TEE module obtains the key carried in the information indicating the target event; checks the target event based on the key; and then sends the power-off instruction to the driver module after the target event is checked. Wherein, the information that the target event occurs can be sent by the privacy mode CA to the TEE module, and the TEE module sends the power-off instruction to the driver module through the privacy mode TA, that is, the privacy mode TA in the TEE module sends the power-off instruction to the driver module after the target event is checked.

[0016] It should be understood that other applications or programs in the electronic device can access the driver module, and the information indicating the target event can be information transmitted by the other applications or programs in the access process. The TEE module can check the authenticity of the target event by obtaining the key carried in the information. The information is sent by the privacy mode CA to the TEE module.

[0017] In a possible implementation of the embodiments of the present application, the key carried in the information transmitted by the other applications or programs can include at least one of a universally unique identifier (UUID), a permission group key, or a scenario ID. When the TEE module checks the target event based on the key, the TEE module can match the key with the key in the currently configured privacy mode; if the key and the corresponding key in the currently configured privacy mode are both matched successfully, it can be determined that the target event is checked; otherwise, it is determined that the target event is not checked. In an example, if the target event is that the folding screen device changes from an unfolded state to a folded state, the target event check passing can indicate that the folding event of the folding screen device actually occurs, and the target module needs to be powered off to protect the privacy and security of the user. Therefore, the TEE module can send the power-off instruction to the driver module after the target event is checked.

[0018] In a possible implementation of the embodiments of the present application, the electronic device can be a folding screen device, and the target event can be an event that the folding screen device changes from an unfolded state to a folded state. Therefore, the TEE module of the electronic device receiving the information that the target event occurs can mean that the TEE module in the folding screen device receives the opening and closing signal of the folding screen device sent by the privacy mode CA, and the opening and closing signal is a signal for representing that the folding screen device changes from an unfolded state to a folded state. The opening and closing signal belongs to a software signal.

[0019] In another possible implementation of the embodiments of the present application, after receiving the folding screen device opening and closing signal sent by the privacy mode CA through the TEE module in the folding screen device, the folding hardware signal of the folding screen device can also be actively acquired by the driver. The folding hardware signal can be a hardware signal representing that the folding screen device is converted from an unfolded state to a folded state. In this way, if the opening and closing signal is consistent with the folding hardware signal, it can be determined that the target event occurs, and subsequent processing is performed; otherwise, it can be considered that the target event does not occur.

[0020] In a second aspect, an electronic device is provided, which is configured with a TEE module and a driver module. The driver module is deployed in the TEE module, and the TEE module is further configured with a control switch of a target module. When the TEE module receives information that a target event occurs, the TEE module can send a power-off instruction to the driver module, and the power-off instruction is used to drive the target module to power off.

[0021] In a possible implementation of the second aspect, the number of target modules in the electronic device can include multiple target modules, and the control switches of the multiple target modules can be integrated into the same port in the TEE module. In this way, the power-off instruction received by the driver module can be used to simultaneously drive the control switches of the multiple target modules to be disconnected, so that the multiple target modules are powered off at the same time, and the consistency of the timing sequence is ensured.

[0022] In another possible implementation of the second aspect, the information that the target event occurs received by the TEE module in the electronic device can be sent by the privacy mode CA to the TEE module. When the target event occurs, the privacy mode CA can listen to the occurrence of the target event and send relevant information to the TEE module. On the other hand, the privacy mode CA can broadcast the information that the target event occurs to the target module, and notify the target module to perform the power-off preparation processing. After the target module completes the power-off preparation, the target module can feed back a message that the power-off preparation is completed to the TEE module. The target module feeding back the message that the power-off preparation is completed to the TEE module can also be implemented by the privacy mode CA, that is, the target module feeds back the message to the privacy mode CA after completing the power-off preparation, and the privacy mode CA feeds back the messages that the power-off preparation of each target module is completed to the TEE module. After all the target modules complete the power-off preparation, the TEE module can send a power-off instruction to the driver module through the privacy mode TA.

[0023] In a third aspect, an electronic device is provided, which includes 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 control method of the electronic device as described in any one of the above first aspects can be implemented.

[0024] In a fourth aspect, a computer-readable storage medium is provided, which includes a memory and a processor. The processor executes a computer program stored in the memory, and the computer program can implement the control method of the electronic device according to any one of the first aspect.

[0025] In a fifth aspect, a chip is provided, which includes a memory and a processor. The processor executes a computer program stored in the memory, and the computer program can implement the control method of the electronic device according to any one of the first aspect.

[0026] It can be understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 FIG. 1 is a schematic diagram of a difference between the control method of the electronic device provided by the embodiments of the present application and the related method in the prior art;

[0028] Figure 2 FIG. 2 is a schematic diagram of the architecture of a system to which the control method of the electronic device provided by the embodiments of the present application is applicable;

[0029] Figure 3 FIG. 3 is a schematic diagram of the control method of the electronic device provided by the embodiments of the present application;

[0030] Figure 4 FIG. 4 is a schematic diagram of the interface operation of opening privacy protection provided by the embodiments of the present application;

[0031] Figure 5 FIG. 5 is a schematic diagram of the interface operation of closing privacy protection provided by the embodiments of the present application;

[0032] Figure 6 FIG. 6 is a schematic diagram of the control logic of a target module provided by the embodiments of the present application;

[0033] Figure 7 FIG. 7 is a schematic diagram of the control of the GPS module power-off provided by the embodiments of the present application;

[0034] Figure 8 FIG. 8 is a schematic diagram of the permission verification process provided by the embodiments of the present application;

[0035] Figure 9 FIG. 9 is a flowchart of the control method of the electronic device provided by the embodiments of the present application;

[0036] Figure 10 FIG. 10 is a schematic diagram of the steps of the control method of the electronic device provided by the embodiments of the present application;

[0037] Figure 11is a structural block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same or similar items with basically the same function and role. For example, the first module, the second module, etc. are only used to distinguish different modules in the electronic device, and do not have other limitations.

[0039] It should be noted that in the embodiments of the present application, the words "exemplarily" or "for example" are used to represent an example, an illustration or an explanation. Any embodiment or design scheme described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words "exemplarily" or "for example" are used to present the relevant concepts in a specific manner.

[0040] The business scenarios described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that with the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0041] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c, can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0042] The steps involved in the control method of the electronic device provided by the embodiments of the present application are only used as examples, and not all steps are necessarily executed, or the content in each step is not necessarily selected. In the use process, it can be increased or reduced as needed. The same step or the step or content with the same function in the embodiments of the present application can be mutually referenced and learned between different embodiments.

[0043] Generally, the electronic device can prevent the user's privacy from being disclosed by disabling the function of individual modules or devices. For example, when the electronic device is in a screen-off state, the electronic device can disable the camera. In this way, the disabled camera cannot function normally, and the electronic device in the screen-off state can be prevented from illegally collecting images without the user's knowledge. Alternatively, when the folding screen device is folded, the folding screen device can disable the microphone to prevent the microphone from illegally collecting the user's voice without the user's knowledge. However, in the prior art, the disabling of each module of the electronic device is implemented in the form of a software instruction. For example, after the electronic device is in a screen-off state, the processor of the electronic device can send an instruction to the camera, instructing the camera to stop running or close the use of related functions. This disabling method is a software sense of on-off, and the control of the related module is implemented based on the software framework of the electronic device. In some cases, for example, after the operating system of the electronic device is illegally invaded, the disabled modules can still be illegally started. For example, in a screen-off state, after the electronic device instructs the camera to close the image collection function through a software instruction, the software program that illegally invades the electronic device can restart the camera to continue collecting images in the screen-off state. In this way, the camera is still running without the user's knowledge, increasing the risk of user privacy leakage.

[0044] To solve the above problems, the embodiment of the present application provides a control method of an electronic device. By applying the method, the control of some modules of the electronic device can be implemented by the hardware devices on the electronic device. As shown in Figure 1 The difference between the control method of the electronic device provided by the embodiment of the present application and the related method in the prior art is shown. From Figure 1 It can be known that the disabling of the related module in the prior art is implemented through the software framework, and the control of the related module is implemented based on the software framework, that is, the control point in the prior art is on the software framework. However, the implementation of the module disabling by applying the control method of the electronic device provided by the embodiment of the present application is based on the hardware devices, that is, the control point in the method is on the hardware devices. In this way, the on-off in the hardware sense can be realized by the control of the hardware devices, and the purpose of "super" privacy protection can be achieved. For example, when some modules need to be disabled in some cases, the electronic device can directly control the related modules to power off from the hardware side, disable various functions of the related modules, achieve hardware-level isolation, and realize real module disabling, further protecting the privacy and security of the user.

[0045] The control method of the electronic device provided by the embodiment of the present application can be applied to an electronic device. For example, a mobile phone, a tablet computer, a wearable device, and the like. Among them, the above-mentioned electronic device can also be a folding screen device.

[0046] As shown in Figure 2The diagram shown is a schematic representation of the system architecture to which a control method for an electronic device according to an embodiment of this application is applicable. According to... Figure 2 The system architecture shown includes a Trusted Execution Environment (TEE) within the electronic device. A TEE is in contrast to a Rich Execution Environment (REE), which is an open environment within an operating system. Systems running within an REE are called Rich OS or REEOS, and applications or programs running within an REE can be called Client Applications (CAs). Due to the openness of REEs, they are vulnerable to attacks from malware or programs, leading to insecurity incidents such as the theft of sensitive data, abuse of digital rights, and misuse of mobile payments, thus impacting the security of electronic devices. Compared to REEs, TEEs can improve the security of electronic devices. Systems running within a TEE can be called Trusted OS or TEEOS, and applications or programs running within a TEE can be called Trusted Applications (TAs). Using a TEE, the hardware and software resources of an electronic device can be divided into a Secure World and a Normal World. The Secure World can be used to store important information about the electronic device, such as passwords, fingerprints, and facial recognition data. Therefore, as... Figure 2 As shown, an electronic device may include a TEE module, a driver module, and a target module. The TEE module, as the central system, is primarily responsible for information transmission, user authentication, and information processing. The driver module, deployed within the TEE module, is responsible for executing various signals issued by the TEE module, powering on and off related modules, and performing signal verification during data processing. The target module can refer to modules that are disabled for privacy protection purposes, such as camera modules, microphone modules, positioning modules, and Near Link modules. The TEE module may be configured with a control switch for the target module. During the power-off process of the target module, the driver module can, based on the power-off command sent by the TEE module, drive the disconnection of the target module's control switch, thereby powering off the target module.

[0047] based on Figure 2As shown in the system architecture, when the target event occurs, the TEE module can receive a message of occurrence of the target event sent by the privacy mode CA. The target event can be an event that triggers the execution of the power-off operation of the target module. Generally, when the target event occurs, it can indicate that the user no longer needs to use the electronic device or the related target module in the electronic device at this time, and in order to protect the user's privacy, the running of the target module needs to be terminated at this time. Exemplarily, the target event can be an event that the folding screen device is folded. When the folding screen device is folded, that is, the folding screen device is switched from an unfolded state to a folded state, it can indicate that the user is currently not using the folding screen device. At this time, the running of part of the target module can be stopped.

[0048] The message of occurrence of the target event can be monitored by the privacy mode CA, and the privacy mode CA can notify the TEE module of the monitored message of occurrence of the target event. At the same time, the privacy mode CA can notify the target module that the target event occurs at this time, and the target module is prepared for power-off. In an embodiment of the present application, the power-off preparation of the target module can be a live protection process of the target module, so as to ensure that other modules associated with the target module can continue to operate normally after the target module is powered off.

[0049] In a possible implementation manner of an embodiment of the present application, the live protection of the target module can include terminating the currently executed service of the target module, and storing the key data of the service; or decoupling the target module from other modules; or decoupling each module in the target module. By terminating the currently executed service and storing the key data of the service, the problem of data loss caused by sudden power-off of the target module can be avoided; by decoupling the target module from other modules, the problem that other modules associated with the target module cannot normally operate after the target module is powered off can be prevented; by decoupling each module in the target module, each module in the target module can be protected, and the probability that the target module cannot be started after being powered on again can be reduced.

[0050] After the target module completes the live protection, the target module can feed back a message to the TEE module via the privacy mode CA, and the privacy mode CA can inform the TEE module that the target module has completed the power-off preparation. At this time, the privacy mode TA in the TEE module can notify the driver module to power off the target module. The target module after being powered off will be unavailable, and the electronic device enters the privacy mode. In the privacy mode, the disabled electronic device cannot be restarted. Since the target module has been physically powered off, any operation at the software level cannot control the target module. Therefore, even if the electronic device is invaded by illegal applications or illegal programs, the illegal applications or illegal programs cannot start the disabled target module in the privacy mode. In this way, the privacy of the user can be fully protected, and the target module can be prevented from being illegally started without the user's knowledge.

[0051] As Figure 3 shown, is a schematic diagram of a control method of an electronic device provided by an embodiment of the present application. Figure 3 As shown in the flowchart, the control method of the electronic device provided by an embodiment of the present application is implemented on a folding screen device. Figure 3 The example shown in the figure is a process of powering down the camera, microphone and GPS module on the folding screen device by applying the method, thereby achieving user privacy protection.

[0052] As Figure 3 shown, the folding screen device can provide a setting interface, which can include a plurality of menu options. The user can operate in the interface to turn on the privacy protection option. Exemplarily, the privacy protection option can be a "folding protection" option, which is turned on after the folding screen device is folded, indicating that the device enters a privacy protection state, in which part of the modules of the folding screen device will be disabled. The disabled modules can be sensitive modules in the folding screen device, which can be used to collect sensitive information or private information of the user. For example, collecting the user's image, sound information, positioning the current location of the user and the folding screen device, etc. Exemplarily, as Figure 3 shown, the modules disabled in the privacy protection state can include the camera, microphone and GPS module, etc.

[0053] In a possible implementation of an embodiment of the present application, when the user turns on the privacy protection option through the setting interface, the folding screen device can explain the privacy protection function through a pop-up window and introduce the "folding protection" function. After the folding screen device receives the user's confirmation information, the folding screen device formally enters the privacy protection state.

[0054] In another possible implementation of an embodiment of the present application, when the user turns on the privacy protection option on the folding screen device, the user's identity can also be verified. Exemplarily, the identity verification of the user can be achieved by verifying the lock screen password and / or fingerprint of the folding screen device. The data generated in the above identity verification process can be processed in the TEE module to ensure the security of the verification process.

[0055] The folding screen device will generate an opening and closing signal when it is folded, which can be used to indicate that the folding screen device is converted from an unfolded state to a folded state. The opening and closing signal can be generated by modifying the identification bit of the hardware signal when the folding event occurs. The opening and closing signal will be sent to the TEE module. After receiving the opening and closing signal, the TEE module will notify the target module to prepare for power down. That is, the TEE module notifies Figure 3The camera, the microphone and the GPS module shown in FIG. 1 can perform live protection. By powering off the target module after a series of live protection operations are completed on the target module, the impact of sudden power-off of the target module on the normal operation of other modules and the normal running of the system can be reduced.

[0056] When the target module completes live protection, it indicates that the power-off preparation of the target module is completed. The message that the target module completes power-off preparation can be delivered to the TEE module through the privacy mode CA. At this time, the TEE module can notify the drive module of the message that the live protection is completed, and the drive module powers off the target module.

[0057] In a possible implementation of the embodiment of the present application, when the number of target modules includes multiple target modules, the message that each target module completes live protection can be delivered to the TEE module through the privacy mode CA, and the message that each target module completes live protection can be sent to the TEE module by the privacy mode CA. The TEE module can notify the drive module of the message that any target module completes live protection after receiving the message. At this time, the drive module can record the received message and be in a waiting state. When the drive module receives the message that all target modules complete live protection, the drive module can power off each module. Alternatively, the TEE module can record the message that any target module completes live protection after receiving the message sent by the privacy mode CA and be in a waiting state. When the TEE module receives the message that all target modules complete live protection, the TEE module sends the message to the drive module.

[0058] In another possible implementation of the embodiment of the present application, when the number of target modules includes multiple target modules, if the TEE module does not receive the message that a certain target module completes live protection delivered by the privacy mode CA within a certain time, the TEE module can directly send the message to the drive module, and the drive module powers off the target module. For example, after the privacy mode CA sends the notification of power-off preparation to the target module, if the TEE module does not receive the message that the target module completes live protection within x seconds, the TEE module can directly send the message to the privacy mode drive module, and the drive module powers off the target module. The value of x can be set according to actual needs, and the embodiment of the present application does not limit this.

[0059] After the target module is powered off, the foldable screen device enters the privacy mode. In the privacy mode, each target module cannot be started. For example, Figure 3 The camera, the microphone and the GPS module in FIG. 1 are in a power-off state and cannot be started in the privacy mode.

[0060] In a possible implementation of the embodiment of the present application, in order to improve the fluency of the user using the folding screen device and improve the performance of the folding screen device itself, the control switches of the plurality of target modules can be integrated in the same port in the TEE module, and the port can be a general purpose input / output port (GPIO). In this way, the driving module can be powered off at the same time when the plurality of target modules are powered off, ensuring the consistency of the timing of the plurality of target modules, and further improving the security performance of the folding screen device.

[0061] Next, the specific implementation process of the control method of the electronic device provided by the embodiment of the present application will be introduced in combination with specific examples. Similar to the examples in Figure 3 , the subsequent examples will also continue to take the folding screen device as an example for illustration.

[0062] As shown in Figure 4 , it is an interface operation schematic diagram for starting privacy protection provided by the embodiment of the present application. The privacy protection can be the "folding protection" of the folding screen device, that is, the privacy protection function realized by the folding screen device in the folded state. In Figure 4 , (a) shows a schematic diagram of a privacy mode setting page, which can be the "super privacy mode" in (a) of Figure 4 . The user can enter the "super privacy mode" setting page through the setting page of the folding screen device. In the setting page, the introduction information 401 of the "super privacy mode" and the "folding protection" option 402 can be displayed. Among them, the introduction information 401 can be used to introduce the "super privacy mode". For example, as shown in (a) of Figure 4 , the introduction information 401 can be as follows: in the super privacy mode, the application is prohibited from accessing the camera, microphone and location information. The user can operate on the "folding protection" option 402 to start the "folding protection". When the user selects to start the "folding protection" option, the folding screen device can explain the specific protection content in the form of a pop-up window. For example, Figure 4As shown in (b), pop-up window 403 displays the protection instructions after enabling "Fold Protection," namely: "After folding, the connection to the camera, microphone, and GPS positioning hardware will be disconnected. In this mode, applications such as phone calls, video chats, taking photos, navigation, and voice wake-up will not work properly. These functions will be restored after unfolding the device." Pop-up window 403 provides two options for the foldable screen device: "Cancel" option 404 and "Enable Fold Protection" option 405. After reading the protection instructions displayed in pop-up window 403, the user can choose to enable or disable fold protection. When the user selects "Enable Fold Protection" option 405, the foldable screen device will officially enable the "Fold Protection" function. After the "Fold Protection" function is enabled, when the foldable screen device is folded, the device will officially enter "Super Privacy Mode." In Super Privacy Mode, the foldable screen device will disconnect the connection to the camera, microphone, and GPS positioning hardware. Applications such as phone calls, video chats, taking photos, navigation, and voice wake-up on the foldable screen device will not work properly.

[0063] In this embodiment, when the user enables the fold protection, a pop-up window displays protection instructions, which allows the user to fully understand the function. Furthermore, the two confirmations prevent accidental access to the privacy mode settings page and allow the user to exit the page at any time, thus improving the user experience.

[0064] In one possible implementation of this application, when a user operates the foldable screen device to exit "fold protection", the foldable screen device can also perform multiple verifications to prevent unauthorized operation from exiting "fold protection", thereby enhancing the security performance of the foldable screen device.

[0065] like Figure 5 The diagram shown is a schematic representation of an interface for disabling privacy protection according to an embodiment of this application. Figure 5 (a) shows a schematic diagram of the settings page for Super Privacy Mode after enabling "Fold Protection". The settings page displays introductory information 501 for "Super Privacy Mode". Figure 5 In the settings page shown in (a), the "Fold Protection" option 502 is enabled. Users can disable "Fold Protection" by operating on option 502. When the user disables "Fold Protection," the foldable screen device can authenticate the user. In one possible implementation, when the user disables "Fold Protection," the foldable screen device can first perform an initial verification. For example, by launching a fingerprint service via a pop-up window, requesting the user to verify their fingerprint. For example, as... Figure 5As shown in (b), the foldable screen device displays a pop-up window 503, requesting fingerprint verification from the user. Pop-up window 503 displays introductory information on how to perform fingerprint verification and provides both a "Cancel" option 504 and a "Use Password" option 505, allowing the user to exit the initial verification or allowing the user to perform the initial verification using a password. Assuming the user continues with the initial fingerprint verification, after successful fingerprint verification, the foldable screen device can perform a secondary verification. The secondary verification can be a different verification method than the initial verification; for example, the secondary verification could be password verification. For instance, after the user's initial fingerprint verification is successful, as... Figure 5 As shown in (c), the foldable device can display a virtual keyboard 506 and a password verification pop-up 507 for the user to verify their password. If the user's initial and secondary verifications both pass, the foldable device can exit "Super Privacy Mode." In one example, if the user's initial or secondary verification fails, the foldable device will prompt the user to verify again. When multiple verifications fail, for example, if the user fails three times during the initial or secondary verification, the foldable device can automatically lock for a period of time, such as 5 or 10 minutes. After 5 or 10 minutes, the user can then continue verifying. In another example, to protect device security and user privacy, the automatic locking time of the foldable device can be extended when multiple verifications fail. In this way, the security of the foldable device can be further enhanced through initial and secondary verifications, preventing information leakage due to device loss or operations not performed by the user.

[0066] To avoid situations where forcibly disconnecting the target module via hardware might cause other related modules or devices to malfunction, the foldable screen device can send a message to the target module upon receiving an opening / closing signal, notifying the target module to prepare for power-down. After the target module completes its power-down preparation, the TEE module then sends a power-down command to the driver module, which disconnects the target module's control switch. In one possible implementation of this application, if there are multiple target modules, their control switches can be integrated into the same port of the TEE module. This allows multiple target modules to power down simultaneously under the drive of the driver module. When the device unfolds and needs to restore the target module's functionality, the driver module can also simultaneously power on multiple target modules, ensuring consistent timing during power-on and power-off processes.

[0067] like Figure 6 The diagram shown is a schematic representation of the control logic of a target module provided in an embodiment of this application. Figure 6In specific embodiments, the target modules include a camera, a microphone, and a GPS module. The camera can include multiple cameras, such as a main camera, a secondary camera, a long-focus camera, a front-facing camera, and a spectral camera. The microphone can include a main microphone and a secondary microphone. The software control switches of the above modules can be connected to the chip SOC, and the chip can control the on-off of the modules in the software sense. In addition, as shown in Figure 6 The TEE module of the folding screen device can also be configured with control switches of the modules, and the control switches in the TEE module can be integrated into the same port. When the folding screen device is folded, the opening and closing signal of the device will be immediately transmitted to the TEE module. After processing, the TEE module can send a power-off instruction to the driver module. The driver module can achieve simultaneous power-off of the above modules by disconnecting the control switches configured in the TEE module.

[0068] For ease of understanding, the above control process is introduced with a specific example of the power-off process of the GPS module.

[0069] As shown in Figure 7 , it is a schematic diagram for controlling the power-off of the GPS module according to an embodiment of the present application. Figure 7 The process example of controlling the power-off of the GPS module in the hardware control manner according to the method provided by the embodiment of the present application is shown in Figure 7 , the user can turn off the location service through the location service switch provided by the setting page of the folding screen device. At this time, the information of turning off the location service will be transmitted to the LocationManager core component. Then, the LocationManager component sends the information of turning off the location service to the related component HiGNSS in the chip SOC for implementing the location service, and notifies the software driver to turn off the location service. After the location service is turned off, the software driver sends the confirmation information to the LocationManager component to confirm the turning off of the location service.

[0070] On the other hand, as shown in Figure 7 , after confirming the turning off of the location service, the LocationManager component can send the confirmation information to the TEE module, and the TEE module controls the power-off of the GPPS module in the hardware control manner according to the control method provided by the embodiment of the present application. That is, after receiving the confirmation information of turning off the location service sent by the LocationManager component, the TEE module sends a power-off instruction to the driver module to directly power off the GNSS core capable of implementing the location service related functions. In this way, the use of the GPS module can be completely disconnected, and the privacy security of the user can be ensured.

[0071] In the embodiments of the present application, the control of the target module can be implemented based on the TEE module. When the target module needs to be disabled, the target module can be powered off at the physical level, so that any software side instruction cannot control the target module. The driving module for driving the target module to power on or power off is deployed in the TEE module, and the driving module only receives signals transmitted by the trusted application, and other interfaces or applications of the device cannot access the driving module. In order to ensure the security of the control process, the communication between the modules can increase the permission verification process.

[0072] In a possible implementation manner of the embodiments of the present application, in the super privacy mode, the service manager will access the driving module. The TEE module can verify the key carried in the information transmitted in the access process of the service manager. The key can include various types of keys, such as a universally unique identifier (UUID), a permission group key, or a scene ID. In the verification process, only when the various types of keys are all verified, the TEE module allows the service manager to access the driving module.

[0073] As shown in Figure 8 , it is a schematic diagram of a permission verification process provided by the embodiments of the present application. According to the process shown in Figure 8 , after the folding screen device "folding protection" function is turned on, when the folding screen device is bent, the device will be triggered to enter the super privacy mode. In the super privacy mode, the privacy mode service center can send a message to the target module to inform the target module to prepare for power off. After each target module completes the power-off preparation, a context environment (cntext) can be created and a session can be requested. Then, the privacy mode CA can make a judgment through a logical model to perform permission verification. As shown in Figure 8 , the privacy mode CA can first perform hash authentication, and if the hash authentication fails, the access request is directly intercepted. If the hash authentication is successful, the privacy mode TA can continue to perform permission group matching, and if the permission group matching fails, the access request can be intercepted; if the permission group matching is successful, the super privacy mode driving module can set the driver to continue to perform scene matching.

[0074] In a possible implementation manner of the embodiments of the present application, the driving module can be set with multiple logics for coping with different scenes in the super privacy mode. As shown in Figure 8 , examples of accessing the driving module in four different scenes are shown. The four scenes are respectively configured with different scene IDs, and only when the scene ID carried by the access program uniquely matches the ID of a certain type of scene, the corresponding operation is allowed to be performed. As shown in Figure 8 , the four scenes can include:

[0075] Scenario one, initialization, the corresponding scenario ID is 0xA: used when receiving a system startup broadcast, switching a user, or using a privacy space, etc. The privacy mode state is saved in advance, and the privacy mode state can be re-assigned after switching the system, and an unconditional recovery interface is provided, so that the privacy mode state can be recovered through initialization when the system scheduling is problematic.

[0076] Scenario two, folding change, the corresponding scenario ID is 0xB: the folding change interface is used to listen to folding information of the folding screen device, and to determine the type of folding change. Specifically, if it is folding-unfolding change, that is, the folding screen device changes from the folded state to the unfolded state, the folding screen device can directly exit the super privacy mode, and if it is unfolding-folding change, that is, the folding screen device changes from the unfolded state to the folded state, the folding screen device can enter the folding protection state to wait for the module to complete on-site protection. In addition, when the opening and closing signal is inconsistent with the bending hardware signal obtained internally, relevant warning prompts (such as a prompt that the system may be intruded) can be collected.

[0077] Scenario three, folding protection, the corresponding scenario ID is 0xC: after starting folding protection, when the folding state of the folding screen device changes, the signal transmitted by the target module can be accepted and recorded. When all target modules are ready to perform a power-off operation (enter the super privacy state), the bending signal change is listened to. When the bending signal changes, all flag bits are cleared and the signals transmitted by each target module are re-recorded.

[0078] Scenario four, waiting for timeout, immediately powering off, the corresponding scenario ID is 0xD: when the privacy mode service center notifies all target modules to do on-site protection and enter the privacy mode, if no signal of on-site protection completion is received from the target modules within x seconds, all target modules can be immediately disconnected and enter the super privacy state.

[0079] In order to facilitate understanding, the control method of the electronic device provided by the embodiments of the present application will be introduced below in combination with a complete example. As shown in FIG. 1, Figure 9 FIG. 2 is a flowchart of a control method of an electronic device provided by an embodiment of the present application, Figure 9 The electronic device to which the flowchart shown in FIG. 2 is directed is a folding screen device, and the target event can be an event that the folding screen device is folded. That is, Figure 9 The flowchart shown in FIG. 3 shows a process of controlling each target module of the electronic device by applying the method provided by the embodiments of the present application when the folding screen device is folded. Figure 9The target modules in the flowchart shown can include a camera module, a microphone module, a positioning module, a star flash module, and a sensor hub. Among them, the sensor hub can be used to uniformly manage various sensors in the foldable screen device. Traditional sensors directly interact with the CPU for data, and many algorithms (such as 9-axis algorithms, 6-axis algorithms, and gesture algorithms) are run on the application processor (AP) side. Exemplarily, the operating system, user interface, and application program of the foldable screen device are executed on the AP, resulting in high CPU power consumption. Moreover, after the electronic device is in sleep, all algorithms will stop running. By collecting all sensors that originally interact directly with the CPU and processing them by the sensor hub, and then interacting with the CPU by the sensor hub, the CPU burden can be reduced. Moreover, after the electronic device is in sleep, the sensor hub can continue to work.

[0080] As shown in Figure 9 , the foldable screen management service in the foldable screen device can uniformly collect the folding state information of the foldable screen device and make subsequent logical processing. When the folding state of the foldable screen device changes, the foldable screen management service can notify the folding state information to each related module through broadcasting. For example, when the foldable screen device changes from an unfolded state to a folded state, the foldable screen management service can notify the folding state information to the message listening module in the security component service. After receiving the information broadcasted by the foldable screen management service, the message listening module can determine the current state of the foldable screen device and make corresponding logical processing.

[0081] When the folding state information is folding state information indicating that the foldable screen device changes from an unfolded state to a folded state, the message listening module can distribute the folding state information. For example, as shown in Figure 9 , the message listening module can distribute the folding state information to the super privacy mode center in the security common service and the super privacy mode software switch control module in the security component service.

[0082] Among them, the super privacy mode center can deliver the information to the super privacy mode CA through broadcasting, and then the super privacy mode CA delivers the information to the super privacy mode TA. After the command processing module in the super privacy mode TA verifies the information through UUID, permission group, etc. verification method, the information can be delivered to the super privacy mode driver. On the other hand, after the super privacy mode software switch control module in the security component service receives the information, it can deliver the folding information to each related module. At this time, the foldable screen device can enter the privacy mode and power down each target module. Before power down, each target module can perform power down preparation, that is, complete the on-site protection processing before power down.

[0083] As shown in Figure 9As shown, the super privacy mode software switch control module can pass the folding information to the sensor privacy service and the setting center. The sensor privacy service can send the folding information to the camera service, and the camera service distributes the message to the underlying services, that is, the services that need to be closed in the camera service. In this process, each service is powered down and ready, on-site protection is done, and important information is packaged. After the underlying services complete the on-site protection, the confirmation message can be aggregated to the camera service center, and the message is notified to the security and privacy center. The security and privacy center receives the message and notifies the super privacy mode TA and the privacy mode driver.

[0084] After the super privacy mode software switch control module sends the folding information to the setting center, the setting center can close the location service according to the received information, and notify the star flash module, the sensor hub and the positioning module to perform on-site protection. After each target module completes the on-site protection, the star flash module and the positioning module can send a confirmation signal to the location management service. The confirmation signal can be passed to the privacy mode CA. The camera module and the sensor hub can directly send the signal to the privacy mode CA. The privacy mode CA can be in a waiting state, and once it receives the message that each target module has completed the on-site protection, it can send a confirmation signal to the privacy mode driver module, which performs subsequent processing.

[0085] The privacy mode driver can make a judgment each time it receives a signal. When all target modules are ready, the driver module can power down each target module, and the folding screen device enters a "super" privacy state.

[0086] In a possible implementation manner of the embodiment of the application, the folding state information received by the folding screen management service can be unfolding state information indicating that the folding screen device changes from the folded state to the unfolded state. At this time, each target module needs to be powered on, and after a short delay, the privacy mode driver notifies each target module to resume operation. In this way, it can be ensured that each target module resumes in a device safe power-on state, avoiding security problems such as system crash and function unavailability caused by each target module directly resuming before power-on when the timing is stuck, and each target module receives the unfolding state information first after the privacy mode driver receives the unfolding state information.

[0087] The method provided in the embodiment of the application can ensure the accuracy of information transmission during the power-on and power-off operation of each target module when the folding state of the folding screen device changes, and needs the cooperation of software and hardware. In the case of repeated folding of the device by the user, the folding signal and the signal for on-site protection of each target module may be disordered, causing the folding screen device to malfunction. To solve this problem, the embodiment of the application can perform secondary verification and confirmation before the super privacy mode CA transmits information to the super privacy mode TA. The folding state represented by the information transmitted to the super privacy mode TA is consistent with the folding state represented by the information broadcast by the folding screen management service.

[0088] In a possible implementation manner of the embodiment of the application, when the folding screen device is folded, each target module can record the current on-off state, and then start to disable the related function. When the folding screen device is unfolded, each target module can restore the previously recorded on-off state.

[0089] As shown in the foregoing introduction of each embodiment, as shown in Figure 10 The method provided in the embodiment of the application can include the following steps:

[0090] S1001, monitoring a target event by a trusted execution environment module of an electronic device.

[0091] The electronic device in the embodiment of the application can include a mobile phone, a tablet computer, a wearable device, and the like. The electronic device can also be a folding screen device. For example, a folding mobile phone and the like.

[0092] The trusted execution environment module can be the TEE module in the foregoing embodiments. The TEE module is deployed with a driver module and is configured with control switches of a plurality of target modules. The control switches of the plurality of target modules can be integrated in a same port in the TEE module.

[0093] In a possible implementation manner of the embodiment of the application, the target module can include a camera module, a microphone module, a positioning module, a star flash module, or a sensor hub. That is, the camera, the microphone, and the GPS module, the star flash module, and the sensor hub module in the foregoing embodiments.

[0094] The target event can refer to those events that need to be protected on the electronic device after the events occur, so as to prevent the leakage of user privacy.

[0095] In an example, the electronic device can be a foldable screen device, and the target event for the foldable screen device can be that the foldable screen device changes from an unfolded state to a folded state. Therefore, monitoring the target event by the TEE module of the electronic device can mean that the TEE module in the foldable screen device receives an opening and closing signal of the foldable screen device sent by the privacy mode CA, and the opening and closing signal can be used to represent that the foldable screen device changes from the unfolded state to the folded state. When the TEE module receives the opening and closing signal, it can be considered that the target event occurs, and the TEE module needs to make further protection for the target event.

[0096] In a possible implementation manner of the embodiment of the present application, after the TEE module in the foldable screen device receives the opening and closing signal of the foldable screen device sent by the privacy mode CA, since the opening and closing signal belongs to a software signal, the foldable screen device can further obtain a folding hardware signal, and the folding hardware signal can be a hardware signal representing that the foldable screen device changes from the unfolded state to the folded state. If the opening and closing signal received by the TEE module is consistent with the obtained folding hardware signal, it is determined that the target event occurs.

[0097] S1002, when receiving the information that the target event occurs, sending a power-off instruction to the driving module, and the power-off instruction is used to drive the target module to power off.

[0098] In the embodiment of the present application, the TEE module sends a power-off instruction to the driving module after receiving the information that the target event occurs, which can be implemented in a privacy mode. The privacy mode can be the privacy mode or the super privacy mode introduced in the foregoing embodiments. In the privacy mode, when the TEE module receives the information that the target event occurs, the TEE module can send a power-off instruction to the driving module, and the driving module drives to disconnect the control switch of the target module, thereby realizing the power-off of the target module.

[0099] In a possible implementation manner of the embodiment of the present application, the control switches of the plurality of target modules can be integrated into the same port in the TEE module. Therefore, when the driving module drives the plurality of target modules to power off based on the power-off instruction, the driving module can simultaneously drive to disconnect the control switches of the plurality of target modules, so that the plurality of target modules power off at the same time, and the consistency of the time sequence is ensured.

[0100] In another possible implementation manner of the embodiment of the present application, when receiving the information that the target event occurs, sending a power-off instruction to the driving module includes: when receiving the information that the target event occurs, broadcasting the information to the target module through the privacy mode CA, and the information can be used to instruct the target module to prepare for power-off; and when receiving the information that the target module feeds back through the privacy mode CA that the power-off preparation is completed, sending a power-off instruction to the driving module.

[0101] That is, when the TEE module receives the information of the target event sent by the privacy mode CA, the privacy mode CA will also immediately notify each target module to prepare for power-off in the form of broadcast. After each target module completes the power-off preparation, it can feed back a message of preparation completion to the privacy mode CA, and the privacy mode CA can send the message of preparation completion fed back by each target module to the TEE module. After all target modules complete the power-off preparation, the TEE module sends a power-off instruction to the driver module. In this way, the problem that the TEE module directly sends a power-off instruction to the driver module, resulting in sudden power-off of the target module and failure of normal operation of other associated modules or systems, can be avoided.

[0102] In the embodiment of the present application, after the privacy mode CA broadcasts the information of the target event to the target module, if the TEE module does not receive the information of the target module power-off preparation completion fed back by the privacy mode CA, the TEE module can send a power-off instruction to the driver module at a preset time after the privacy mode CA broadcasts the target event. The preset time can be a certain time point after the privacy mode CA broadcasts the target event. For example, x seconds. If the TEE module does not receive the message of the target module power-off preparation completion fed back by the privacy mode CA after waiting for x seconds after the privacy mode CA broadcasts the target event to the target module, the TEE module can send a power-off instruction to the driver module, and the driver module cuts off the control switch of the target module to power off the target module. The value of x can be determined according to actual needs, and the embodiment of the present application does not limit this.

[0103] In a possible implementation manner of the embodiment of the present application, the power-off preparation completed by the target module can include at least one of the following processes: terminating the service currently executed by the target module and storing key data of the service; or decoupling the target module from other modules; or decoupling each module inside the target module.

[0104] In the embodiment of the present application, when the TEE module sends a power-off instruction to the driver module, the TEE module can also verify the target event to confirm the authenticity of the target event.

[0105] In a possible implementation manner of the embodiment of the present application, when the TEE module receives the information of the target event, the TEE module can also obtain a key carried in the information indicating the target event. The information indicating the target event can be information transmitted in the process that other application programs access the driver module. The TEE module can verify the target event based on the key carried in the information. If the target event passes the verification, it means that the target event is authentic and credible, for example, the folding screen device is indeed changed from the unfolded state to the folded state. At this time, the TEE module sends a power-off instruction to the driver module.

[0106] When the key carried in the information indicating the target event is used to verify the target event, the key can be matched with the key in the currently configured privacy mode; if the key carried in the information and the corresponding key in the currently configured privacy mode are both matched successfully, it can be determined that the target event verification is passed; otherwise, it is determined that the target event verification is not passed. The key can include at least one of a UUID, a permission group key, or a scene ID.

[0107] As an example of an embodiment of the present application, the TEE module can first match the UUIDs to determine whether the UUIDs are the same. If the UUIDs are different, the TEE module can not send the power-off instruction to the driver module. If the UUIDs are the same, the TEE module can continue to match the permission group keys. When the permission group keys are not matched successfully, the TEE module will continue to match the scene ID only after the permission group keys are matched successfully. Otherwise, the TEE module can not send the power-off instruction to the driver module. When the UUID, the permission group key, and the scene ID are all matched successfully, the TEE module sends the power-off instruction to the driver module, and the driver module drives the control switches of each target module to be off, thereby achieving the power-off of each target module.

[0108] The embodiments of the present application can divide the functional modules of the electronic device according to the above method examples. For example, each functional module can be divided according to each function, or one or more functions can be integrated into one functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, another division manner can be used. The following will be described by taking the division of each functional module according to each function as an example.

[0109] According to the above various embodiments, referring to Figure 11 , a structural block diagram of an electronic device provided by an embodiment of the present application is shown. The electronic device can be configured with the trusted execution environment module 1101 and the driver module 1102 in the above various embodiments. The driver module 1102 is deployed in the trusted execution environment module 1101, and the control switch of the target module 1103 is also configured in the trusted execution environment module 1101. When the trusted execution environment module 1101 receives the information indicating that the target event occurs, the trusted execution environment module 1101 can send the power-off instruction to the driver module 1102. The power-off instruction can be used to drive the target module 1103 to power off.

[0110] In a possible implementation of the embodiment of the present application, the number of target modules 1103 can be multiple, and the control switches of the multiple target modules 1103 can be integrated into the same port in the trusted execution environment module 1101. In this way, the power-off instruction described above can be used to simultaneously drive the control switches of the multiple target modules 1103 to be disconnected, so that the multiple target modules 1103 are powered off at the same time.

[0111] In a possible implementation of the embodiment of the present application, the trusted execution environment module 1101 can also be configured to: when receiving the information about the occurrence of the target event, broadcast, to the target module 1103 through the privacy mode CA, the information about the occurrence of the target event, which is used to instruct the target module 1103 to prepare for power-off; and when receiving the information about the completion of the power-off preparation of the target module 1103 fed back through the privacy mode CA, send, to the driving module 1102, the power-off instruction.

[0112] In a possible implementation of the embodiment of the present application, the trusted execution environment module 1101 can also be configured to: if the information about the completion of the power-off preparation of the target module 1103 fed back by the privacy mode CA is not received, send, to the driving module 1102, the power-off instruction at a preset time after the target event is broadcasted by the privacy mode CA.

[0113] In the embodiment of the present application, the power-off preparation can include at least one of the following processes:

[0114] terminating a service currently executed by the target module 1103 and storing key data of the service; or

[0115] decoupling the target module 1103 from other modules; or

[0116] decoupling each module inside the target module 1103.

[0117] In a possible implementation of the embodiment of the present application, the trusted execution environment module 1101 can also be configured to: when receiving the information about the occurrence of the target event, obtain a key carried in the information indicating the target event; perform verification on the target event based on the key; and if the target event passes the verification, send, to the driving module 1102, the power-off instruction.

[0118] The verification on the target event based on the key can include: matching the key with a key in a currently configured privacy mode; if the key and the corresponding key in the currently configured privacy mode are both matched successfully, determining that the target event passes the verification; otherwise, determining that the target event fails the verification.

[0119] In a possible implementation of the embodiment of the present application, the key can include at least one of a UUID, a permission group key, or a scene ID.

[0120] In a possible implementation of the embodiment of the application, the electronic device can be a foldable screen device. When the electronic device is a foldable screen device, the trusted execution environment module 1101 can further be configured to receive an opening and closing signal of the foldable screen device, the opening and closing signal being used to represent that the foldable screen device is switched from an unfolded state to a folded state.

[0121] In another possible implementation of the embodiment of the application, the trusted execution environment module 1101 can further be configured to obtain a folding hardware signal of the foldable screen device, the folding hardware signal being a hardware signal used to represent that the foldable screen device is switched from the unfolded state to the folded state; and when the opening and closing signal is consistent with the folding hardware signal, the target event occurs.

[0122] In a possible implementation of the embodiment of the application, the target module 1103 can include at least one of the following modules in the electronic device: a camera module, a microphone module, a positioning module, a star flash module, or a sensor hub.

[0123] The embodiment of the application also provides a control device of an electronic device. By using the device, the steps or functions that can be implemented by the related modules of the electronic device in the foregoing method embodiments can be implemented.

[0124] The above method embodiments relate to all related contents of each step, which can be referred to the function description of the corresponding function module, and will not be repeated here.

[0125] The embodiment of the application also provides an electronic device, which can be the electronic device in each embodiment. The electronic device includes 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 control method of the electronic device in the foregoing embodiments can be implemented. In a possible implementation, the electronic device can be a foldable screen device.

[0126] The embodiment of the application also provides a computer readable storage medium, which stores computer instructions. When the computer instructions are executed on the electronic device, the electronic device executes the related method steps described above, so that the control method of the electronic device in the foregoing embodiments can be implemented.

[0127] The embodiment of the application also provides a computer program product, which, when executed on a computer, causes the computer to execute the related steps described above, so that the control method of the electronic device in the foregoing embodiments can be implemented.

[0128] The chip can be a processor, or the chip includes a processor. The processor can be a general processor or a special processor. The processor is configured to support the electronic device to perform the above-mentioned related steps to implement the control method of the electronic device in the above-mentioned various embodiments.

[0129] Optionally, the chip further includes a transceiver configured to be controlled by the processor and support the electronic device to perform the above-mentioned related steps to implement the control method of the electronic device in the above-mentioned various embodiments.

[0130] Optionally, the chip can further include a storage medium.

[0131] The chip can be implemented by using one or more of the following circuits or devices: a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a state machine, a gate logic, a discrete hardware component, any other suitable circuit, or any combination of circuits capable of performing the various functions described throughout this application.

[0132] Finally, it should be noted that the above-mentioned is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application.

Claims

1. A control method of an electronic device, characterized by, The method comprises the following steps: When the electronic device changes from an unfolded state to a folded state, a control switch of a target module of the electronic device is disconnected, and the target module of the electronic device is powered off, the target module comprising at least one of a camera module, a microphone module, a positioning module, a star flash module or a sensor hub of the electronic device, the control switch of the target module being configured in a trusted execution environment of the electronic device, the electronic device being a foldable screen device; When the electronic device changes from the folded state to the unfolded state, the target module is powered on.

2. The method of claim 1, wherein, The step of, when the electronic device changes from an unfolded state to a folded state, a control switch of a target module of the electronic device is disconnected, and the target module of the electronic device is powered off, comprises the following steps: When the electronic device changes from the unfolded state to the folded state, the target module is instructed to prepare for power-off; After the target module completes the power-off preparation, the target module is powered off.

3. The method of claim 2, wherein, The power-off preparation comprises at least one of the following processes: Terminating a service currently executed by the target module and storing key data of the service; or Decoupling the target module from other modules; or Decoupling each module inside the target module.

4. The method according to claim 2 or 3, characterized in that, The step of, after the target module completes the power-off preparation, powering off the target module, comprises the following step: After the target module completes the power-off preparation, the control switch of the target module is disconnected, so that the target module is powered off.

5. The method of claim 4, wherein, The method further comprises the following step: At a preset time after the electronic device changes from the unfolded state to the folded state, if the target module has not completed the power-off preparation, the target module is directly powered off.

6. The method of claim 4, wherein, The number of target modules is plural, and the control switches of the plural target modules are integrated into a same port of the trusted execution environment; the step of powering off the target module further comprises the following step: The plural target modules are simultaneously powered off.

7. The method according to any one of claims 1 to 3 or 5 to 6, characterized in that, After the target module of the electronic device is powered off, the method further comprises the following step: The electronic device enters a privacy mode, in which the target module is in a power-off state and cannot be started.

8. The method of claim 7, wherein, Before the target module is powered on, the method further comprises the following step: The electronic device exits the privacy mode.

9. The method according to any of claims 1 to 3 or 5 to 6 or 8, characterized in that, The step of, when the electronic device changes from an unfolded state to a folded state, a control switch of a target module of the electronic device is disconnected, and the target module of the electronic device is powered off, further comprises the following steps: When the electronic device changes from the unfolded state to the folded state, a key carried in information indicating a target event is acquired, the target event being the electronic device changing from the unfolded state to the folded state; The target event is verified based on the key; If the target event passes the verification, the target module is powered off.

10. The method of claim 9, wherein, The step of verifying the target event based on the key comprises the following steps: The key is matched with a key in a currently configured privacy mode; If the key and the corresponding key in the currently configured privacy mode are both successfully matched, it is determined that the target event passes the verification; otherwise, it is determined that the target event fails the verification.

11. The method of claim 9, wherein, The key comprises at least one of a universally unique identifier (UUID), an authority group key or a scene ID.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor implements the control method of the electronic device according to any one of claims 1 to 11 when executing the computer program.

13. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a memory and a processor, and the processor executes the computer program stored in the memory to implement the control method of the electronic device according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Auxiliary device and mobile electronic device subassembly

    CN205485729U