Control method of electronic equipment and electronic equipment

By building a trusted execution environment module in electronic devices and using the power-up and down control of hardware devices, the problem of modules being illegally called by malicious programs in the existing technology in the privacy mode of electronic devices is solved, and stricter and more accurate privacy protection is achieved. Reduces the risk of user privacy leakage.

CN118981768AActive Publication Date: 2024-11-19HUAWEI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411091225.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2024-11-19
Estimated Expiration
2043-12-18

Smart Images

  • Figure CN118981768A_ABST
    Figure CN118981768A_ABST
Patent Text Reader

Abstract

The embodiment of the invention is suitable for the technical field of terminals, and provides a control method of electronic equipment and the electronic equipment. By applying the method, the trusted execution environment module in the electronic equipment can send the power-off instruction to the driving module when receiving the information of the occurrence of the target event, so as to drive and disconnect the control switch of the target module, thereby realizing the power-off of the target module. The control switch and the driving module of the target module can be configured or installed in the trusted execution environment module. Thus, the process of receiving the power-off instruction by the driving module and driving to disconnect the control switch of the target module can be completed in the trusted execution environment module, and the safety of the processing process is improved. Besides, disconnection of the control switch of the target module to power-off of the target module belongs to control of a physical level, compared with stopping of use of the target module in a software instruction form, the safety of the control process is greatly improved, and the possibility of user privacy disclosure is further reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202311754303.8, and the original application date is December 18, 2023. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The embodiments of the present application relate to the field of terminal technology, and in particular to a control method of an electronic device and the electronic device. Background Art

[0003] The development of information technology and mobile communication technology has brought many conveniences to people's lives. People can use mobile phones and other electronic devices to conveniently complete operations such as shopping, taking taxis, and paying bills. In the process of using electronic devices, electronic devices also hold more and more information. Once this information is leaked, it may have an adverse impact on 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, the camera can be disabled after the electronic device turns off the screen. In this way, the electronic device in the screen-off state cannot capture images or shoot videos through the camera, which reduces the possibility of information leakage and protects the privacy of the user. The above-mentioned privacy protection in the prior art is mainly achieved through software control, where the electronic device issues a disabling instruction to individual modules or devices in the form of software instructions to shut down the operation of these modules or devices. However, in some cases, these modules or devices that have stopped running may still be enabled, making it difficult to strictly protect user privacy. For example, if an electronic device is invaded by a malicious program, in the screen-off state, the malicious program may illegally call the camera to capture images without the user's knowledge, causing the user's privacy to be leaked. Summary of the invention

[0005] The embodiments of the present application provide a control method for an electronic device and an electronic device, which can improve the control of the privacy mode from a software framework to being completed by powering on and off the hardware device, thereby achieving stricter and more accurate privacy protection.

[0006] In order to achieve the above objectives, this application adopts the following technical solutions:

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

[0008] By applying the control method of the electronic device provided by the embodiment of the present application, a trusted execution environment (TEE) module can be constructed in the electronic device, and the processing of sensitive data in the electronic device can be implemented by the TEE module, so as to realize the privacy computing and protection of sensitive data. When the TEE module receives the information of the target event, the TEE module can send a power-off instruction to the driver module, and the driver module drives the target module in the electronic device to power off. The embodiment of the present application deploys the driver module in the TEE module so that the data processing of the driver 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 the hardware control switch. When the driver module in the TEE module drives the control switch of the target module to disconnect, each target module can be powered off, realizing the on-off of each target module at the physical level, and any software-level operation cannot control the operation of each target module, which not only realizes the control at the hardware level, but also improves the security of the control process.

[0009] It should be understood that the target event may be some event that occurs on the electronic device. When such an event occurs or occurs, if the operation of the target module is not properly controlled, the user's privacy may be adversely affected due to the continued operation of the target module. For example, if the electronic device is a folding screen device, after the folding screen device is folded, if the camera, microphone and other modules are allowed to continue to run, the camera, microphone and other modules may collect the user's privacy data without the user's knowledge, increasing the risk of user privacy leakage. Therefore, when the target event occurs, these target modules can be physically powered off through the driver module, which can reduce the risk of user privacy leakage.

[0010] In a possible implementation manner of the embodiment of the present application, the target module may 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 of the embodiment of the present application, there are multiple target modules, and the control switches of the multiple target modules are 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 and disconnect the control switches of multiple target modules, so that the multiple target modules are powered off at the same time to ensure timing consistency.

[0012] In a possible implementation of the embodiment of the present application, when information about the occurrence of a target event is received, a power-off instruction is sent to the driver module, including: when information about the occurrence of a target event is received, the information about the occurrence of the target event is broadcast 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, that is, on-site protection before power-off; when information about the completion of power-off preparation is received from the target module via the privacy mode CA, it indicates that the on-site protection of each target module is completed, and the TEE module can send a power-off instruction to the driver module. In this way, when the TEE module receives information about the occurrence of a target event, it can promptly notify the target module through the privacy mode TA to prepare for power-off, avoid sudden power-off of the target module, and help ensure the normal operation of other modules and systems.

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

[0014] It should be understood that power-off preparation may include at least one of the following processes: terminating the business currently executed by the target module and storing key data of the business; or, decoupling the target module from other modules; or, decoupling the modules 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 operate normally after the target module is powered off can also be prevented; by decoupling the modules inside the target module, the modules inside the target module can be protected, and the probability of the target module failing to start after powering on again can be reduced.

[0015] In a possible implementation of an embodiment of the present application, when the TEE module receives information about the occurrence of a target event, the TEE module can verify the authenticity of the target event, and when the target event verification passes, the TEE module sends a power-off instruction to the driver module. Specifically, when the TEE module receives information about the occurrence of a target event, the TEE module obtains the key carried in the information indicating the target event; verifies the target event based on the key; when the target event verification passes, the TEE module sends a power-off instruction to the driver module. Among them, the above-mentioned information about the occurrence of the target event can be sent to the TEE module by the privacy mode CA, and the TEE module sending the power-off instruction to the driver module can be implemented by the privacy mode TA, that is, after the target event verification passes, the privacy mode TA in the TEE module sends a power-off instruction to the driver module.

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

[0017] In a possible implementation of an embodiment of the present application, the key carried in the information transmitted by other applications or programs may include at least one of a universal unique identifier UUID, a permission group key, or a scene ID. When the TEE module verifies the target event based on the key, it 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 successfully matched, it can be determined that the target event verification has passed; otherwise, it is determined that the target event verification has not passed. In one example, if the target event is that the folding screen device changes from an unfolded state to a folded state, the passing of the target event verification can indicate that a folding event has actually occurred on the folding screen device, and the target module needs to be powered off to protect the user's privacy and security. Therefore, the TEE module can send a power-off instruction to the driver module after the target event verification passes.

[0018] In a possible implementation of the embodiment of the present application, the electronic device may be a folding screen device, and the target event may be an event in which the folding screen device changes from an unfolded state to a folded state. Therefore, receiving information about the occurrence of the target event through the TEE module of the electronic device may refer to receiving an opening and closing signal of the folding screen device sent by the privacy mode CA through the TEE module in the folding screen device, and the above-mentioned opening and closing signal is a signal used to characterize the transition of the folding screen device from the unfolded state to the folded state, and the opening and closing signal is a software signal.

[0019] In another possible implementation of the embodiment of the present application, after receiving the opening and closing signal of the folding screen device sent by the privacy mode CA through the TEE module in the folding screen device, the bending hardware signal of the folding screen device can also be actively acquired by driving, and the above bending hardware signal can be a hardware signal representing the transition of the folding screen device from the unfolded state to the folded state. In this way, if the opening and closing signal is consistent with the bending hardware signal, it can be determined that the target event has occurred, so as to perform subsequent processing; otherwise, it can be considered that the target event has not occurred.

[0020] In a second aspect, an electronic device is provided, wherein a TEE module and a driver module are configured in the electronic device. The driver module is deployed in the TEE module, and a control switch of a target module is also configured in the TEE module; when the TEE module receives information that a target event has occurred, 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 may include multiple, and the control switches of the multiple target modules may 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 disconnect, so that the multiple target modules are powered off at the same time, ensuring the consistency of the timing.

[0022] In another possible implementation of the second aspect, the information of the occurrence of the target event received by the TEE module in the electronic device can be sent to the TEE module by the privacy mode CA. When the target event occurs, the privacy mode CA can monitor the occurrence of the target event and send the relevant information to the TEE module. On the other hand, the privacy mode CA can broadcast the information of the occurrence of the target event to the target module, notifying the target template to perform power-off preparation processing. After the target module completes the power-off preparation, it can feedback the message of the completion of the power-off preparation to the TEE module. The target module feedbacks the message of the completion of the power-off preparation to the TEE module can also be implemented by the privacy mode CA, that is, after the target module completes the power-off preparation, it feedbacks the message to the privacy mode CA, and then the privacy mode CA feeds back the message of the completion of the power-off preparation of each target module to the TEE module. After all target modules have completed 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, the electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement the control method of the electronic device as described in any one of the first aspects above when executing the computer program.

[0024] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the control method of the electronic device as described in any one of the first aspects above.

[0025] In a fifth aspect, a chip is provided, the chip comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the control method of the electronic device as described in any one of the first aspects above.

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

[0027] Figure 1 It is a schematic diagram of the differences between the control method of the electronic device provided in the embodiment of the present application and the related method in the prior art;

[0028] Figure 2 is a schematic diagram of the architecture of a system to which a control method for an electronic device provided in an embodiment of the present application is applicable;

[0029] Figure 3 is a schematic diagram of a control method of an electronic device provided in an embodiment of the present application;

[0030] Figure 4 This is a schematic diagram of an interface operation for enabling privacy protection provided in an embodiment of the present application;

[0031] Figure 5 This is a schematic diagram of an interface operation for closing privacy protection provided in an embodiment of the present application;

[0032] Figure 6 is a schematic diagram of the control logic of a target module provided in an embodiment of the present application;

[0033] Figure 7 is a schematic diagram of controlling power-off of a GPS module provided in an embodiment of the present application;

[0034] Figure 8 It is a schematic diagram of a permission verification process provided by an embodiment of the present application;

[0035] Fig. 9 It is a flowchart of a control method of an electronic device provided in an embodiment of the present application;

[0036] Fig.10 It is a schematic diagram of the steps of a control method of an electronic device provided in an embodiment of the present application;

[0037] Fig.11It is a structural block diagram of an electronic device provided in 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, words such as "first" and "second" are used to distinguish the same or similar items with basically the same functions and effects. For example, the first module, the second module, etc. are only used to distinguish different modules in the electronic device and do not make other limitations thereon.

[0039] It should be noted that, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0040] The business scenarios described in the embodiments of the present application are intended 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 in the embodiments of the present application. Ordinary technicians in this field can know that with the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0041] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0042] The steps involved in the control method of an electronic device provided in the embodiment of the present application are only examples, not all steps are steps that must be executed, or not all contents in each step are mandatory, and can be increased or reduced as needed during use. The same step or steps or contents with the same function in the embodiment of the present application can be referenced and learned from each other in different embodiments.

[0043] Generally, electronic devices can prevent the user's privacy from being leaked by disabling the functions of individual modules or devices. For example, when the electronic device is off screen, the electronic device can disable the camera. In this way, the disabled camera cannot operate normally, which can prevent the electronic device in the off screen state from illegally collecting images without the user's knowledge. Or, after 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 software instructions. For example, after the electronic device is off screen, the processor of the electronic device can send instructions to the camera to instruct the camera to stop running or turn off the use of related functions. This disabling method is a software on-off, and its control of related modules is implemented based on the software framework of the electronic device. In some cases, such as after the operating system of the electronic device is illegally invaded, these disabled modules may still be illegally started. For example, in the off screen state, after the electronic device instructs the camera to turn off the image acquisition function through software instructions, the software program that illegally invades the electronic device may restart the camera and continue to collect images in the off screen state. In this way, the camera is still operating normally without the user's knowledge, increasing the risk of user privacy leakage.

[0044] In view of the above problems, the embodiment of the present application provides a control method for an electronic device. By using this method, the control of some modules of the electronic device can be implemented by hardware devices on the electronic device. Figure 1 As shown, 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. Figure 1 It can be seen that in the prior art, disabling related modules is achieved through a software framework, and the control of these related modules is implemented on the basis of the software framework, that is, the control point in the prior art is on the software framework. The control method of the electronic device provided by the embodiment of the present application is used to achieve module disabling, which is based on hardware devices, that is, the control point in this method is on the hardware device. In this way, the on-off in the hardware sense can be achieved through the control of the hardware device, thereby achieving the purpose of "super" privacy protection. For example, in some cases when individual modules need to be disabled, the electronic device can directly control the power off of the related modules from the hardware side, disable various functions of the related modules, achieve hardware-level isolation, realize true module disabling, and further protect the privacy and security of users.

[0045] The control method of the electronic device provided in the embodiment of the present application can be applied to electronic devices, such as mobile phones, tablet computers, wearable devices, etc. Among them, the above electronic devices can also be folding screen devices.

[0046] like Figure 2FIG. 1 is a schematic diagram of the architecture of a system to which a control method of an electronic device according to an embodiment of the present application is applicable. Figure 2 In the system architecture shown, the electronic device may include a trusted execution environment TEE. TEE is relative to the rich execution environment (REE). REE is an open environment in the operating system. The system running in REE is called Rich OS or REEOS, and the application or program running in REE can be called client application (Client APP, CA). Due to the openness of REE, REE is vulnerable to attacks by malware or programs, resulting in unsafe incidents such as theft of sensitive data, abuse of digital copyrights, and theft of mobile payments, which affects the security of electronic devices. Compared with REE, TEE can improve the security of electronic devices. The system running in TEE can be called Trusted OS or TEEOS, and the application or program running in TEE can be called a trusted application TA (Trust APP). By applying TEE, the hardware and software resources of the electronic device can be divided into a secure area (Secure World) and a non-secure area (NormalWorld). Among them, the secure area can be used to save important information of the electronic device, such as passwords, fingerprints, facial information, etc. Therefore, if Figure 2 As shown, the electronic device may include a TEE module, a driver module and a target module. Among them, the TEE module, as a central system, is mainly responsible for uploading and issuing information, user identity authentication and information processing, etc. The driver module is deployed in the TEE module, which is responsible for executing various signals sent by the TEE module, and executing power-on and power-off of related modules, as well as signal verification in the data processing process. The target module may refer to a module that is disabled when privacy protection is required, such as a camera module, a microphone module, a positioning module, a Near Link module, etc. The TEE module may be configured with a control switch for the target module. In the process of controlling the power-off of the target module, the driver module can drive the control switch of the above-mentioned target module to disconnect based on the power-off instruction sent by the TEE module, so as to power off the target module.

[0047] based on Figure 2In the system architecture shown, when the target event occurs, the TEE module can receive a message about the target event sent by the privacy mode CA. Among them, the target event may refer to an event that needs to trigger the execution of the target module power-off operation. Usually, when a target event occurs, it may indicate that the user no longer needs to use the electronic device or the related target module in the electronic device at this time. In order to protect the user's privacy, it is necessary to terminate the operation of the target module at this time. Exemplarily, the target event may be an event in which the folding screen device is folded. When the folding screen device is folded, that is, when the folding screen device is converted from an unfolded state to a folded state, it may indicate that the user is no longer using the folding screen device. At this time, the operation of some target modules can be stopped.

[0048] The message 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 the target event. At the same time, the privacy mode CA can notify the target module electronic device that the target event has occurred at this time, and the target module is prepared to power off. In the embodiment of the present application, the power-off preparation of the target module can refer to the on-site protection processing 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 of the embodiment of the present application, the on-site protection of the target module may include terminating the business currently executed by the target module and storing key data of the business; or, decoupling the target module from other modules; or, decoupling each module inside the target module. By terminating the currently executed business and storing key data of the business, the problem of data loss due to sudden power failure of the target module can be avoided; by decoupling the target module from other modules, the problem of other modules associated with the target module not being able to operate normally 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, reducing the probability that the target module cannot be started after powering on again.

[0050] After the target module completes the on-site protection, the target module can feedback a message to the TEE module via the privacy mode CA, and the privacy mode CA informs 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 will be unavailable after powering off, and the electronic device will enter the privacy mode. In privacy mode, the disabled electronics cannot be restarted. Since the target module has been physically powered off, no operation at the software level can control the target module. Therefore, even if the electronic device is invaded by an illegal application or illegal program, the illegal application or illegal program cannot start the disabled target module in privacy mode. In this way, the user's privacy can be fully protected to prevent the target module from being illegally started without the user's knowledge.

[0051] like Figure 3 , which is a schematic diagram of a control method for an electronic device provided in an embodiment of the present application. Figure 3 The figure shows a flow chart of a control method of an electronic device provided by an embodiment of the present application implemented on a folding screen device. Specifically, Figure 3 The example shown in the figure is a process of applying this method on a folding screen device to power off the camera, microphone and global positioning system (GPS) module, thereby realizing user privacy protection.

[0052] like Figure 3 As shown, the folding screen device can provide a setting interface, which may include multiple menu options. The user can operate in the interface to turn on the privacy protection option. Exemplarily, the privacy protection option may be a "folding protection" option. When the "folding protection" option is turned on, it means that after the folding screen device is folded, the device enters a privacy protection state. In this state, some modules of the folding screen device will be disabled. Among them, the disabled modules may be sensitive modules in the folding screen device, and these sensitive modules can be used to collect sensitive information or privacy information of the user. For example, collect the user's image and sound information, locate the current location of the user and the folding screen device, etc. Exemplarily, as Figure 3 As shown, the modules disabled in the privacy protection state may include a camera, a microphone, and a GPS module, etc.

[0053] In a possible implementation of the 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 officially enters the privacy protection state.

[0054] In another possible implementation of the 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 user's identity authentication can be achieved by verifying the lock screen password and / or fingerprint of the folding screen device. The data generated during the above identity authentication process can be processed in the TEE module to ensure the security of the verification process.

[0055] When the folding screen device is folded, an opening and closing signal will be generated, which can be used to indicate that the folding screen device is switched from the unfolded state to the folded state. The above 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 the TEE module receives the opening and closing signal, it will notify the target module to prepare for power-off. In other words, the TEE module notifies Figure 3The camera, microphone and GPS module shown in the figure are protected on the spot. By powering off the target module after the target module completes a series of on-site protection operations, the impact of sudden power off of the target module on the normal operation of other modules and the normal operation of the system can be reduced.

[0056] When the target module completes the on-site protection, it means that the power-off preparation of the target module has been completed, and the message of the target module completing the power-off preparation can be transmitted to the TEE module through the privacy mode CA. At this time, the TEE module can notify the driver module of the completion of the on-site protection, and the driver module will power off the target module.

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

[0058] In another possible implementation of the embodiment of the present application, when the number of target modules includes multiple ones, if the TEE module has not received the message that a certain target module transmitted by the privacy mode CA has completed the on-site protection for a certain period of time, the TEE module can directly send a message to the driver module, and the driver module will power off the target module. Exemplarily, after the privacy mode CA sends a notification of power-off preparation to the target module, if the TEE module has not received the message that the target module has completed the on-site protection for more than x seconds, the TEE module can directly send a message to the privacy mode driver module, and the driver module will power off the target module. The above-mentioned 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 folding screen device will enter the privacy mode. In the privacy mode, each target module cannot be started. For example, Figure 3 The camera, microphone, and GPS modules in the phone will be powered off in privacy mode and cannot be enabled.

[0060] In a possible implementation of the embodiment of the present application, in order to improve the fluency of users using the folding screen device and improve the performance of the folding screen device itself, the control switches of multiple target modules can be integrated into the same port in the TEE module, and the above port can be a general purpose input / output port (GPIO). In this way, the driver module can power off multiple target modules at the same time, ensuring the consistency of the timing of multiple target modules and further improving the safety performance of the folding screen device.

[0061] The following describes the specific implementation process of the control method of the electronic device provided by the embodiment of the present application in combination with a specific example. Figure 3 Similar to the example in, the subsequent examples will continue to use the electronic device as a folding screen device as an example.

[0062] like Figure 4 The figure shows an interface operation diagram for opening privacy protection provided by an embodiment of the present application. The above-mentioned privacy protection may refer to the "folding protection" of a folding screen device, that is, the privacy protection function implemented by the folding screen device in the folded state. Figure 4 In (a), a schematic diagram of the setting page of the privacy mode is shown. The privacy mode can be Figure 4 The user can enter the above-mentioned "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, Figure 4 As shown in (a) of FIG. 1 , the introduction information 401 may be as follows: In super privacy mode, applications are prohibited from accessing the camera, microphone, and location information. The user may operate on the "folding protection" option 402 to turn on "folding protection". When the user chooses to turn on the "folding protection" option, the folding screen device may explain the specific protection content in the form of a pop-up window. Figure 4As shown in (b) in FIG. 4 , the pop-up window 403 displays the protection instructions after turning on the “folding protection”, namely: “After folding, the connection of the camera, microphone, and GPS positioning hardware will be disconnected. In this mode, application functions such as phone calls, video chats, photography, navigation, and voice wake-up cannot be used normally, and can be restored after the device is unfolded.” In the pop-up window 403, the folding screen device can provide two options, namely, the “cancel” option 404 and the “turn on folding protection” option 405. After the user reads the protection instructions displayed in the above pop-up window 403, he can choose to turn on folding protection or cancel folding protection. When the user selects the “turn on folding protection” option 405, the folding screen device will officially turn on the “folding protection” function. After the “folding protection” function is turned on, when the folding screen device is folded, the device will officially enter the “super privacy mode”. In super privacy mode, the folding screen device will disconnect the connection of the camera, microphone, and GPS positioning hardware. Application functions such as phone calls, video chats, photography, navigation, and voice wake-up of the folding screen device cannot be used normally.

[0063] In the embodiment of the present application, when the user turns on folding protection, protection instructions are displayed to the user through a pop-up window, which can facilitate the user to fully understand the function; and, through two confirmations, it can also prevent the user from entering the privacy mode setting page due to accidental touch, making it convenient for the user to exit the page at any time, which helps to improve the user experience.

[0064] In a possible implementation method of an embodiment of the present application, when a user operates the folding screen device to exit the "folding protection", the folding screen device may also perform multiple verifications to avoid exiting the "folding protection" due to operations other than the user's own, thereby enhancing the security performance of the folding screen device.

[0065] like Figure 5 , which is a schematic diagram of an interface operation for closing privacy protection provided by an embodiment of the present application. Figure 5 (a) in FIG. 1 shows a schematic diagram of a setting page of the super privacy mode after turning on “folding protection”, wherein the setting page displays introduction information 501 of the “super privacy mode”. Figure 5 In the setting page shown in (a) of FIG. 1 , the “Folding Protection” option 502 is turned on. The user can operate on option 502 to turn off “Folding Protection”. When the user turns off “Folding Protection”, the folding screen device can authenticate the user. In one possible implementation, when the user turns off “Folding Protection”, the folding screen device can first perform the first verification. For example, a pop-up window is used to pull up the fingerprint service and request the user to verify the fingerprint. For example, Figure 5As shown in (b) in the figure, the foldable screen device displays a pop-up window 503, requesting verification of the user's fingerprint. The pop-up window 503 displays introductory information on how to perform fingerprint verification, and also provides a "Cancel" option 504 and a "Use Password" option 505 for the user to exit the first verification, or allow the user to use a password for the first verification. Assuming that the user continues to use the fingerprint for the first verification, when the user's fingerprint verification is successful, the foldable screen device can perform a second verification. The second verification can be a different verification method from the first verification, for example, the second verification can be a password verification. For example, when the user's first fingerprint verification is passed, Figure 5 As shown in (c), the foldable screen device can display a virtual keyboard 506 and a password verification pop-up window 507 for the user to verify the password. If the user's first verification and second verification are both passed, the foldable screen device can exit the "super privacy mode". In one example, if the user's first verification or second verification fails, the foldable screen device requires the user to verify again. When multiple verifications fail, for example, the user fails to pass the first verification or second verification after three attempts, the foldable screen device can automatically lock for a period of time. For example, lock for 5 minutes or 10 minutes. After 5 minutes or 10 minutes, the user is allowed to continue to verify. In another example, in order to protect the security of the device and the privacy of the user, when multiple verifications fail, the automatic lock time of the foldable screen device can continue to be extended. In this way, through the first and second verifications, the security of the foldable screen device can be further improved, and information leakage caused by device loss or non-user operations can be avoided.

[0066] In order to avoid the situation where other associated modules or devices may not work properly due to forced disconnection of the target module by hardware, the folding screen device can send a message to the target module after receiving the opening and closing signal to notify the target module to prepare for power-off. After the target module completes the power-off preparation, the TEE module sends a power-off instruction to the driver module, and the driver module disconnects the control switch of the target module. In a possible implementation method of an embodiment of the present application, if the number of target modules includes multiple, the control switches of multiple target modules can be integrated into the same port of the TEE module. In this way, multiple target modules can be powered off at the same time under the drive of the driver module. When the device is unfolded and the function of the target module needs to be restored, the driver module can also power on multiple target modules at the same time to ensure that the timing of powering on and off multiple modules is consistent.

[0067] like Figure 6 , which is a schematic diagram of the control logic of a target module provided in an embodiment of the present application. Figure 6In the example, the target module includes a camera, a microphone, and a GPS module. The camera may include multiple cameras, such as a main camera, a secondary camera, a telephoto camera, a front camera, and a spectral camera; the microphone may include a main microphone and a secondary microphone. The software control switch of the above modules can be connected to the chip SOC, and the chip can realize the on and off of the module in the software sense. In addition, if Figure 6 As shown, the TEE module of the folding screen device can also be configured with control switches for each module, 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 command to the driver module, and the driver module can disconnect the control switch configured in the TEE module to power off the above multiple modules at the same time.

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

[0069] like Figure 7 , which is a schematic diagram of controlling power off of a GPS module provided in an embodiment of the present application. Figure 7 FIG. 4 shows an example of a process of controlling the power-off of a GPS module by hardware control using the method provided in an embodiment of the present application. Figure 7 , users can turn off location services through the location service switch provided on the settings page related to folding screen devices. At this time, the information about turning off location services will be passed to the location service core component LocationManager. Then, the LocationManager component sends the information about turning off location services to HiGNSS, a related component used to implement location services in the chip SOC, and the HiGNSS component notifies the software driver to turn off location services. After the location service is turned off, the software driver will send a confirmation message to the LocationManager component to confirm the turning off of the location service.

[0070] On the other hand, Figure 7 As shown, after confirming that the location service is closed, the LocationManager component can send a confirmation message to the TEE module, and the TEE module uses the control method provided in the embodiment of the present application to control the GPPS module to power off in a hardware-controlled manner. That is, after the TEE module receives the location service closure confirmation message sent by the LocationManager component, it sends a power-off instruction to the driver module to directly power off the GNSS core that can implement location service-related functions. In this way, the use of the GPS module can be completely disconnected to ensure the privacy and security of the user.

[0071] In the embodiment 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 no instructions from any software side can control the target module. Among them, the driver module used to drive the target module to power on and off is deployed in the TEE module. The driver module only receives signals transmitted by trusted applications, and other interfaces or applications of the device cannot access the driver module. In order to ensure the security of the control process, the communication between each module can increase the permission verification process.

[0072] In a possible implementation of an embodiment of the present application, in super privacy mode, the service manager will access the driver module. The TEE module can verify the key carried in the information transmitted during the service manager access process. Among them, the above-mentioned keys may include multiple different types of keys, such as a universally unique identifier (UUID), a permission group key or a scene ID. During the verification process, only when multiple types of keys are verified, the TEE module allows the service manager to access the driver module.

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

[0074] In a possible implementation of the embodiment of the present application, a variety of logics can be set for the driving module to cope with different scenarios in the super privacy mode. Figure 8 As shown in FIG. 1 , an example of accessing the driver module in four different scenarios is shown. These four scenarios are respectively configured with different scenario IDs. Only when the scenario ID carried by the access program uniquely matches the ID of a certain type of scenario, the corresponding operation is allowed to be performed. Figure 8 As shown, these four scenarios may include:

[0075] Scenario 1, initialization, the corresponding scenario ID is 0xA: used when receiving system startup broadcast, switching users, or using privacy space, etc. By saving the privacy mode status in advance, it can be reassigned after switching the system, and an unconditional recovery interface is provided. When the system scheduling problem causes the privacy mode status to be disordered, it can be restored through initialization.

[0076] Scenario 2, folding change, the corresponding scenario ID is 0xB: The folding change interface is used to monitor the folding information of the folding screen device and determine the type of folding change. Specifically, if it is a folding-unfolding change, that is, the folding screen device changes from a folded state to an unfolded state, the folding screen device can directly exit the super privacy mode. If it is an unfolding-folding change, that is, the folding screen device changes from an unfolded state to a folded state, the folding screen device can enter the folding protection state and wait for the module on-site protection to be completed. In addition, when the opening and closing signal is inconsistent with the bending hardware signal obtained inside the driver, relevant warning prompts can be collected (prompting that the system may be invaded, etc.).

[0077] Scenario 3, 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 received and recorded. When all target modules are ready, the power-off operation is performed (entering the super privacy state), and the bending signal changes are monitored at the same time. When the bending signal changes, all flags are cleared and the signals transmitted by each target module are re-recorded.

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

[0079] For ease of understanding, the control method of the electronic device provided by the embodiment of the present application is introduced below in conjunction with a complete example. Fig. 9 FIG. 1 is a flow chart of a control method of an electronic device provided in an embodiment of the present application. Fig. 9 The electronic device targeted by the process shown in is a folding screen device, and the target event may be an event in which the folding screen device is folded. That is, Fig. 9 The process of controlling various target modules of the electronic device by applying the method provided in an embodiment of the present application when the folding screen device is folded is shown. Fig. 9The target modules in the flowchart shown may include a camera module, a microphone module, a positioning module, a star flash module, and a sensor hub (sensohub). Among them, the sensor hub can be used to uniformly manage various sensors in the folding screen device. Traditional sensors directly interact with the CPU for data, and many algorithms (such as 9-axis algorithms, 6-axis algorithms, gesture algorithms) are run on the application processor (applicationprocess, AP) side. For example, the operating system, user interface, and application program of the folding screen device are all executed on the AP, resulting in high CPU power consumption. Moreover, each algorithm will stop running after the electronic device goes to sleep. By centralizing the various sensors that originally interacted directly with the CPU and handing them over to the sensor hub for processing, and then the sensor hub interacts with the CPU, the CPU burden can be reduced. Moreover, the sensor hub can continue to work when the electronic device goes to sleep.

[0080] like Fig. 9 As shown, the folding screen management service in the folding screen device can uniformly collect the folding status information of the folding screen device and perform subsequent logical processing. When the folding state of the folding screen device changes, the folding screen management service can notify the relevant modules of the folding status information through broadcasting. For example, when the folding screen device changes from an unfolded state to a folded state, the folding screen management service can notify the message monitoring module in the security component service of the folding status information. After receiving the information broadcast by the folding screen management service, the message monitoring module can determine the current state of the folding screen device and perform corresponding logical processing.

[0081] When the folding state information is folding state information indicating that the folding screen device changes from the unfolded state to the folded state, the message monitoring module can distribute the folding state information. Fig. 9 As shown, the message monitoring module can distribute the folded state information to the super privacy mode center in the security public service and the super privacy mode software switch control module in the security component service.

[0082] Among them, the super privacy mode center can transmit information to the super privacy mode CA through broadcasting, and then the super privacy mode CA transmits the information to the super privacy mode TA. After the command processing module in the super privacy mode TA verifies the information through verification methods such as UUID and permission group, it can pass the information to the super privacy mode driver. On the other hand, after receiving the information, the super privacy mode software switch control module in the security component service can pass the folding information to each related module. At this time, the folding screen device can enter the privacy mode and power off each target module. Before powering off, each target module can prepare for power off, that is, complete the on-site protection processing before power off.

[0083] like Fig. 9As shown, the super privacy mode software switch control module can pass the folding information to the sensor privacy service and setting center. Among them, 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 business that needs to be closed in the camera service. In this process, each service prepares to power off, does a good job of on-site protection, and packages important information. After the underlying services complete the on-site protection, the confirmation message can be summarized to the camera service center, and the message can be notified to the security and privacy center. After receiving the message, the security and privacy center 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 turn off the location service according to the received information, and notify the star flash module, sensor hub and 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 transmitted to the privacy mode CA. Among them, 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. Once the message that the on-site protection of each target module is completed is received, the confirmation signal can be sent to the privacy mode driver module, and the driver module will perform subsequent processing.

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

[0086] In a possible implementation of an embodiment of the present application, the folding state information received by the folding screen management service may be unfolded state information indicating that the folding screen device changes from a folded state to an unfolded state. At this time, it is necessary to power on each target module, 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 is restored when the device is safely powered on, avoiding the occurrence of safety issues such as system freeze and function unavailability caused by the direct recovery of each target module before power-on when the sequence is stuck because the unfolded state information is received after the privacy mode driver and each target module receives the unfolded state information first.

[0087] When the method provided in the embodiment of the present application is used to power on and off each target module when the folding state of the folding screen device changes, the accuracy of information transmission should be guaranteed, which requires the coordination of software and hardware. In the case where the user repeatedly folds the device, the folding signal and the signal for on-site protection of each target module may become disordered, causing the folding screen device to malfunction. To address this problem, the embodiment of the present application can perform a secondary verification confirmation before the super privacy mode CA transmits information to the super privacy mode TA. Confirm that 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 of the embodiment of the present application, when the folding screen device is folded, each target module can record the current switch state and then start disabling related functions. When the folding screen device is unfolded, each target module can restore the previously recorded switch state.

[0089] Combined with the introduction of the above embodiments, Fig.10 FIG. 1 is a schematic diagram showing a method for controlling an electronic device provided in an embodiment of the present application. The method may include the following steps:

[0090] S1001. Monitor target events through a trusted execution environment module of an electronic device.

[0091] The electronic device in the embodiment of the present application may include a mobile phone, a tablet computer, a wearable device, etc. Among them, the electronic device may also be a folding screen device, for example, a folding mobile phone, etc.

[0092] The trusted execution environment module can be the TEE module in the aforementioned embodiments. A driver module is deployed in the TEE module, and control switches of multiple target modules are configured. The control switches of multiple target modules can be integrated into the same port in the TEE module.

[0093] In a possible implementation of the embodiment of the present application, the target module may include a camera module, a microphone module, a positioning module, a star flash module, or a sensor hub, that is, the camera, microphone, GPS module, star flash module, and sensor hub module in the aforementioned embodiments.

[0094] Target events may refer to those events that require corresponding protection and protection on electronic devices after the events occur, so as to prevent the leakage of user privacy.

[0095] In one example, the electronic device may be a folding screen device, and the target event for the folding screen device may be that the folding screen device changes from an unfolded state to a folded state. Therefore, monitoring the target event through the TEE module of the electronic device may refer to receiving an opening and closing signal of the folding screen device sent by the privacy mode CA through the TEE module in the folding screen device, and the above-mentioned opening and closing signal may be used to characterize the transition of the folding screen device 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 has occurred, and the TEE module needs to provide further protection for the target event.

[0096] In a possible implementation of the embodiment of the present application, after receiving the opening and closing signal of the folding screen device sent by the privacy mode CA through the TEE module in the folding screen device, since the opening and closing signal is a software signal, the folding screen device can also obtain a bending hardware signal, and the above bending hardware signal can be a hardware signal that characterizes the transition of the folding screen device from the unfolded state to the folded state. If the opening and closing signal received by the TEE module is consistent with the obtained bending hardware signal, it is determined that the target event occurs.

[0097] S1002: When receiving information indicating that a target event has occurred, sending a power-off instruction to a driving module, the power-off instruction is used to drive the target module to power off.

[0098] In an embodiment of the present application, the TEE module may send a power-off instruction to the driver module after receiving information about the occurrence of a target event, which may be implemented in a privacy mode. The privacy mode may be the privacy mode or super privacy mode described in the aforementioned embodiments. In privacy mode, when the TEE module receives information about the occurrence of a target event, the TEE module may send a power-off instruction to the driver module, and the driver module may drive the control switch of the target module to disconnect, thereby powering off the target module.

[0099] In a possible implementation of the embodiment of the present application, the control switches of multiple target modules can be integrated into the same port in the TEE module. Therefore, when the driver module drives multiple target modules to power off based on the power-off instruction, it can simultaneously drive the control switches of multiple target modules to disconnect, so that multiple target modules are powered off at the same time, ensuring the consistency of timing.

[0100] In another possible implementation method of the embodiment of the present application, when information about the occurrence of a target event is received, a power-off instruction is sent to the driving module, including: when information about the occurrence of a target event is received, the information is broadcast to the target module through the privacy mode CA, and the above information can be used to instruct the target module to prepare for power-off; when information that the power-off preparation is complete is received from the target module via the privacy mode CA, a power-off instruction is sent to the driving module.

[0101] That is, when the TEE module receives the information about the occurrence 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 completing the power-off preparation, each target module can feedback the message of completion of the preparation to the privacy mode CA, and the privacy mode CA can send the message of completion of the preparation feedback from each target module to the TEE module. After all target modules have completed the power-off preparation, the TEE module sends a power-off instruction to the driver module. In this way, it can be avoided that the TEE module directly sends a power-off instruction to the driver module, causing the target module to suddenly power off and making other related modules or systems unable to operate normally.

[0102] In an 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 that the target module is ready to be powered off from 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 above preset time may refer to a certain time point after the privacy mode CA broadcasts the target time. For example, x seconds. After the privacy mode CA broadcasts the target event to the target module, if the TEE module has not received the message that the target module is ready to be powered off from the privacy mode CA after waiting for x seconds, 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 the above x can be determined according to actual needs, and the embodiment of the present application does not limit this.

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

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

[0105] In a possible implementation of an embodiment of the present application, when the TEE module receives information about the occurrence of a target event, the TEE module can also obtain the key carried in the information indicating the target event. The above information indicating the target event may be information transmitted during the process of other applications accessing the driver module. The TEE module can verify the target event based on the key carried in the information. If the target event verification passes, it means that the target event is authentic, for example, the folding screen device does change from an unfolded state to a folded state. At this point, the TEE module sends a power-off instruction to the driver module.

[0106] When verifying the target event based on the key carried in the information indicating the target event, the key can be matched with the key in the currently configured privacy mode; if the key carried in the above information and the corresponding key in the currently configured privacy mode are successfully matched, it can be determined that the target event verification has passed; otherwise, it is determined that the target event verification has 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 may first match the UUID to determine whether the UUID is the same. If the UUID is different, the TEE module may not send a power-off instruction to the driver module. If the UUID is the same, the TEE module may continue to match the permission group key. When the permission group key match is unsuccessful, the TEE module will continue to match the scene ID only when the permission group key match is successful. Otherwise, the TEE module may not send a power-off instruction to the driver module. When the UUID, permission group key and scene ID are all matched successfully, the TEE module sends a power-off instruction to the driver module, and the driver module drives the control switches of each target module to disconnect, thereby powering off each target module.

[0108] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or one or more functions can be integrated into one functional module. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0109] Corresponding to the above embodiments, refer to Fig.11 , shows a structural block diagram of an electronic device provided by an embodiment of the present application, in which the trusted execution environment module 1101 and the driver module 1102 in the aforementioned embodiments can be configured, wherein the driver module 1102 is deployed in the trusted execution environment module 1101, and the trusted execution environment module 1101 is also configured with a control switch of the target module 1103; when the trusted execution environment module 1101 receives information about the occurrence of a target event, the trusted execution environment module 1101 can send a power-off instruction to the driver module 1102, and 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, there may be multiple target modules 1103, and the control switches of the multiple target modules 1103 may be integrated into the same port in the trusted execution environment module 1101. In this way, the power-off instruction 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 used to: when receiving information about the occurrence of a target event, broadcast the information about the occurrence of the target event to the target module 1103 through the privacy mode CA, and the information is used to instruct the target module 1103 to prepare for power-off; when receiving information that the power-off preparation is complete from the target module 1103 via the privacy mode CA, send a power-off instruction to the driver module 1102.

[0112] In a possible implementation of the embodiment of the present application, the trusted execution environment module 1101 can also be used to: if the information that the target module 1103 is ready to power off is not received from the privacy mode CA, a power-off instruction is sent to the driver module 1102 at a preset time after the privacy mode CA broadcasts the target event.

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

[0114] Terminate the business currently executed by the target module 1103 and store the key data of the business; or,

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

[0116] Decouple each module within the target module 1103.

[0117] In a possible implementation of an embodiment of the present application, the trusted execution environment module 1101 can also be used to: when receiving information that a target event has occurred, obtain a key carried in the information indicating the target event; verify the target event based on the key; if the target event verification passes, send a power-off instruction to the driver module 1102.

[0118] Among them, verifying the target event based on the key may include: matching 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 successfully matched, it is determined that the target event verification has passed; otherwise, it is determined that the target event verification has failed.

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

[0120] In a possible implementation of the embodiment of the present application, the electronic device may be a folding screen device. When the electronic device is a folding screen device, the trusted execution environment module 1101 may also be used to: receive an opening and closing signal of the folding screen device, which may be used to indicate that the folding screen device is switched from an unfolded state to a folded state.

[0121] In another possible implementation method of the embodiment of the present application, the trusted execution environment module 1101 can also be used to: obtain a bending hardware signal of the folding screen device, which may be a hardware signal representing the transition of the folding screen device from an unfolded state to a folded state; when the opening and closing signal is consistent with the bending hardware signal, the target event occurs.

[0122] In a possible implementation of the embodiment of the present application, the target module 1103 may 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] An embodiment of the present application further provides a control device for an electronic device. By using the control device, the steps or functions that can be implemented by the relevant modules of the electronic device in the aforementioned method embodiments can be implemented.

[0124] All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0125] The present application also provides an electronic device, which may be the electronic device in each embodiment, and 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 each of the aforementioned embodiments may be implemented. In one possible implementation, the electronic device may be a folding screen device.

[0126] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the control method of the electronic device in the above-mentioned embodiments.

[0127] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the control method of the electronic device in the above-mentioned embodiments.

[0128] The embodiment of the present application further provides a chip, which may be a processor, or the chip includes a processor. The processor may be a general-purpose processor or a dedicated processor; wherein the processor is used to support the electronic device to execute the above-mentioned related steps to implement the control method of the electronic device in the above-mentioned embodiments.

[0129] Optionally, the chip further includes a transceiver, and the transceiver is used to accept the control of the processor and to support the electronic device to execute the above-mentioned related steps to implement the control method of the electronic device in the above-mentioned embodiments.

[0130] Optionally, the chip may also include a storage medium.

[0131] The chip can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGAs), programmable logic devices (PLDs), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits that can perform the various functions described throughout this application.

[0132] Finally, it should be noted that the above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. A control method for an electronic device, characterized in that: include: When the electronic device changes from the unfolded state to the folded state, powering off the target module, 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; When the electronic device changes from the folded state to the unfolded state, the target module is powered on.

2. The method according to claim 1, characterized in that When the electronic device changes from the unfolded state to the folded state, powering off the target module includes: When the electronic device changes from the unfolded state to the folded state, instructing the target module to prepare for powering off; After the target module completes power-off preparation, the target module is powered off.

3. The method according to claim 2, characterized in that The power-off preparation includes at least one of the following processes: terminating the business currently being executed by the target module and storing key data of the business; or, Decoupling the target module from other modules; or, Decouple each module within the target module.

4. The method according to claim 2 or 3, characterized in that: After the target module completes the power-off preparation, powering off the target module includes: After the target module completes power-off preparation, the control switch of the target module is turned off to power off the target module; wherein the control switch of the target module is configured in the trusted execution environment of the electronic device.

5. The method according to claim 4, characterized in that Also includes: At a preset time after the electronic device changes from the unfolded state to the folded state, if the target module has not completed power-off preparation, the target module is directly powered off.

6. The method according to claim 4 or 5, characterized in that: There are multiple target modules, and control switches of the multiple target modules are integrated into the same port of the trusted execution environment; and powering off the target modules further includes: The plurality of target modules are powered off simultaneously.

7. The method according to any one of claims 1 to 6, characterized in that: After powering off the target module, the method further includes: 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 according to claim 7, characterized in that Before powering on the target module, the method further includes: The electronic device exits the privacy mode.

9. The method according to any one of claims 1 to 8, characterized in that: When the electronic device changes from the unfolded state to the folded state, powering off the target module also includes: When the electronic device changes from the unfolded state to the folded state, obtaining a key carried in the information indicating a target event, wherein the target event is that the electronic device changes from the unfolded state to the folded state; Verifying the target event based on the key; If the target event verification passes, the target module is powered off.

10. The method according to claim 9, characterized in that The verifying the target event based on the key includes: matching the key with the key in the currently configured privacy mode; If the key matches the corresponding key in the currently configured privacy mode successfully, it is determined that the target event verification has passed; otherwise, it is determined that the target event verification has failed.

11. The method according to claim 9 or 10, characterized in that: The key includes at least one of a universal unique identifier UUID, a permission 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, wherein: When the processor executes the computer program, the control method of the electronic device according to any one of claims 1 to 11 is implemented.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a memory and a processor, and the processor executes a 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

  • Interface operation method and device, electronic equipment and storage medium

    CN110147192A

  • Low-power-consumption standby method, electronic equipment and computer readable storage medium

    CN114816026A

  • Method for displaying target symbol and electronic equipment

    CN115442457A

  • Camera control method and device and terminal equipment

    CN116074615A

  • Auxiliary device and mobile electronic device subassembly

    CN205485729U