Privacy protection methods, devices, and electronic devices during the charging process

By identifying environmental and power status information during the charging process, risks can be identified and controlled, thus solving the problem of charging devices infringing on the privacy of electronic devices and achieving safety and privacy protection during the charging process.

CN115441525BActive Publication Date: 2026-03-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-04
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Charging devices may infringe on the privacy of electronic devices during the charging process, such as stealing data or implanting malware, thus compromising privacy and security.

Method used

By acquiring environmental and battery status information during the charging process, the system identifies the environment type, charging type, and risk type, and performs risk control measures, including prompting users to perform actions or automatically implementing access control.

Benefits of technology

Effectively protect the privacy and security of electronic devices, ensure data and property security during charging, and avoid privacy violations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115441525B_ABST
    Figure CN115441525B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and computer-readable storage medium for privacy protection during the charging process. The method includes: acquiring environmental information during the charging process based on a charging device, and identifying the environmental type during the charging process based on the environmental information; determining the charging type of the charging device based on monitored power status information; performing risk identification processing on the privacy permissions corresponding to the charging type to obtain the risk type during the charging process; thus, by obtaining multi-dimensional information during the charging process, namely environmental type, charging type, and risk type, a comprehensive judgment is made to perform risk control processing on the charging process. This application can improve the accuracy of risk control processing and ensure privacy security during the charging process, such as data security and property security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and more particularly to a method, apparatus, electronic device, and computer-readable storage medium for protecting privacy during the charging process. Background Technology

[0002] With the development of computer technology, various electronic devices have been widely used in people's daily lives, such as personal computers and mobile phones. Electronic devices are powered by electricity, so they need to be charged to ensure their normal use. For example, charging can replenish the battery in the electronic device, or it can directly provide power to other components in the electronic device.

[0003] Charging is achieved by connecting to a charging device, such as a charging socket, power bank, or other electronic devices. However, during the charging process, the charging device may infringe on the privacy of the electronic device, such as stealing data or implanting malware or viruses, thus compromising the privacy and security of the electronic device.

[0004] In this regard, the relevant technologies have not yet provided an effective solution. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and computer-readable storage medium for protecting privacy during the charging process, which can improve security during the charging process and protect the privacy of electronic devices from being violated.

[0006] The technical solution of this application embodiment is implemented as follows:

[0007] This application provides a privacy protection method during the charging process, including:

[0008] The environmental information during the charging process based on the charging device is acquired, and environmental identification processing is performed based on the environmental information to obtain the environmental type during the charging process.

[0009] Monitor the power status information during the charging process, and determine the charging type of the charging device based on the power status information;

[0010] Determine the privacy permissions corresponding to the charging type, and perform risk identification processing on the privacy permissions to obtain the risk type in the charging process;

[0011] Risk control measures are implemented for the charging process based on the environment type, the charging type, and the risk type.

[0012] This application provides a privacy protection device during the charging process, comprising:

[0013] The environment type determination module is used to acquire environmental information during the charging process based on the charging device, and perform environmental identification processing based on the environmental information to obtain the environment type during the charging process.

[0014] A charging type determination module is used to monitor the power status information during the charging process and determine the charging type of the charging device based on the power status information.

[0015] The risk type determination module is used to determine the privacy permissions corresponding to the charging type, and to perform risk identification processing on the privacy permissions to obtain the risk type in the charging process;

[0016] The risk control module is used to perform risk control processing on the charging process based on the environment type, the charging type, and the risk type.

[0017] This application provides an electronic device, including:

[0018] Memory, used to store executable instructions;

[0019] The processor, when executing executable instructions stored in the memory, implements the privacy protection method for the charging process provided in the embodiments of this application.

[0020] This application provides a computer-readable storage medium storing executable instructions for implementing a privacy protection method for the charging process provided in this application when executed by a processor.

[0021] The embodiments of this application have the following beneficial effects:

[0022] During the charging process using charging devices, privacy protection is implemented in two ways. First, environmental information, battery status information, and privacy permissions are used to determine the environment type, charging type, and risk type. This allows for a comprehensive assessment based on multi-dimensional information (environment type, charging type, and risk type) to accurately identify the privacy aspects that need protection. Second, risk control measures are implemented for the privacy aspects that need protection, thereby effectively ensuring privacy security during the charging process, such as data security and property security, and achieving safe charging. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the architecture of the privacy protection system for the charging process provided in the embodiments of this application;

[0024] Figure 2 This is a schematic diagram of the architecture of the terminal device provided in the embodiments of this application;

[0025] Figure 3A This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application;

[0026] Figure 3B This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application;

[0027] Figure 3C This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application;

[0028] Figure 3D This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application;

[0029] Figure 3E This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application;

[0030] Figure 4 This is a schematic diagram of the interface of the mobile terminal device provided in the embodiments of this application;

[0031] Figure 5 This is a schematic diagram of the interface for risk control processing provided in an embodiment of this application;

[0032] Figure 6 This is a schematic diagram of the interface for risk control processing provided in an embodiment of this application;

[0033] Figure 7 This is a schematic diagram of the charging process provided in an embodiment of this application;

[0034] Figure 8 This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application;

[0035] Figure 9 This is a schematic diagram of the detection environment types provided in the embodiments of this application;

[0036] Figure 10 This is a schematic diagram illustrating the detection of charging type and risk type provided in the embodiments of this application;

[0037] Figure 11 This is a schematic diagram of the permission configuration interface provided in an embodiment of this application;

[0038] Figure 12 This is a schematic diagram of the permission configuration interface provided in an embodiment of this application;

[0039] Figure 13 This is a schematic diagram of the permission configuration interface provided in the embodiments of this application. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0042] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein. In the following description, the term "multiple" means at least two.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0044] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0045] 1) Charging: refers to the process of providing electrical energy to electronic devices through charging equipment. This application does not limit the type of charging equipment, such as a charging socket, power bank, laptop computer, or desktop computer; nor does it limit the charging method, such as wired charging or wireless charging.

[0046] 2) Environment Type: This indicates the environment in which the electronic device is located. In this embodiment, the environment type can include both permanent and non-permanent environment types. However, this does not limit the scope of this embodiment, and more environment types can be developed based on the needs of the actual application scenario. The environment type during charging can be obtained by performing environmental identification processing on the environmental information during the charging process. Environmental information generally refers to environment-related information obtained by the electronic device, such as network information of the connected network and at least one of the geographical location information obtained through location processing.

[0047] 3) Charging type: Also known as device type, this indicates the charging mode performed by the charging device. In this embodiment, the charging type may include two types: a first charging type and a second charging type. The first charging type supports both charging and data transmission, while the second charging type supports charging only. It is worth noting that although the second charging type is designed to support charging, data transmission may still occur between the charging device and the electronic device during the charging process using a device conforming to the second charging type.

[0048] 4) Risk type: This indicates whether there is a risk during the charging process. For example, the risk type can include two types: risk present and no risk. Furthermore, based on the existence of risk, the risk type can be further refined into specific risks, such as the risk of malicious data implantation, image (photo) leakage, file leakage, clipboard content leakage, etc.

[0049] 5) Privacy Permissions: These indicate permissions that may pose a risk and require risk identification and handling. Privacy permissions may differ depending on the charging type. For example, the first charging type may include data debugging permissions, image transmission permissions, and file transmission permissions; the second charging type may only include data debugging permissions.

[0050] This application provides a method, apparatus, electronic device, and computer-readable storage medium for privacy protection during the charging process, which can ensure data security and property security during charging, that is, ensure that the privacy of the electronic device will not be maliciously violated. The following describes exemplary applications of the electronic device provided in this application. The electronic device provided in this application can be implemented as various types of terminal devices or as a server.

[0051] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of a privacy protection system 100 for the charging process provided in this application embodiment. The terminal device 400 is connected to the server 200 through a network 300, where the network 300 can be a wide area network, a local area network, or a combination of both. Both the terminal device 400 and the server 200 can be charged by connecting to the charging device 500.

[0052] In some embodiments, taking the electronic device as a terminal device as an example, the privacy protection method for the charging process provided in this application embodiment can be implemented by the terminal device. For example, the terminal device 400 enters the charging process by connecting to the charging device 500. For example, the terminal device 400 can be a mobile terminal device (such as a mobile phone), and the charging device 500 can be a power bank. During the charging process, the terminal device 400 performs environmental identification processing on the acquired environmental information to obtain the environmental type; determines the charging type based on the monitored power status information; performs risk identification processing on the privacy permissions corresponding to the determined charging type to obtain the risk type; and performs risk control processing on the charging process based on the environmental type, charging type, and risk type. This application embodiment does not limit the method of risk control processing, such as... Figure 1 As shown, a privacy protection interface can be displayed in the user interface of the terminal device 400, and a stop charging prompt and a status update prompt can be displayed in the privacy protection interface. The stop charging prompt is such as "It is recommended to stop charging", and the status update prompt is such as "It is recommended to disable xx permission".

[0053] In some embodiments, taking a server as an example, the privacy protection method for the charging process provided in this application can also be implemented by a server. For example, the server 200 enters the charging process by connecting to a charging device 500, such as a charging socket. During the charging process, the server 200 determines the environment type, charging type, and risk type, and performs risk control processing on the charging process based on the environment type, charging type, and risk type.

[0054] In some embodiments, the privacy protection method for the charging process provided in this application can also be implemented collaboratively by the terminal device and the server. For example, during the charging process, the terminal device 400 can send acquired environmental information, battery status information, and other information to the server 200. After determining the environment type, charging type, and risk type based on the received information, the server 200 can send the environment type, charging type, and risk type to the terminal device 400 so that the terminal device 400 can perform risk control processing; alternatively, the server 200 can also determine relevant risk control processing strategies based on the environment type, charging type, and risk type, and send the relevant risk control processing strategies to the terminal device 400 so that the terminal device 400 can perform risk control processing.

[0055] For example, during the charging process, the server 200 can also use the terminal device 400 to perform risk control processing, such as sending prompts that need to be presented (displayed) to the terminal device 400 so that they can be displayed in the user interface of the terminal device 400.

[0056] In some embodiments, the terminal device 400 or the server 200 can implement the privacy protection method for the charging process provided in this application embodiment by running a computer program, such as... Figure 1 The client 410 is shown. For example, a computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run; it can also be a small program, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a small program that can be embedded into any APP, and this small program can be controlled by the user to run or close. In short, the above-mentioned computer program can be any form of application, module, or plugin.

[0057] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The cloud service may be a privacy protection service during the charging process, accessible to the terminal device 400. Terminal device 400 may be a smartphone, tablet, laptop, desktop computer, smart TV, smartwatch, etc., but is not limited to these. The terminal device and server can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.

[0058] Taking the example of a terminal device provided in this application embodiment, it can be understood that in the case where the electronic device is a server, Figure 2 Some parts of the structure shown (such as the user interface, presentation module, and input processing module) can be omitted. See also Figure 2 , Figure 2 This is a schematic diagram of the structure of the terminal device 400 provided in the embodiments of this application. Figure 2 The terminal device 400 shown includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 440.

[0059] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0060] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0061] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0062] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0063] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0064] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0065] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.

[0066] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;

[0067] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0068] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2 A privacy protection device 455 for the charging process stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: environment type determination module 4551, charging type determination module 4552, risk type determination module 4553, and risk control module 4554. These modules are logically linked and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.

[0069] The privacy protection method for the charging process provided in this application will be described by referring to exemplary applications and implementations of the electronic devices provided in the embodiments of this application.

[0070] See Figure 3A , Figure 3A This is a flowchart illustrating the privacy protection method for the charging process provided in this application embodiment, which will be combined with... Figure 3A The steps shown are explained.

[0071] In step 101, environmental information during the charging process based on the charging device is obtained, and environmental identification processing is performed based on the environmental information to obtain the environmental type during the charging process.

[0072] Here, electronic devices are connected to charging devices for charging. The connection between the electronic devices and the charging devices can be wired or wireless. Since charging devices may be unsafe, multi-dimensional information is acquired during the charging process for comprehensive judgment. For example, environmental information during the charging process can be acquired and processed for environmental identification to determine the environmental type. The environmental information can include at least one of network information and geographic location information. The environmental type obtained through environmental identification can be either a permanent or non-permanent environment type; however, this does not constitute a limitation on the environmental information or the environmental type.

[0073] In some embodiments, the above-mentioned acquisition of environmental information during the charging process based on the charging device can be achieved in the following manner: when the network connection status is connected, the network information of the connected network is acquired as the environmental information during the charging process; when the network connection status is not connected, the geographical location information obtained by location processing is used as the environmental information during the charging process.

[0074] In this embodiment, the network has a geographical attribute (environmental attribute), so the type of environmental information to be obtained can be determined based on the network connection status. For example, when the network connection status is "connected," the network information of the connected network is obtained and used as the environmental information during the charging process. The type of network is not limited; for example, it can be a wired network or a wireless network. Similarly, the network information is not limited; for example, it can include at least one of an Internet Protocol (IP) address and a Basic Service Set Identity Document (BSSID).

[0075] When the network connection is not established, the location information obtained through location processing is used as environmental information during the charging process. The location processing method is not limited; for example, it can be based on the Global Positioning System (GPS). Similarly, the location information itself is not limited; it can be latitude and longitude.

[0076] By combining the above methods with network connection status to obtain environmental information in a targeted manner, the matching degree between the obtained environmental information and the current usage of electronic devices (such as network usage) is improved, which facilitates rapid and effective environmental identification processing in the future.

[0077] In step 102, the power status information during the charging process is monitored, and the charging type of the charging device is determined based on the power status information.

[0078] During charging, battery status information can also be monitored, for example, by listening to broadcasts. This battery status information includes states (or status values) related to the charging type of the device; therefore, the charging type of the device can be determined based on the battery status information.

[0079] In some embodiments, the power status information includes a first state corresponding to a first charging type and a second state corresponding to a second charging type; wherein the first charging type supports charging and data transmission, and the second charging type supports charging; the above-mentioned determination of the charging type of the charging device based on the power status information can be achieved in the following manner: when the first state is valid, the charging type of the charging device is determined to be the first charging type; when the second state is valid, the charging type of the charging device is determined to be the second charging type.

[0080] In this embodiment of the application, the monitored power status information may include a first state corresponding to a first charging type and a second state corresponding to a second charging type, wherein the first charging type supports charging and data transmission, and the second charging type supports charging.

[0081] When the first state in the power status information is valid and the second state is invalid, the charging type of the charging device is determined to be the first charging type; when the second state in the power status information is valid and the first state is invalid, the charging type of the charging device is determined to be the second charging type. In this way, the charging type during the charging process can be quickly and accurately determined based on the power status information.

[0082] In step 103, the privacy permissions corresponding to the charging type are determined, and the privacy permissions are processed for risk identification to obtain the risk type during the charging process.

[0083] In this embodiment, different charging types may have different privacy permissions. For example, the privacy permissions for the first charging type include data debugging permission, image transmission permission, and file transmission permission; the privacy permissions for the second charging type include data debugging permission. Specifically, the data debugging permission provides data debugging (data development) functionality. For example, during charging, when the data debugging permission is enabled, the charging device can implant data into the electronic device and also obtain content from the electronic device's address book, SMS messages, and clipboard. The image transmission permission is implemented based on the Picture Transfer Protocol (PTP) and provides image transmission functionality. For example, during charging, when the image transmission permission is enabled, the charging device can obtain images stored in the electronic device. The file transmission permission is implemented based on the Media Transfer Protocol (MTP) and provides file transmission functionality. For example, during charging, when the file transmission permission is enabled, the charging device can obtain multimedia files stored in the electronic device, such as images, audio, and video.

[0084] Here, the privacy permissions corresponding to the charging type obtained in step 102 are determined, and risk identification processing is performed on the determined privacy permissions to obtain the risk type during the charging process. For example, when any one of the privacy permissions is enabled, the risk type is determined to be "risk exists"; when all permissions in the privacy permissions are disabled, the risk type is determined to be "no risk".

[0085] Based on the existing risks, the risk types can be further subdivided. For example, identified risk types include risks corresponding to permissions enabled in privacy settings. For instance, risks associated with data debugging permissions include the risk of malicious data implantation (such as Trojans, viruses, etc.) and content leakage (such as leakage of content from contacts, SMS messages, and clipboard); risks associated with image transmission permissions include image leakage risks; and risks associated with file transmission permissions include file leakage risks.

[0086] In step 104, risk control measures are implemented for the charging process based on the environment type, charging type, and risk type.

[0087] Here, a comprehensive judgment is made based on the environment type, charging type, and risk type to implement risk control measures during the charging process. This application does not limit the method of risk control; for example, it may involve presenting prompts to guide the user to perform corresponding operations; or it may involve automatically performing certain operations, such as disabling certain permissions.

[0088] In some embodiments, the above-mentioned risk control processing of the charging process based on environment type, charging type, and risk type can be achieved by: querying at least one historical risk control record based on environment type, charging type, and risk type; wherein each historical risk control record includes historical environment type, historical charging type, historical risk type, and historical risk control method; filtering the queried historical risk control records according to filtering conditions; wherein the filtering conditions include any one of the following: the record time is closest to the current time; the historical risk control method has the highest frequency of occurrence; and performing risk control processing on the charging process based on the historical risk control methods in the filtered historical risk control records.

[0089] Here, at least one historical risk control record generated during the privacy protection process of the historical charging process can be stored. Each historical risk control record includes historical environment type, historical charging type, historical risk type, and historical risk control method. The historical risk control method can be implemented automatically by the electronic device or implemented by the electronic device under the operation of the user.

[0090] Based on the environmental type, charging type, and risk type obtained during the charging process, a query is performed on all historical risk control records to obtain the query results. Specifically, for each historical risk control record in the query results, the historical environmental type, historical charging type, and historical risk type are the same as those in the current charging process.

[0091] For example, if represented in the form of "Environment Type - Charging Type - Risk Type", the current charging process will result in "V1-C1-R1". The historical risk control records include four records, which can be represented in the form of "Historical Environment Type - Historical Charging Type - Historical Risk Type - Historical Risk Control Method" as "V1-C1-R1-M1", "V1-C1-R1-M1", "V1-C1-R1-M2", and "V2-C1-R1-M2". After query processing, the query results will include "V1-C1-R1-M1", "V1-C1-R1-M1", and "V1-C1-R1-M2".

[0092] Then, the retrieved historical risk control records are filtered according to the following criteria: the record time of the historical risk control record is the most recent to the current time; the historical risk control method in the historical risk control record has the highest frequency of occurrence among all retrieved historical risk control records. To illustrate further, for the criterion of "most recent to the current time," if the historical risk control record "V1-C1-R1-M2" has the most recent record time, then this historical risk control record is selected. For the criterion of "highest frequency of occurrence of historical risk control method," since historical risk control method M1 has the highest frequency of occurrence in the query results (2 / 3), the historical risk control record "V1-C1-R1-M1" is selected.

[0093] Finally, based on the historical risk control methods selected from the historical risk control records, risk control measures are implemented during the charging process. By using the above methods and referring to historical experience to implement risk control measures for the current charging process, it is possible to conform to user habits and avoid unnecessary interference with normal user operations (such as data debugging operations, image transmission operations, file transmission operations, etc.).

[0094] like Figure 3A As shown, the embodiments of this application combine environmental type, charging type and risk type to carry out risk control processing, which can improve the accuracy of risk control processing and thus effectively ensure data security and property security during the charging process.

[0095] In some embodiments, see Figure 3B , Figure 3B This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application. Figure 3A Step 101 shown can be implemented through steps 201 to 204, which will be explained in conjunction with each step.

[0096] In step 201, environmental information during the charging process based on the charging device is obtained.

[0097] For example, environmental information can be acquired at the very first moment of entering the charging process; or, at any moment during the charging process, environmental information can be acquired periodically during the charging process, such as once every second.

[0098] In step 202, the environmental information is matched with the permanent environmental information database.

[0099] Here, the environmental information obtained in step 201 (such as the environmental information at the first moment) is matched with the permanent environmental information database. At least one permanent environmental information in the permanent environmental information database can be manually set or automatically added according to permanent conditions.

[0100] It is worth noting that the permanent environmental information database may include a permanent network information database and a permanent geographic location information database. When the environmental information is network information, it is matched with the permanent network information database; when the environmental information is geographic location information, it is matched with the permanent geographic location information database.

[0101] In step 203, when the environmental information is successfully matched with the resident environmental information database, the environmental type during the charging process is determined to be the resident environmental type.

[0102] Here, when the environmental information is successfully matched with the resident environmental information database (i.e., the environmental information is the same as any resident environmental information in the resident environmental information database), the environmental type during the charging process is determined to be the resident environmental type.

[0103] In step 204, when the environmental information fails to match the resident environmental information database, the environmental type during the charging process is determined to be a non-resident environmental type.

[0104] Here, when the environmental information fails to match the resident environmental information database (i.e., the environmental information is different from all the resident environmental information in the resident environmental information database), the environmental type during the charging process is determined to be a non-resident environmental type.

[0105] In some embodiments, the determination of the environment type during the charging process as a non-resident environment type can be achieved in the following manner: when the environmental information does not meet the resident condition, the environment type during the charging process is determined to be a non-resident environment type; when the environmental information fails to match the resident environment information database, the method further includes: when the environmental information meets the resident condition, the environment type during the charging process is determined to be a resident environment type, and the environmental information is added to the resident environment information database; wherein, the resident condition includes at least one of the following: the duration of continuous occurrence of the environmental information during the charging process is greater than a duration threshold; the number of times the environmental information appears in the historical time period before entering the charging process is greater than a number threshold; the frequency of the environmental information in the historical time period is greater than a frequency threshold.

[0106] Here, when the environmental information fails to match the resident environmental information database, further judgment can be made based on resident conditions. These resident conditions include at least one of the following: the duration of continuous occurrence of environmental information (referring to the same environmental information) during charging exceeds a duration threshold (provided that environmental information is continuously acquired during charging, such as periodically acquired environmental information); the number of times the environmental information appears in the historical time period before entering the charging process exceeds a frequency threshold; or the frequency of the environmental information within the historical time period exceeds a frequency threshold. The duration threshold, historical time period, frequency threshold, and frequency threshold can all be set according to the actual application scenario. It is worth noting that within the historical time period, the electronic device can be in a historical charging process or a historical non-charging process; there is no limitation on this.

[0107] When the environmental information does not meet the permanent residency criteria, the environment type during the charging process is determined to be a non-permanent environment type. When the environmental information meets the permanent residency criteria, the environment type during the charging process is determined to be a permanent environment type, and the environmental information is added to the permanent environment information database as permanent environment information. In this way, the permanent environment information database can be automatically updated. By making a second judgment based on the permanent residency criteria in the above manner, the accuracy of the determined environment type can be further improved.

[0108] In some embodiments, the acquisition of environmental information during the charging process based on the charging device can be achieved in the following manner: when power connection information is detected at a first moment, it is determined that the charging process based on the connected charging device is initiated, and environmental information is periodically acquired during the charging process; between any steps, the method further includes: expanding the environmental information at the first moment to obtain an environmental information range; when the environmental information at a second moment successfully matches the environmental information range, it is determined that the environmental information at the second moment is the same as the environmental information at the first moment; wherein, the second moment represents any moment different from the first moment.

[0109] Here, power connection information in electronic devices can be monitored. When power connection information is detected at a certain moment (hereinafter referred to as the first moment for ease of distinction), it is determined that the device will enter a charging process based on the connection. During the charging process, environmental information is periodically acquired. This helps determine whether the acquired environmental information meets the conditions for continued operation. Taking the condition for continued operation being a duration greater than a duration threshold as an example, if the environmental information at the second moment is the same as that at the first moment, it is determined that the environmental information has continuously appeared within the time period from the first moment to the second moment. Here, the second moment specifically refers to the moment after the first moment and the moment closest to the first moment.

[0110] However, even when electronic devices are in their usual environment, their environmental information can fluctuate at different times. For example, a user holding a mobile phone (i.e., an electronic device) at home (i.e., in their usual environment) may have different geographic location information at different times, depending on whether they are in the living room at one moment or in the bedroom at another. Similarly, a user may connect to a wireless network provided by a router in the living room at one moment and to a wireless network provided by another router in the bedroom at another moment, resulting in different network information.

[0111] To address this, the environmental information at the first moment can be expanded to obtain the range of environmental information. For example, the geographical location information at the first moment can be expanded to obtain the geographical location range, such as the latitude and longitude range centered on the latitude and longitude at the first moment; or the network information at the first moment can be expanded to obtain the network information range, such as the IP address range expanded based on the IP address at the first moment (this IP address range can cover the area where the IP address is located at the first moment), or the BSSID range expanded based on the BSSID at the first moment, etc. This application embodiment does not limit the scale of the expansion processing. For example, for geographical location information, ten meters can be used as the scale for expansion processing, that is, the actual distance corresponding to the longitude range in the expanded latitude and longitude range is ten meters, and the actual distance corresponding to the latitude range is also ten meters.

[0112] Then, the environmental information at the second moment is matched with the environmental information range. Here, "second moment" refers to any moment distinct from the first moment; it could be a moment before or after the first moment. If the environmental information at the second moment successfully matches the environmental information range (i.e., the environmental information at the second moment falls within the environmental information range), it is determined that the environmental information at the second moment is the same as the environmental information at the first moment. If the environmental information at the second moment fails to match the environmental information range (i.e., the environmental information at the second moment does not fall within the environmental information range), it is determined that the environmental information at the second moment is different from the environmental information at the first moment. This method helps to accurately determine whether the environmental information at the first moment meets the resident condition.

[0113] like Figure 3B As shown, the embodiments of this application determine the environment type based on the matching results between environmental information and the resident environment information database, which can improve the accuracy of the determined environment type.

[0114] In some embodiments, see Figure 3C , Figure 3C This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application. Figure 3A Step 103 shown can be implemented through steps 301 to 304, which will be explained in conjunction with each step.

[0115] In step 301, when the charging type is a first charging type that supports charging and data transmission, the privacy permissions corresponding to the first charging type are determined to include data debugging permissions, image transmission permissions, and file transmission permissions.

[0116] Here, the privacy permissions corresponding to the first charging type include data debugging permission, image transmission permission, and file transmission permission.

[0117] In step 302, the connection status information corresponding to the charging device is monitored during the charging process; wherein, the connection status information includes the status corresponding to data debugging permission, image transmission permission and file transmission permission respectively.

[0118] Here, the connection status information corresponding to the charging device is monitored during the charging process. The connection status information is generated when the electronic device is connected to the charging device that conforms to the first charging type. The connection status information includes the status corresponding to data debugging permission, image transmission permission and file transmission permission respectively.

[0119] In step 303, when any of the connection status information is valid, the risk type in the charging process is determined to be risky.

[0120] Here, the validity of each status in the connection status information is checked. When the status of any one of the following permissions (at least one permission) is valid, the risk type during the charging process is determined to be "risk exists," and the existing risk is the risk corresponding to the permission with the valid status.

[0121] In step 304, when multiple states in the connection status information are invalid, the risk type in the charging process is determined to be risk-free.

[0122] Here, when the states corresponding to data debugging permission, image transmission permission, and file transmission permission are all invalid, the risk type during the charging process is determined to be risk-free.

[0123] like Figure 3C As shown, in the embodiment of this application, when the charging type is the first charging type, the risk type is determined by listening to the connection status information, which can ensure the accuracy of the determined risk type.

[0124] In some embodiments, see Figure 3D , Figure 3D This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application. Figure 3A Step 103 shown can be implemented through steps 401 to 404, which will be explained in conjunction with each step.

[0125] In step 401, when the charging type is a second charging type that supports charging, the privacy permissions corresponding to the second charging type are determined to include data debugging permissions.

[0126] For example, the privacy permissions corresponding to the second charging type only include data debugging permissions.

[0127] In step 402, the system settings information during the charging process is monitored; the system settings information includes the status of data debugging permissions.

[0128] When the charging type is the second charging type, the connection status information corresponding to the charging device cannot be monitored. Therefore, in this embodiment, the system setting information (also known as system setting items) during the charging process is monitored, and the status of data debugging permissions in the monitored system setting information is read.

[0129] In step 403, when the data debugging permission status in the system settings information is valid, the risk type during the charging process is determined to be "risk exists".

[0130] Here, when the data debugging permission is valid, the risk type during the charging process is determined to be "risk exists," and the risks include the risk of malicious data injection and the risk of content leakage.

[0131] In step 404, when the data debugging permission status in the system settings information is invalid, the risk type during the charging process is determined to be risk-free.

[0132] Here, when the data debugging permission is invalid, the risk type during the charging process is determined to be no risk.

[0133] like Figure 3D As shown, in the embodiment of this application, when the charging type is the second charging type, the risk type is determined by listening to the system setting information, which ensures the accuracy of the determined risk type from another perspective.

[0134] In some embodiments, see Figure 3E , Figure 3E This is a flowchart illustrating the privacy protection method for the charging process provided in an embodiment of this application. Figure 3A Step 104 shown can be implemented through steps 501 to 503, which will be explained in conjunction with each step.

[0135] In step 501, the target risk type during the charging process is determined based on the environment type, charging type, and risk type.

[0136] Here, environmental type, charging type, and risk type can be used as judgment factors to determine the target risk type during the charging process.

[0137] In some embodiments, the above-mentioned determination of the target risk type during the charging process based on environment type, charging type, and risk type can be achieved in the following manner: when the environment type is a permanent environment type, the target risk type during the charging process is determined to be risk-free; when the environment type is a non-permanent environment type and the charging type is a risky charging type, the risk type is taken as the target risk type during the charging process; wherein, the risky charging type includes at least one of a first charging type and a second charging type, the first charging type supports charging and data transmission, and the second charging type supports charging; when the environment type is a non-permanent environment type and the charging type is a risk-free charging type, the target risk type during the charging process is determined to be risk-free; wherein, the risk-free charging type is different from the risky charging type.

[0138] Here, the situations for determining the type of target risk can include the following three.

[0139] 1) When the environment type is the permanent environment type, since the permanent environment has a high level of safety, the target risk type during the charging process can be directly determined to be risk-free.

[0140] 2) When the environment type is a non-resident environment type and the charging type is a risky charging type, the risk type is taken as the target risk type in the charging process. The risky charging type includes at least one of the first charging type and the second charging type, which can be set according to the needs of the actual application scenario.

[0141] 3) When the environment type is a non-resident environment type and the charging type is a risk-free charging type, the target risk type during the charging process is determined to be risk-free. Here, risk-free charging type is distinct from risky charging type. For example, if the risky charging type is the first charging type, the risk-free charging type is the second charging type. It is worth noting that when the risky charging type includes both the first and second charging types, the risk-free charging type is empty, meaning that case 3) does not exist.

[0142] The above method can accurately and effectively determine the target risk type. Furthermore, the risk-based charging type and the risk-free charging type can be adjusted according to the actual application scenario, which is highly flexible and applicable to different scenarios.

[0143] In step 502, when the target risk type is "risk exists", the permissions in the privacy permissions that are in a valid state are restricted.

[0144] Here, when the target risk type is "risk exists", all permissions in the privacy permissions that are in a valid state are restricted to ensure data security and property security during the charging process.

[0145] In some embodiments, the above-described restriction processing of permissions with a valid status in privacy permissions can be implemented by performing at least one of the following processes: updating the status of permissions with a valid status in privacy permissions to change the status of the permissions from valid to invalid; presenting at least one of a target risk type, a status update prompt, and a stop charging prompt; wherein the status update prompt is used to prompt the status update processing of permissions with a valid status in privacy permissions; and the stop charging prompt is used to prompt the disconnection from the charging device.

[0146] This application provides four example methods for restriction processing, and in practical application scenarios, restriction processing can be implemented according to at least one of the following methods.

[0147] 1) Automatically update the status of all permissions that are valid in the privacy permissions. The status update process is to change the status of the permission from valid to invalid, that is, to close the permission.

[0148] 2) Present the target risk type, that is, inform the user of the risks that may exist during the charging process. It is worth noting that this can directly present a warning of the existence of risks, or it can present specific risks, such as at least one of the following: risk of malicious data implantation, risk of image leakage, risk of file leakage, and risk of content leakage.

[0149] 3) Display a status update prompt to remind the user to update the status of permissions that are currently valid in the privacy settings. This method requires the user to manually trigger the status update process, thus avoiding unnecessary interference with the user's normal operations that might be caused by automatic status update processes.

[0150] 4) Display a "Charging stopped" message to prompt the user to disconnect the electronic device from the charging device, i.e., stop charging.

[0151] The above methods can improve the flexibility of restriction processing.

[0152] In step 503, when the target risk type is no risk, the status of all permissions in the privacy permissions remains unchanged.

[0153] Here, when the target risk type is risk-free, it proves that the charging process is safe enough, so the state of all permissions in the privacy permissions remains unchanged.

[0154] like Figure 3E As shown, this application embodiment determines the target risk type by comprehensively considering the environment type, charging type, and risk type, and performs different operations according to different target risk types, which can improve the accuracy of risk control processing.

[0155] The following will illustrate exemplary applications of the embodiments of this application in real-world scenarios. For ease of understanding, examples will be provided using mobile terminal devices (such as mobile phones, tablets, or Raspberry Pi handheld computers). The privacy protection scheme for the charging process provided in the embodiments of this application can be implemented as a standalone application or as a functional plugin within a specific application, such as a privacy protection plugin (or privacy protection module) in a mobile phone manager application. This privacy protection plugin can be enabled (run) or disabled by the user. In addition to implementing privacy protection, the mobile phone manager application can also be used to implement other functions, such as virus scanning, junk file cleaning, system acceleration, and startup item management, without limitation. For ease of understanding, the privacy protection plugin in a mobile phone manager application will be used as an example for further explanation.

[0156] With a mobile security application installed on the mobile terminal device, the mobile security application can provide privacy protection functions through a built-in privacy protection plugin. This privacy protection function is passively triggered. This application embodiment provides, for example... Figure 4 The illustrated interface diagram of the mobile terminal device shows that when the mobile terminal device is detected to be connected to a charging device (e.g., when a charging cable connected to the charging device is inserted into the USB port of the mobile terminal device) by the mobile phone management application, privacy protection is provided during the charging process through a privacy protection plugin. At the same time, a privacy protection interface 42 is displayed on the desktop interface 41 of the mobile terminal device. Of course, the display method of the privacy protection interface 42 is not limited to... Figure 4 For example, it can be a standalone interface.

[0157] In the process of privacy protection, the current environment type of the mobile terminal device is detected by the environment type detection model, and the charging type of the connected charging device and the risk type during the charging process are detected by the privacy leakage risk detection model. Finally, a comprehensive judgment is made based on the environment type, charging type and risk type, and risk control is carried out based on the judgment result. Here, the model refers to the set of strategies to achieve the corresponding function.

[0158] As an example, embodiments of this application provide, for instance, the following: Figure 5 The diagram shown illustrates the risk control process. Figure 5 In the example of a charging device being a power bank, a desktop interface 51 and a stop charging prompt 52 presented in the form of a window are shown. The stop charging prompt 52 is used to prompt the user to disconnect the mobile terminal device from the power bank.

[0159] This application also provides, as in the embodiments, Figure 6 The schematic diagram of risk control processing shown, using a power bank as an example, illustrates a privacy protection interface 61. This interface includes a stop charging prompt 62 and a status update prompt 63. The status update prompt 63 prompts the user to change the developer permission status from valid to invalid, i.e., to disable developer permissions. Developer permissions correspond to the data debugging permissions mentioned above. Furthermore... Figure 6 The document also shows the detection details, including the types of risks detected, such as risks associated with developer permissions and risks associated with image (photo) transmission permissions.

[0160] Next, we will explain the privacy protection process from a fundamental perspective. For example... Figure 7As shown, during the charging process of a charging device to a mobile terminal device, electrical energy is transferred, and data transfer may also occur. Therefore, the types of risks during charging include at least: 1) leakage of privacy data such as photos and files stored on the mobile terminal device, such as being viewed or copied; 2) implantation of malicious data, such as viruses or malicious applications (e.g., Trojan applications), into the mobile terminal device; 3) leakage of content from the mobile terminal device's contacts, SMS messages, and clipboard, such as being viewed or copied. In this embodiment, by specifically detecting these risk types and implementing corresponding risk control measures, data security and property security during the charging process are ensured.

[0161] This application provides embodiments such as Figure 8 The diagram illustrates a privacy protection method during the charging process. Figure 8 In this process, when a charging device is connected, the environment type detection model detects the current environment type of the mobile terminal device, while the privacy leakage risk detection model detects the charging type of the charging device and the risk type during the charging process. Finally, a comprehensive judgment is made based on the environment type, charging type, and risk type to obtain the target risk type, and risk control measures are taken according to the target risk type. The processing procedures of the environment type detection model and the privacy leakage risk detection model will be explained separately below.

[0162] 1) Environment type detection model. As an example, embodiments of this application provide, for instance, an environment type detection model. Figure 9 The diagram shown illustrates the processing steps of the environment type detection model, which will be combined with... Figure 9 The steps shown in the diagram are explained.

[0163] ① When a system power connection broadcast (corresponding to the power connection information above) is detected from a mobile terminal device, it is determined that a charging device has been connected, and the environment type detection model is activated. For ease of understanding, the following text uses a mobile terminal device with the Android operating system as an example, in which case the system power connection broadcast can be ACTION_POWER_CONNECTED.

[0164] ② Upon first detecting a system power connection broadcast, determine the network connection status of the mobile terminal device. This network can refer to a Wi-Fi wireless network, or other wireless or wired networks. If the mobile terminal device is not connected to the Wi-Fi wireless network, perform GPS positioning to obtain its geographic location information at the first moment, and match this information with the resident address database (corresponding to the resident geographic location information database mentioned above). If the geographic location information at the first moment successfully matches the resident address database (i.e., the resident address database includes the geographic location information at the first moment), output the environment type as "resident environment type".

[0165] When the geographic location information at the first moment fails to match the persistent address database (i.e., the database does not include the geographic location information at the first moment), the database determines whether to add the geographic location information at the first moment to the database based on the persistent conditions corresponding to the geographic location information. The persistent conditions corresponding to the geographic location information may include at least one of the following: the duration of continuous occurrence of the geographic location information at the first moment during charging exceeds a duration threshold; the number of times the geographic location information at the first moment appears in the historical time period before entering the charging process exceeds a number threshold; or the frequency of occurrence of the geographic location information at the first moment in the historical time period exceeds a frequency threshold. Geographic location information can be acquired periodically during charging, and the mobile terminal device may be in the charging or non-charging process during the historical time period.

[0166] It's worth noting that since users with mobile devices may move slightly around their usual location, the geographic location information at the first moment can be expanded to obtain a geographic location range (corresponding to the environmental information range mentioned above). When the geographic location information at the second moment falls within this geographic location range (i.e., a successful match), it is determined that the geographic location information at the second moment is the same as the geographic location information at the first moment. Here, the second moment is any moment distinct from the first moment. For example, if the geographic location information at the first moment includes a longitude and a latitude, then the longitude can be expanded to obtain a longitude range (e.g., the distance corresponding to this longitude range is ten meters), and the latitude can be expanded to obtain a latitude range (e.g., the distance corresponding to this latitude range is ten meters), thus obtaining a longitude and latitude range.

[0167] For example, the permanent conditions corresponding to the geographic location information can be: the duration of the continuous occurrence of the geographic location information at the first moment during the charging process is more than 1 hour (that is, the geographic location information obtained during the charging process for more than 1 hour falls within the above latitude and longitude range), and the geographic location information at the first moment has appeared for at least 15 days in the past 30 days (that is, the geographic location information falling within the above latitude and longitude range has been obtained for at least 15 days in the past 30 days).

[0168] When the geographic location information at the first moment does not meet the permanent condition corresponding to the geographic location information, the output environment type is non-permanent environment type; when the geographic location information at the first moment meets the permanent condition corresponding to the geographic location information, the output environment type is permanent environment type, and the geographic location information at the first moment is entered into the database, that is, added to the permanent address database.

[0169] ③ When the mobile terminal device is connected to a Wi-Fi wireless network, the network information of the connected Wi-Fi wireless network is obtained as the network information at the first moment. This network information can be a network identifier; the BSSID will be used as an example below. The BSSID at the first moment is matched with the resident identifier database (corresponding to the resident network information database mentioned above). When the BSSID at the first moment matches the resident identifier database successfully, that is, when the resident identifier database includes the BSSID at the first moment, the output environment type is resident environment type.

[0170] When the BSSID at the first moment fails to match the resident identifier database (i.e., the resident identifier database does not include the BSSID at the first moment), the decision on whether to add the BSSID at the first moment to the database is made based on the resident conditions corresponding to the BSSID. Similarly, the resident conditions corresponding to the BSSID can include at least one of the following: the duration of continuous occurrence of the BSSID at the first moment during charging (i.e., the duration of continuous connection to the Wi-Fi network connected at the first moment) is greater than a duration threshold; the number of times the BSSID at the first moment appears in the historical time period before entering the charging process is greater than a frequency threshold; or the frequency of the BSSID at the first moment during the historical time period is greater than a frequency threshold. For example, the resident conditions corresponding to the BSSID could be: the duration of continuous occurrence of the BSSID at the first moment during charging is greater than 1 hour, and the number of times the BSSID at the first moment appears in the past thirty days is greater than twice.

[0171] When the BSSID at the first moment does not meet the resident condition corresponding to the BSSID, the output environment type is non-resident environment type; when the BSSID at the first moment meets the resident condition corresponding to the BSSID, the output environment type is resident environment type, and the BSSID at the first moment is entered into the database, that is, added to the resident identifier database.

[0172] 2) Privacy leakage risk detection model. As an example, embodiments of this application provide, for instance, a privacy leakage risk detection model. Figure 10 The diagram shown illustrates the processing steps of the privacy breach risk detection model, which will combine... Figure 10 The steps shown in the diagram are explained.

[0173] ① When a system power connection broadcast (such as ACTION_POWER_CONNECTED) is detected by a mobile terminal device, it is determined that a charging device has been connected, and the privacy leakage risk detection model is activated.

[0174] ② Monitor the system battery level change broadcast (such as ACTION_BATTERY_CHANGED) in the mobile terminal device, where the system battery level change broadcast corresponds to the battery status information mentioned above. When the BATTERY_PLUGGED_USB status value in the system battery level change broadcast is a valid value (i.e., the first state is valid), the output charging type is USB charging type (corresponding to the first charging type mentioned above); when the BATTERY_PLUGGED_AC status value in the system battery level change broadcast is a valid value (i.e., the second state is valid), the output charging type is pure charging type (corresponding to the second charging type mentioned above). The USB charging type is used to support both charging and data transmission. For example, when the charging device is a laptop or desktop computer, the charging type is USB charging type. The pure charging type is also called AC charging type. The pure charging type is designed to only support charging, but data transmission may also occur during charging. For example, when the charging device is a charging socket or power bank, the charging type is pure charging type. It is worth noting that this application embodiment does not limit the valid value; for example, it can be set to 1 or other values.

[0175] ③ When the charging device is a USB charging device, the privacy permissions that need to be checked include USB debugging permissions (corresponding to developer permissions and data debugging permissions mentioned above), image transfer permissions, and file transfer permissions. For example, you can listen to the USB status system broadcast (such as ACTION_USB_STATE) and determine the status of USB debugging permissions based on the USB_FUNCTION_ADB status value in the USB status system broadcast. The USB status system broadcast corresponds to the connection status information mentioned above. When the USB_FUNCTION_ADB status value is valid, it proves that the USB debugging permission is valid (i.e., USB debugging permission is enabled). Figure 11 The USB configuration interface (permission configuration interface) shown here outputs a risk type of "risk exists". Further, it can also output specific risk types including the risk of implanting malicious data and the risk of content leakage (such as the leakage of content in contacts, text messages and clipboard).

[0176] Simultaneously, the image transfer permission status is determined based on the USB_FUNCTION_PTP status value broadcast by the USB status system. For example, a valid USB_FUNCTION_PTP status value indicates that the image transfer permission is valid. Figure 12 The USB configuration interface shown at this time outputs a risk type of "risk exists". Furthermore, it can also output a risk type specifically including photo leakage risk.

[0177] Simultaneously, the file transfer permission status is determined based on the USB_FUNCTION_MTP status value broadcast by the USB status system. For example, a valid USB_FUNCTION_MTP status value indicates that the file transfer permission is valid. Figure 13 The USB configuration interface shown here outputs a risk type of "risk exists". Furthermore, it can also output a specific risk type including file leakage risk.

[0178] In some embodiments, when it is determined that the charging type of the charging device is USB charging, the risk type can be directly output as "risk exists".

[0179] ④ When the charging device is in pure charging mode, the USB_FUNCTION_ADB status value cannot be read in this case. Therefore, the Settings.Global.ADB_ENABLED status value in the system settings information (also known as system settings items) is read to determine the USB debugging permission status. When the Settings.Global.ADB_ENABLED status value is valid, it proves that the USB debugging permission status is valid. At this time, the output risk type is "risk exists". Furthermore, the output risk type can specifically include the risk of malicious data injection and the risk of content leakage.

[0180] After detecting the environment type using the environment type detection model and the charging type and risk type using the privacy leakage risk detection model, the target risk type can be determined based on the environment type, charging type, and risk type. This application does not limit the method for determining the target risk type. For example, when the environment type is a permanent environment type, the target risk type is determined to be risk-free; when the environment type is a non-permanent environment type and the charging type is a risky charging type, the risk type is used as the target risk type, where the risky charging type can be at least one of USB charging type and pure charging type; when the environment type is a non-permanent environment type and the charging type is a risk-free charging type, the target risk type is determined to be risk-free, where the risk-free charging type is distinct from the risky charging type.

[0181] When the identified target risk type is deemed to be present, permissions that are currently active in the privacy settings can be restricted. For example, a "stop charging" prompt can be displayed to indicate that the user should disconnect from the charging device; alternatively, a status update prompt can be displayed to indicate that permissions currently active in the privacy settings need to be updated, i.e., prompting the user to disable such permissions.

[0182] When the identified target risk type is no risk, the status of all permissions in the privacy permissions can remain unchanged to avoid hindering the user's normal operation during the charging process, such as USB debugging, image transmission, and file transmission.

[0183] The embodiments of this application can achieve at least the following technical effects: 1) By integrating multi-dimensional information generated during the charging process, it can quickly and accurately identify whether there is a risk in the user's charging behavior, especially when the user uses shared charging equipment (such as shared power banks, massage chairs, charging sockets, etc.) in scenarios such as waiting for a bus, shopping, or dining; 2) It can perform timely analysis when the user accesses the charging equipment and remind the user of the risks obtained from the analysis, thereby ensuring the data security of the mobile terminal device and avoiding unnecessary economic losses to the user.

[0184] The following continues to describe an exemplary structure of the privacy protection device 455 for the charging process provided in the embodiments of this application, implemented as a software module. In some embodiments, such as Figure 2 As shown, the software modules in the privacy protection device 455 storing the charging process in the memory 450 may include: an environment type determination module 4551, used to acquire environmental information during the charging process based on the charging device, and perform environmental identification processing based on the environmental information to obtain the environment type during the charging process; a charging type determination module 4552, used to monitor the power status information during the charging process, and determine the charging type of the charging device based on the power status information; a risk type determination module 4553, used to determine the privacy permissions corresponding to the charging type, and perform risk identification processing on the privacy permissions to obtain the risk type during the charging process; and a risk control module 4554, used to perform risk control processing on the charging process based on the environment type, charging type, and risk type.

[0185] In some embodiments, the environment type determination module 4551 is further configured to: perform matching processing between the environment information and the resident environment information database; when the environment information is successfully matched with the resident environment information database, determine that the environment type during the charging process is a resident environment type; when the environment information fails to match with the resident environment information database, determine that the environment type during the charging process is a non-resident environment type.

[0186] In some embodiments, the environment type determination module 4551 is further configured to: determine the environment type during the charging process as a non-resident environment type when the environment information does not meet the resident condition; determine the environment type during the charging process as a resident environment type when the environment information meets the resident condition, and add the environment information to the resident environment information database; wherein the resident condition includes at least one of the following: the duration of continuous occurrence of the environment information during the charging process is greater than a duration threshold; the number of times the environment information appears in the historical time period before entering the charging process is greater than a number threshold; the frequency of occurrence of the environment information in the historical time period is greater than a frequency threshold.

[0187] In some embodiments, the environment type determination module 4551 is further configured to: when power connection information is detected at a first moment, determine that a charging process is initiated based on the connection-based charging device, and periodically acquire environmental information during the charging process; perform extended processing on the environmental information at the first moment to obtain an environmental information range; when the environmental information at a second moment successfully matches the environmental information range, determine that the environmental information at the second moment is the same as the environmental information at the first moment; wherein, the second moment represents any moment different from the first moment.

[0188] In some embodiments, the environment type determination module 4551 is further configured to: when the network connection status is connected, obtain the network information of the connected network as the environmental information during the charging process; when the network connection status is not connected, use the geographical location information obtained by location processing as the environmental information during the charging process.

[0189] In some embodiments, the power status information includes a first state corresponding to a first charging type and a second state corresponding to a second charging type; wherein the first charging type supports charging and data transmission, and the second charging type supports charging; the charging type determination module 4552 is further configured to: determine the charging type of the charging device as the first charging type when the first state is valid; and determine the charging type of the charging device as the second charging type when the second state is valid.

[0190] In some embodiments, when the charging type is a first charging type that supports charging and data transmission, the corresponding privacy permissions include data debugging permissions, image transmission permissions, and file transmission permissions; the risk type determination module 4553 is further configured to: monitor the connection status information corresponding to the charging device during the charging process; wherein, the connection status information includes the status corresponding to the data debugging permissions, image transmission permissions, and file transmission permissions respectively; when any one of the statuses in the connection status information is valid, the risk type during the charging process is determined to be risky; when multiple statuses in the connection status information are invalid, the risk type during the charging process is determined to be risk-free.

[0191] In some embodiments, when the charging type is a second charging type that supports charging, the corresponding privacy permissions include data debugging permissions; the risk type determination module 4553 is further configured to: monitor system setting information during the charging process; wherein, the system setting information includes the status of data debugging permissions; when the status of data debugging permissions in the system setting information is valid, the risk type during the charging process is determined to be risky; when the status of data debugging permissions in the system setting information is invalid, the risk type during the charging process is determined to be risk-free.

[0192] In some embodiments, the risk control module 4554 is further configured to: determine the target risk type during the charging process based on the environment type, charging type, and risk type; restrict the permissions in the privacy permissions that are valid when the target risk type is risky; and keep the status of all permissions in the privacy permissions unchanged when the target risk type is risk-free.

[0193] In some embodiments, the risk control module 4554 is further configured to: perform at least one of the following processes: perform a status update process on permissions that are valid in the privacy permissions to update the status of the permissions from valid to invalid; present at least one of a target risk type, a status update prompt, and a stop charging prompt; wherein the status update prompt is used to prompt for a status update process on permissions that are valid in the privacy permissions; and the stop charging prompt is used to prompt for disconnection from the charging device.

[0194] In some embodiments, the risk control module 4554 is further configured to: determine the target risk type during the charging process as risk-free when the environment type is a resident environment type; and use the risk type as the target risk type during the charging process when the environment type is a non-resident environment type and the charging type is a risky charging type; wherein the risky charging type includes at least one of a first charging type and a second charging type, the first charging type supports charging and data transmission, and the second charging type supports charging; and determine the target risk type during the charging process as risk-free when the environment type is a non-resident environment type and the charging type is a risk-free charging type; wherein the risk-free charging type is distinct from the risky charging type.

[0195] In some embodiments, the risk control module 4554 is further configured to: perform query processing in at least one historical risk control record based on environment type, charging type, and risk type; wherein each historical risk control record includes historical environment type, historical charging type, historical risk type, and historical risk control method; perform filtering processing on the queried historical risk control records according to filtering conditions; wherein the filtering conditions include any one of the following: the record time is closest to the current time; the historical risk control method has the highest frequency of occurrence; and perform risk control processing on the charging process based on the historical risk control methods in the filtered historical risk control records.

[0196] This application provides a computer program product or computer program that includes computer instructions (i.e., executable instructions) stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the privacy protection method for the charging process described above in this application.

[0197] This application provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to perform the method provided in this application, for example... Figure 3A , Figure 3B , Figure 3C , Figure 3D and Figure 3E The privacy protection method for the charging process is shown.

[0198] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0199] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0200] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0201] As an example, executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0202] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A method for privacy protection of a charging process, characterized in that, The method comprises: obtaining environment information in a charging process based on a charging device, and performing environment identification processing according to the environment information to obtain an environment type in the charging process; listening to power state information in the charging process, and determining a charging type of the charging device according to the power state information; determining a privacy permission corresponding to the charging type, and performing risk identification processing on the privacy permission to obtain a risk type in the charging process; performing risk control processing on the charging process according to the environment type, the charging type and the risk type.

2. The method of claim 1, wherein, The risk control processing on the charging process according to the environment type, the charging type and the risk type comprises: determining a target risk type in the charging process according to the environment type, the charging type and the risk type; when the target risk type is a risk, performing restriction processing on a permission with a valid state in the privacy permission; when the target risk type is no risk, keeping the state of all permissions in the privacy permission unchanged.

3. The method of claim 2, wherein, The determination of the target risk type in the charging process according to the environment type, the charging type and the risk type comprises: when the environment type is a resident environment type, determining that the target risk type in the charging process is no risk; when the environment type is a non-resident environment type and the charging type is a risk charging type, taking the risk type as the target risk type in the charging process; wherein the risk charging type comprises at least one of a first charging type and a second charging type, the first charging type supports charging and data transmission, and the second charging type supports charging; when the environment type is the non-resident environment type and the charging type is a no-risk charging type, determining that the target risk type in the charging process is no risk; wherein the no-risk charging type is different from the risk charging type.

4. The method of claim 2, wherein, The restriction processing on the permission with the valid state in the privacy permission comprises: performing at least one of the following processing: performing state update processing on the permission with the valid state in the privacy permission to update the state of the permission from valid to invalid; presenting at least one of the target risk type, a state update prompt and a stop charging prompt; wherein the state update prompt is used to prompt the state update processing on the permission with the valid state in the privacy permission; and the stop charging prompt is used to prompt to disconnect the connection between the charging device.

5. The method of claim 1, wherein, The environment identification processing according to the environment information to obtain the environment type in the charging process comprises: matching the environment information with a resident environment information library; when the environment information matches the resident environment information library successfully, determining that the environment type in the charging process is a resident environment type; when the environment information fails to match the resident environment information library, determining that the environment type in the charging process is a non-resident environment type.

6. The method of claim 5, wherein, The determination of the environment type in the charging process as a non-resident environment type comprises: determining that the environment type in the charging process is the non-resident environment type when the environment information does not satisfy the resident condition; when the environment information fails to match the resident environment information library, the method further comprises: when the environment information satisfies the resident condition, determining that the environment type in the charging process is the resident environment type, and adding the environment information to the resident environment information library; wherein the resident condition comprises at least one of: the duration of the continuous appearance of the environment information in the charging process is greater than a duration threshold; the number of occurrences of the environment information in a historical time period before entering the charging process is greater than a number threshold; and the occurrence frequency of the environment information in the historical time period is greater than a frequency threshold.

7. The method of claim 6, wherein, The environment information in the charging process based on the charging device is obtained, comprising: when the power connection information is listened to at the first time, it is determined that the charging process based on the connected charging device is entered, and the environment information is periodically obtained in the charging process; The method further comprises: performing extension processing on the environment information of the first time to obtain an environment information range; when the environment information at the second time matches the environment information range successfully, it is determined that the environment information at the second time is the same as the environment information at the first time; wherein the second time represents any time point different from the first time.

8. The method of claim 1, wherein, When the charging type is a first charging type supporting charging and data transmission, the corresponding privacy permission includes data debugging permission, image transmission permission and file transmission permission; The risk identification processing on the privacy permission obtains the risk type in the charging process, comprising: listening to connection state information corresponding to the charging device in the charging process; wherein the connection state information includes states corresponding to the data debugging permission, the image transmission permission and the file transmission permission, respectively; when any one of the states in the connection state information is valid, it is determined that the risk type in the charging process is at risk; when multiple states in the connection state information are invalid, it is determined that the risk type in the charging process is no risk.

9. The method of claim 1, wherein, When the charging type is a second charging type supporting charging, the corresponding privacy permission includes data debugging permission; the risk identification processing on the privacy permission obtains the risk type in the charging process, comprising: listening to system setting information in the charging process; wherein the system setting information includes the state of the data debugging permission; when the state of the data debugging permission in the system setting information is valid, it is determined that the risk type in the charging process is at risk; when the state of the data debugging permission in the system setting information is invalid, it is determined that the risk type in the charging process is no risk.

10. The method of claim 1, wherein, The environment information in the charging process based on the charging device is obtained, comprising: when the network connection state is connected, the network information of the connected network is obtained as the environment information in the charging process; When the network connection state is not connected, the geographic location information obtained by the positioning processing is taken as the environmental information in the charging process.

11. The method of claim 1, wherein, The power state information includes a first state corresponding to a first charging type and a second state corresponding to a second charging type; the first charging type supports charging and data transmission, and the second charging type supports charging. The determining of the charging type of the charging device according to the power state information comprises: When the first state is valid, the charging type of the charging device is determined as the first charging type. When the second state is valid, the charging type of the charging device is determined as the second charging type.

12. The method according to any one of claims 1 to 11, characterized in that, The risk control processing of the charging process according to the environmental type, the charging type and the risk type comprises: According to the environmental type, the charging type and the risk type, query processing is performed in at least one historical risk control record; each historical risk control record includes a historical environmental type, a historical charging type, a historical risk type and a historical risk control mode; According to the filtering condition, the historical risk control record obtained by the query is filtered; the filtering condition includes any one of the following: the record time is closest to the current time; the historical risk control mode has the maximum frequency of occurrence; According to the historical risk control mode in the filtered historical risk control record, the risk control processing of the charging process is performed.

13. A privacy protection apparatus for a charging process, characterized by, The device comprises: An environmental type determination module is configured to obtain environmental information in a charging process of a charging device, and perform environmental identification processing according to the environmental information to obtain an environmental type in the charging process. A charging type determination module is configured to listen to power state information in the charging process, and determine a charging type of the charging device according to the power state information. A risk type determination module is configured to determine a privacy permission corresponding to the charging type, and perform risk identification processing on the privacy permission to obtain a risk type in the charging process. A risk control module is configured to perform risk control processing on the charging process according to the environmental type, the charging type and the risk type.

14. An electronic device, comprising: It comprises: A memory is configured to store executable instructions. A processor is configured to execute the executable instructions stored in the memory to implement the privacy protection method of the charging process in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, Executable instructions are stored for being executed by a processor to implement the privacy protection method of the charging process in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Equipment charging method and system, and charger

    CN106487072A

  • Intelligent mobile phone charging optimization method

    CN107317372A