WO2019128538A1 - Information processing method, and mobile terminal and computer-readable storage medium - Google Patents

Information processing method, and mobile terminal and computer-readable storage medium Download PDF

Info

Publication number
WO2019128538A1
WO2019128538A1 PCT/CN2018/116438 CN2018116438W WO2019128538A1 WO 2019128538 A1 WO2019128538 A1 WO 2019128538A1 CN 2018116438 W CN2018116438 W CN 2018116438W WO 2019128538 A1 WO2019128538 A1 WO 2019128538A1
Authority
WO
WIPO (PCT)
Prior art keywords
registration process
mobile terminal
processor
running
frozen
Prior art date
Application number
PCT/CN2018/116438
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019128538A1 publication Critical patent/WO2019128538A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/11Arrangements specific to free-space transmission, i.e. transmission through air or vacuum
    • H04B10/114Indoor or close-range type systems
    • H04B10/1143Bidirectional transmission

Definitions

  • the present application relates to the field of computer technology, and in particular, to an information processing method, a mobile terminal, and a computer readable storage medium.
  • smart mobile terminals such as smart phones, tablets, etc.
  • smart mobile terminals can help users achieve more and more services, such as data transmission via the Internet.
  • smart mobile terminals can also transmit over short distances via Bluetooth, infrared or Near Field Communication (NFC).
  • Bluetooth infrared or Near Field Communication
  • the embodiment of the present application provides an information processing method, a mobile terminal, and a computer readable storage medium, which can improve security when data is transmitted through a short distance connection.
  • An information processing method includes:
  • the registration process in the non-freeze state is frozen.
  • a mobile terminal comprising a memory and a processor, wherein the memory stores a computer program, when the computer program is executed by the processor, causing the processor to perform the following operations: when detecting that the mobile terminal establishes with other terminals Acquiring a registration process of registering the short-distance connection notification running in the background when the short-distance connection is; determining the state of the registration process when detecting that the foreground process is performing a preset security operation; when the registration process When it is in the non-freeze state, the registration process in the non-freeze state is frozen.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor, causing the processor to perform an operation of: when detecting that a mobile terminal establishes a short-distance connection with other terminals, acquiring Registering a registration process of the short-distance connection notification running in the background; determining the state of the registration process when detecting that the foreground process is performing a preset security operation; when the registration process is in a non-freeze state, Freeze the registration process in an unfrozen state.
  • FIG. 1 is a block diagram of a mobile terminal in one embodiment.
  • FIG. 2 is a system architecture diagram of an information processing method in an embodiment.
  • FIG. 3 is a schematic flow chart of an information processing method in an embodiment.
  • FIG. 4 is a flow chart showing the process of freezing a process having a communication mechanism with a frozen registration process in one embodiment.
  • FIG. 5 is a schematic flowchart of determining a resource restriction level of a registration process in an embodiment.
  • Figure 6 is a schematic diagram of a resource group in one embodiment.
  • FIG. 7 is a schematic flow chart of determining a resource restriction level of a registration process in another embodiment.
  • Figure 8 is a flow diagram showing the process of terminating a state in a frozen state in one embodiment.
  • Figure 9 is a block diagram of an information processing apparatus in one embodiment.
  • Figure 10 is a block diagram of a mobile terminal in another embodiment.
  • first may be referred to as a second client
  • second client may be referred to as a first client, without departing from the scope of the present application.
  • Both the first client and the second client are clients, but they are not the same client.
  • the mobile terminal includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus.
  • the memory may include a non-volatile storage medium and a processor.
  • the non-volatile storage medium of the mobile terminal stores an operating system and a computer program, which are executed by the processor to implement an information processing method provided in the embodiments of the present application.
  • the processor is used to provide computing and control capabilities to support the operation of the entire mobile terminal.
  • the internal memory in the mobile terminal provides an environment for the operation of a computer program in a non-volatile storage medium.
  • the network interface of the mobile terminal is used for data transmission with other terminals.
  • the display screen of the mobile terminal may be a liquid crystal display or an electronic ink display screen.
  • the input device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the casing of the mobile terminal, or may be An external keyboard, trackpad, or mouse.
  • the mobile terminal can be a mobile phone, a tablet or a personal digital assistant or a wearable device.
  • FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the mobile terminal to which the solution of the present application is applied.
  • the specific mobile terminal may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • the system architecture includes a JAVA spatial layer 210, a local framework layer 220, and a kernel space layer 230.
  • the JAVA spatial layer 210 can include a freeze management module 212.
  • the freeze management module 212 can implement a freeze policy for each running application, and freeze the related applications that consume more power in the background or preempt a large amount of system resources.
  • the resource priority and restriction management module 222 and the platform freeze management module 224 are included in the local framework layer 220.
  • the mobile terminal can maintain different applications in different resource usage priorities and different resource groups in real time through the resource priority and restriction management module 222, and adjust the resource group of the application according to the requirements of the upper layer to achieve optimized performance.
  • the mobile terminal can allocate the application that can be frozen in the background to the frozen layer corresponding to the preset different levels according to the length of the entry freeze time through the platform freeze management module 224.
  • the frozen layer may include three: a CPU limited sleep mode, a CPU freeze sleep mode, and a process deep freeze mode.
  • the CPU restricts the sleep mode to limit the CPU resources occupied by the related processes, so that the related processes occupy less CPU resources, and the free CPU resources are tilted to other unfrozen processes, thereby limiting the occupation of CPU resources.
  • the local framework layer 220 may further include an interface module, where the interface module includes a binder interface developed to the upper layer, and the upper layer framework or the application sends the resource restriction or the frozen instruction to the resource priority and the limit management through the provided binder interface.
  • Module 222 and platform freeze management module 224 are also limited to the occupation of network resources and I/O interface resources by the process;
  • CPU freeze sleep mode refers to prohibiting related processes from using the CPU, while preserving the occupation of memory, when prohibiting the use of CPU resources, the corresponding network resources and I The /O interface resource is also forbidden;
  • the process deep freeze mode means that in addition to prohibiting the use of CPU resources, the memory resources occupied by the related processes are further recovered, and the recovered memory can be used by other processes.
  • the local framework layer 220 may further include an interface module, where the interface module includes a binder interface developed to the upper layer, and the upper layer framework or the application sends the resource restriction or the frozen instruction to the resource priority and the limit management through the provided binder interface.
  • the kernel space layer 230 may include a UID management module 231, a Cgroup module 233, a Binder management module 235, a process memory recovery module 237, and a freeze timeout exit module 239.
  • the UID management module 231 is configured to implement an application-based User Identifier (UID) to manage resources of a third-party application or freeze. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID.
  • the Cgroup module 233 is used to provide a complete set of CPU, CPUSET, memory, input/output (I/O) and Net related resource restriction mechanisms.
  • the Binder management module 235 is used to implement the priority control of the background binder communication.
  • the process memory recovery module 237 is configured to implement the process deep freeze mode, so that when a third-party application is in a frozen state for a long time, the file area of the process is mainly released, thereby saving the memory module and speeding up the application next time.
  • the freeze timeout exit module 239 can be used to resolve an exception generated by the freeze timeout scenario.
  • an information processing method including the following operations:
  • Operation 310 when detecting that the mobile terminal establishes a short-distance connection with other terminals, acquires a registration process of the registered short-distance connection notification running in the background.
  • Short-distance connection refers to the connection established by short-range wireless transmission technology, and short-range wireless transmission can communicate within a preset distance, which may be 10 meters, 20 meters, and the like.
  • the short-range wireless transmission may be one of Bluetooth (BLUETOOTH), infrared or Near Field Communication (NFC), etc., but is not limited thereto.
  • the mobile terminal can establish a short-distance connection with other terminal devices and perform data transmission through the established short-distance connection.
  • the mobile terminal can enable the Bluetooth communication function to pair with other terminals that open the Bluetooth communication function, and after the pairing is successful, the Bluetooth connection can be established with other terminals.
  • the registration process of registering the distance connection notification running in the background can be obtained.
  • the mobile terminal may determine the type of short-range wireless transmission of the connection and acquire registration process information corresponding to the type of the short-range wireless transmission.
  • Different types of short-range wireless transmissions may correspond to different registration process information, and the registration process information may include information such as an identifier, a name, a registration time, and the like of a process of registering a short-range wireless transmission service of a corresponding type, wherein the identifier of the process may be represented by a number. One or more of letters, symbols, and the like.
  • the process can register for short-range wireless transmission services that need to be used. After the registration of the short-range wireless transmission service is successful, the process can receive the notification of the short-range wireless transmission service and can use the short-range wireless transmission service.
  • the notification of the short-range wireless transmission service may include, but is not limited to, establishing a short-distance connection, disconnecting a short-distance connection, and the like.
  • the process registers with the Bluetooth service. After successful registration, the process can receive notifications of Bluetooth and can use Bluetooth for data transmission.
  • the registration process information of different types of short-range wireless transmissions may be recorded in different registries, and the mobile terminal may read the registration process information from the corresponding registry according to the type of short-range wireless transmission of the connection.
  • the mobile terminal may acquire, according to the registration process information corresponding to the short-distance connection, each registration process registered with the established short-distance connection notification, and obtain a registration process currently running in the background.
  • the mobile terminal can also obtain a list of all running processes through the activity manager's RunningAppProcessInfo class, and all process lists can include each running process and the running status of each process, wherein the running state It can include foreground running, background running, and so on.
  • the mobile terminal can query in the list of all processes running according to the identifier of the process included in the registration process information, and obtain the registration process running in the background.
  • Operation 320 determining the status of the registration process when it is detected that the foreground process is performing a preset security operation.
  • the foreground process running in the foreground can be monitored, and the mobile terminal can collect operation information executed by the foreground process, where the operation information can include operation type, operation content, operation time, and the like.
  • the mobile terminal may determine, according to the operation information executed by the foreground process, whether the foreground process is performing a preset security operation, where the preset security operation refers to a security level operation, such as a payment operation, a transfer operation, etc., but is not limited thereto.
  • Safety operations can be set according to actual needs.
  • the mobile terminal can determine the status of each registration process running in the background.
  • the status of the registration process may include a frozen state and a non-freeze state, wherein the frozen state refers to a process incapable of using resources such as CPU, I/O, and network, and is in a state incapable of continuing to run, but the process still occupies Memory resources, hard disk resources, etc.; non-freeze state means that the process can use system resources such as CPU, I/O, memory, and network, and is in a state where it can run execution tasks.
  • the mobile terminal can obtain status tags for various registration processes running in the background and determine the status of the registration process based on the status tags. Different states may be represented by different status tags. For example, the status tag corresponding to the frozen state is 0, and the status tag corresponding to the non-freeze state is 1, etc., but is not limited thereto.
  • the mobile terminal may also send a communication signal to each registration process running in the background, respectively, and detect whether a response signal is received within a predetermined time period. When the response signal returned by the registration process is not received within the predetermined time period, the mobile terminal may determine that the state of the registration process that did not transmit the response signal is a frozen state.
  • the mobile terminal may determine that the state of the registration process transmitting the response signal is a non-freeze state. It can be understood that the mobile terminal can also determine the status of each registration process running in the background in other manners, and is not limited to the above manners.
  • Operation 330 when the registration process is in a non-freeze state, freezes the registration process in an unfrozen state.
  • the mobile terminal can freeze the registration process in an unfrozen state. After the registration process is frozen, it will no longer continue to run, and resources such as CPU, I/O, and network cannot be used.
  • the frozen registration process cannot receive notifications sent by the registered short-range wireless transmission service, and can no longer use the registered short-range wireless transmission service for data transmission.
  • the mobile terminal may detect one by one whether each registration process running in the background is using the established short-distance connection for data transmission, and acquire a registration process that is currently using the short-distance connection for data transmission.
  • the mobile terminal may detect whether each registration process running in the background invokes a transmission interface corresponding to the established short-distance connection, thereby determining a registration process that is using the short-distance connection for data transmission.
  • the mobile terminal can freeze only the registration process that is performing data transmission. For other registration processes that run in the background but do not perform data transmission, the registration process may not be frozen, and the execution task is normally performed. It can improve the security of data transmission over short-distance connections, ensure the system responds normally, and reduce the situation that the process is frozen and cannot respond.
  • the frozen registration process when the mobile terminal detects that the foreground process ends the security operation, the frozen registration process may be thawed. Alternatively, if the foreground process ends the security operation performed, the mobile terminal may continue to collect the foreground process. Operation information, if the foreground process does not perform a new preset security operation within a preset time period, the frozen registration process may be thawed. After the registration process is thawed from the frozen state, you can use system resources such as CPU, I/O, memory, and network to run normally and perform tasks. The thawing registration process can normally receive the notification of the registered short-range wireless transmission service, and can also normally use the short-range wireless transmission service for data transmission.
  • the mobile terminal when detecting that the mobile terminal establishes a short-distance connection with other terminals, the mobile terminal may acquire a registration process of the registered short-distance connection notification running in the background, when detecting that the foreground process is performing the preset security operation.
  • the mobile terminal can freeze the registration process in the non-freeze state, which can prevent information leakage when data transmission through the short-distance connection, and can improve the security of short-distance wireless transmission.
  • Operation 402 obtaining a process running in the background and having a communication mechanism with the frozen registration process.
  • the mobile terminal may acquire a process that has a communication mechanism with the frozen registration process running in the background, where Communication mechanisms refer to the propagation or exchange of information between different processes.
  • the communication mechanism may include a socket, a binder, a shared memory, etc., wherein two programs on the network exchange data through a two-way communication connection, one end of the connection is called a socket; the binder is an interprocess Communication mechanism, providing remote procedure call function; shared memory is to allow two unrelated processes to access the same logical memory, shared memory is a very effective way to share and transfer data between two running processes, different The memory shared between processes is usually arranged in the same piece of physical memory.
  • the mobile terminal may detect whether there is a process that has at least one of socket and binder communication with the frozen registration process, and determine that the process with at least one of socket and binder communication with the frozen registration process is determined to have The process of the communication mechanism. The mobile terminal can also detect whether there is a process for memory sharing with the frozen registration process, and determine a process that performs memory sharing with the frozen registration process as a process having a communication mechanism.
  • Operation 404 freezes the process with the communication mechanism.
  • the mobile terminal After the mobile terminal acquires a process running in the background and has a communication mechanism with the frozen registration process, the state of each process having the communication mechanism can be acquired. When the process with the communication mechanism is in a non-freeze state, the mobile terminal can freeze the process with the communication mechanism. After the process with the communication mechanism is frozen, it will no longer be able to continue running, and resources such as CPU, I/O, and network cannot be used.
  • the mobile terminal when the mobile terminal detects a security operation in which the foreground process ends execution, the mobile terminal unfreezes the frozen registration process, and simultaneously freezes the frozen process having the communication mechanism with the registration process. After the process with the communication mechanism is thawed, the process with the communication mechanism can normally communicate with the thawed registration process.
  • the mobile terminal may freeze the process with the communication mechanism of the frozen registration process, thereby preventing the frozen registration process from being woken up, causing information leakage, and further improving the security of short-range wireless transmission.
  • Operation 502 obtaining an operational characteristic of the registration process.
  • the operational characteristics may include, but are not limited to, tasks currently performed by the registration process, communication events with other processes, current resource types and ratios, and the like.
  • Operation 504 determining a resource restriction level of the registration process according to the operational characteristics.
  • the mobile terminal can analyze the running characteristics of the registration process and determine the resource restriction level of the registration process according to the running characteristics.
  • the mobile terminal may set different resource restriction levels according to actual requirements.
  • the resource restriction level may be used to indicate the extent to which the used resources are restricted. The higher the resource restriction level, the greater the degree of restriction.
  • Restricted resources may include, but are not limited to, CPU resources, memory resources, I/O resources, network resources, and the like. Different resource restriction levels may correspond to different resource usage priorities. The higher the resource restriction level, the smaller the corresponding resource usage priority, and the lower the resource restriction level, the greater the corresponding resource usage priority.
  • the resource restriction level set by the mobile terminal may include an unrestricted level, a normal restriction level, a depth restriction level, and a freeze level.
  • An unrestricted level can mean that resources used by a process are not restricted.
  • the normal restriction level may refer to a process that can use fewer resources, such as up to 50% of resources, but is not limited thereto.
  • the depth limit level can mean that the process can use very few resources, such as up to 20% of resources, but not limited to this.
  • the freeze level refers to the process that cannot use any resources to stop all actions of the process.
  • the registration process when the registration process uses the established short-distance connection for data transmission, it can correspond to an unrestricted level; when the registration process does not use the short-range wireless transmission service, and only communicates with other registration processes that perform short-range wireless data transmission, It can correspond to the normal restriction level; when the registration process does not use the short-range wireless transmission service, and only communicates with other processes that do not perform short-range wireless data transmission, it can correspond to the depth resource restriction level, etc.; when the registration process is not used When the short-range wireless transmission service does not communicate with other processes, it can correspond to the freeze level, etc., but is not limited thereto.
  • the registration process is allocated to the resource group corresponding to the resource restriction level, and the resource usage priority corresponding to the resource restriction level is configured.
  • the registration process may be allocated to the resource group corresponding to the determined resource restriction level, and the resource usage priority corresponding to the resource restriction level may be configured.
  • the mobile terminal may divide different resource groups based on a kernel Cgroup (control group) mechanism, and set a resource usage priority of each resource group by using a file node write configuration manner, and is allocated to each resource group.
  • the process in the process is managed by the time or proportion of the resource.
  • the Cgroup is a mechanism provided in the kernel that can limit, record, and isolate the physical resources used by the process (such as CPU, memory, I/O, etc.). .
  • the mobile terminal can load a Cgroup configuration file, and the configuration file can record the divided resource groups, the resource usage priorities of the resource groups, and the resource scheduling policies corresponding to the resource usage priorities.
  • the resource scheduling policy may include, but is not limited to, the time allocated by the process allocated to the resource group, the proportion of occupied resources, the resource identifier used, and the like.
  • the process of configuring the resource group corresponding to the common restriction level is within 1 minute.
  • the CPU resource of 30 seconds can be used, and the process of the resource group corresponding to the common restriction level can only use the CPU resource numbered X, but is not limited thereto.
  • the mobile terminal can modify the configuration file of the Cgroup.
  • the registration process may use the CPU, the memory, and the resource scheduling policy corresponding to the resource group. Resources such as I/O and network.
  • the mobile terminal may acquire the running characteristics of each registration process that registers the current short-distance connection notification at regular intervals, and determine the resource restriction level of the registration process according to the running characteristics.
  • the resource restriction level of the registration process can change as the operational characteristics change.
  • the mobile terminal can increase the resource restriction level of the registration process and reduce the resource usage priority of the registration process; after the registration process starts using the short-distance connection for data transmission, the mobile terminal can be reduced.
  • the resource restriction level of the registration process, the resource usage priority of the registration process, etc. but is not limited thereto.
  • the mobile terminal may freeze the registration process in the non-freeze state in the background running, and may add and freeze the registration process in the non-freeze state.
  • the resource group corresponding to the level is configured with the resource usage priority corresponding to the resource group.
  • Figure 6 is a schematic diagram of a resource group in one embodiment.
  • four different resource restriction levels can be set in the mobile terminal, and four resource groups are divided, wherein the first resource group corresponds to an unrestricted level, and the second resource group corresponds to an ordinary limit. Level, the third resource group corresponds to the depth limit level, and the fourth resource group corresponds to the freeze level.
  • the four resource groups may respectively correspond to different resource usage priorities, the resource usage priority of the first resource group may be higher than the second resource group, and the resource usage priority of the second resource group may be higher than the third resource. In the group, the resource usage priority of the third resource group may be higher than the fourth resource group.
  • the first resource group at an unrestricted level does not limit resources such as CPU, memory, I/O, and network used by the process.
  • the second resource group restriction process of the normal restriction level can use less resources such as CPU, memory, I/O, and network.
  • the third resource group limit process at the depth limit level uses very few resources such as CPU, memory, I/O, and network.
  • the fourth resource group restriction process at the freeze level cannot use resources such as CPU, memory, I/O, and network.
  • the mobile terminal determines the resource restriction level according to the running characteristics of the registration process, and adds the registration process to the corresponding resource group to configure the resource usage priority corresponding to the resource group, and manages the resources used by the registration process.
  • the mobile terminal may determine the resource restriction level according to the running characteristics of the registration process, dynamically implement different levels of resource restrictions on the registration process, optimize system performance, and save power consumption.
  • the foregoing information processing method further includes the following operations:
  • the running characteristics of the registration process are collected through the kernel space, and the running features are packaged into data packets and transmitted to the user space.
  • the virtual space of the mobile terminal may include kernel space and user space, the kernel space may be used to store the code and data of the kernel, and the user space may be used to store the code and data of the application.
  • Kernel space has a high privilege level. Processes running in kernel space can have access to all hardware of the mobile terminal. User space has lower permissions. Processes running in user space can only use some resources of the system.
  • the mobile terminal can collect event data of each registration process running in the background through the kernel space, and the event data can include, but is not limited to, an event type, an event time, an event content, a target identifier to which the event belongs, and the like.
  • Event types can include, but are not limited to, communication events, create events, exit events, change identification events, task events, and the like.
  • Communication events may include binder communication events and socket communication events.
  • Creating an event can refer to an event created by a process or thread.
  • An exit event refers to an event that is exited by an application, process, or thread.
  • a change identification event can refer to a process or a thread that changes its own identity, and the like.
  • a task event can refer to a task, such as an application, a process, or a thread.
  • the mobile terminal may collect event data of different event types for different registration processes.
  • the mobile terminal may pre-determine the type of the event to be collected and the corresponding process identifier.
  • the process of collecting the binder communication event may be pre-determined, or the application or process for collecting the socket communication event may be pre-defined.
  • Different event types can correspond to different process identifiers.
  • the mobile terminal collects event data of each registration process through the kernel space, extracts running characteristics of each registration process from the event data, and packages the running characteristics into data packets and transmits the data to the user space according to the agreed packet format.
  • the kernel space and the user space can communicate by means of an asynchronous netlink, which is a special inter-process communication that enables the user process to communicate with the kernel process.
  • the kernel space transmits the running characteristics of each registration process to the user space through asynchronous communication, which is faster and more convenient than the active query mode of the user space, and can improve the transmission efficiency of the running features.
  • Operation 704 parsing the data packet through the user space, and obtaining an operation feature of the registration process.
  • Operation 706 analyzing the running characteristics through the user space, and determining a resource restriction level of the registration process.
  • the data packet can be parsed to obtain the running characteristics of each registration process.
  • the mobile terminal can analyze the running characteristics of each registration process through the user space, and determine the resource restriction level of each registration process.
  • the mobile terminal can collect the running features of each registration process running in the background through the kernel space, and transmit the collected running features to the user space for analysis, and the mobile terminal can provide more clues for determining the resource restriction level. It can make the resource restriction level adjustment of the registration process more accurate, improve resource management effect and system performance.
  • the information processing method further includes the following operations:
  • Operation 802 transmitting a termination signal through the user space.
  • the termination signal can be sent through the user space, and the termination signal can be used to terminate the running of the process, causing the process to exit and release the occupied system resources such as CPU and memory.
  • the termination signal is intercepted, and when the target process of the termination signal is in a frozen state, the target process and each thread included in the target process are thawed.
  • the mobile terminal intercepts the termination signal sent by the user space and determines whether the target process of the termination signal is in a frozen state.
  • the mobile terminal can directly send the termination signal to the target process, and the target process can respond to the termination signal to terminate the operation of the target process.
  • the target state is in a frozen state
  • the process that is in the frozen state cannot receive the signal sent by other processes normally, and therefore does not respond normally to the termination signal.
  • it is usually necessary to write two sets of different codes, which are used to terminate the frozen state process and the non-freeze state process, which poses a major obstacle to the development and maintenance of the system.
  • the mobile terminal may first send a defrosting signal to the target process, and thaw the target process and each thread included in the target process. Unfreezing the target process and all the threads included in the target process can prevent the zombie process from being wasted, causing waste of system resources.
  • the zombie process refers to the fact that although the process has exited, some exits are reserved for it in the system process table. Status information, which occupies the process table entry.
  • Operation 806 setting the target process to a non-freeze state, and sending a termination signal to the target process, and the termination signal is used to terminate the target process.
  • the target process can be set to a non-frozen state, and the unfrozen state refers to that the target process cannot be frozen again.
  • the mobile terminal can send the termination signal to the target process. Since the target process is in an unfrozen state at this time, the termination signal can be normally responded, the target process is terminated, the target process is exited, and the occupied CPU, memory, and the like are released. Resources.
  • the mobile terminal can safely terminate the process in the frozen state without the occurrence of a zombie process.
  • the user space can send a unified termination signal for both the frozen state and the non-freeze state process termination, without having to write two different sets of code, which can reduce system development and maintenance costs.
  • an information processing method including the following operations:
  • Operation (1) when detecting that the mobile terminal establishes a short-distance connection with other terminals, acquires a registration process of the registered short-distance connection notification running in the background.
  • the method further includes: acquiring an operation feature of the registration process; determining a resource restriction level of the registration process according to the operation feature; assigning the registration process to the resource group corresponding to the resource restriction level, and configuring The resource usage priority corresponding to the resource restriction level.
  • the running feature of the registration process is obtained, including: collecting, by using a kernel space, a running feature of the registration process, and packaging the running feature into a data packet and transmitting the data to the user space; and parsing the data packet through the user space to obtain an operation feature of the registration process; Determining the resource restriction level of the registration process according to the running characteristics, including: analyzing the running characteristics through the user space, and determining the resource restriction level of the registration process.
  • Operation (2) determines the status of the registration process when it is detected that the foreground process is performing a preset security operation.
  • the operation (3) comprises: obtaining a registration process that is currently using a short-distance connection for data transmission, and freezing the registration process for performing data transmission.
  • the method further includes: acquiring a process running in the background and having a communication mechanism with the frozen registration process; and freezing the process having the communication mechanism.
  • the method further includes: unfreezing the frozen registration process when the current station process ends the security operation.
  • the foregoing information processing method further includes: sending a termination signal through the user space; intercepting the termination signal, and when the target process of the termination signal is in a frozen state, thawing the target process and each thread included in the target process; setting the target process The non-freeze state and the termination signal is sent to the target process, and the termination signal is used to terminate the target process.
  • the mobile terminal when detecting that the mobile terminal establishes a short-distance connection with other terminals, acquiring a registration process of the registered short-distance connection notification running in the background, when detecting that the foreground process is performing a preset security operation, the freezing of the registration process in the non-freeze state prevents information leakage when data transmission over short-distance connections, and improves the security of short-range wireless transmission.
  • an information processing apparatus 900 including a registration process acquisition module 910, a state determination module 920, and a freeze module 930.
  • the registration process obtaining module 910 is configured to acquire a registration process of the registered short-distance connection notification running in the background when detecting that the mobile terminal establishes a short-distance connection with other terminals.
  • the status determining module 920 is configured to determine a status of the registration process when detecting that the foreground process is performing a preset security operation.
  • the freezing module 930 is configured to freeze the registration process in the non-freezing state when the registration process is in the non-freeze state.
  • the freezing module 930 is further configured to acquire a registration process that is currently using a short-distance connection for data transmission, and freeze the registration process for performing data transmission.
  • the information processing apparatus 900 further includes a defrosting module.
  • the defrosting module is used to unfreeze the frozen registration process when the current process ends the security operation.
  • the mobile terminal when detecting that the mobile terminal establishes a short-distance connection with other terminals, the mobile terminal may acquire a registration process of the registered short-distance connection notification running in the background, when detecting that the foreground process is performing the preset security operation.
  • the mobile terminal can freeze the registration process in the non-freeze state, which can prevent information leakage when data transmission through the short-distance connection, and can improve the security of short-distance wireless transmission.
  • the freeze module 930 is further configured to acquire a process running in the background and having a communication mechanism with the frozen registration process, and freeze the process having the communication mechanism.
  • the process with the communication mechanism of the frozen registration process can be frozen, which can prevent the frozen registration process from being woken up, causing information leakage, and further improving the security of short-range wireless transmission.
  • the information processing apparatus 900 includes a registration process acquisition module 910, a state determination module 920, a freeze module 930, and a defrosting module, and a feature acquisition module, a level determination module, and a configuration module.
  • a feature acquisition module is configured to acquire an operation feature of the registration process.
  • a level determining module is configured to determine a resource restriction level of the registration process according to the running characteristics.
  • the configuration module is configured to allocate the registration process to the resource group corresponding to the resource restriction level, and configure the resource usage priority corresponding to the resource restriction level.
  • the resource restriction level may be determined according to the running characteristics of the registration process, and resource restrictions of different levels may be dynamically implemented for the registration process to optimize system performance and save power consumption.
  • the feature acquisition module includes
  • the collecting unit is configured to collect the running characteristics of the registration process through the kernel space, and package the running features into data packets and transmit the data to the user space.
  • the parsing unit is configured to parse the data packet through the user space to obtain an operation feature of the registration process.
  • the configuration module is also used to analyze the running characteristics through the user space to determine the resource restriction level of the registration process.
  • the running characteristics of each registration process running in the background can be collected through the kernel space, and the collected running features are transmitted to the user space for analysis, and more clues for determining the resource restriction level can be provided, so that the registration process can be performed.
  • the resource restriction level adjustment is more accurate, improving resource management effects and system performance.
  • the information processing apparatus 900 includes a registration process acquisition module 910, a state determination module 920, a freeze module 930, a defrosting module, a feature acquisition module, a level determination module, and a configuration module, and includes a sending module and a setting module.
  • a sending module configured to send a termination signal through a user space.
  • the thawing module is also used to intercept the termination signal. If the target process of the termination signal is in a frozen state, the target process and each thread included in the target process are thawed.
  • a setting module is configured to set the target process to a non-freeze state, and send a termination signal to the target process, and the termination signal is used to terminate the target process.
  • the process in the frozen state can be safely terminated without a situation such as a zombie process.
  • the user space can send a unified termination signal for both the frozen state and the non-freeze state process termination, without having to write two different sets of code, which can reduce system development and maintenance costs.
  • the embodiment of the present application further provides a mobile terminal.
  • a mobile terminal As shown in FIG. 10, for the convenience of description, only the parts related to the embodiments of the present application are shown. For the specific technical details not disclosed, refer to the method part of the embodiment of the present application.
  • the mobile terminal can be any mobile device, a tablet computer, a personal digital assistant (PDA), a point of sale (POS), a car computer, a wearable device, and the like, and the mobile terminal is used as a mobile phone.
  • PDA personal digital assistant
  • POS point of sale
  • car computer a car computer
  • wearable device a wearable device
  • FIG. 10 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal provided by an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, and a processor 1080. And power supply 1090 and other components.
  • RF radio frequency
  • the RF circuit 1010 can be used for receiving and transmitting signals during the transmission and reception of information or during a call.
  • the downlink information of the base station can be received and processed by the processor 1080.
  • the uplink data can also be sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuit 1010 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to GSM, GPRS, Code Division Multiple Access (CDMA), W-CDMA, Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
  • the memory 1020 can be used to store software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1020.
  • the memory 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.);
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • memory 1020 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 1030 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 1000.
  • the input unit 1030 may include a touch panel 1032 and other input devices 1034.
  • the touch panel 1032 which may also be referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 1032 or near the touch panel 1032. Operation) and drive the corresponding connection device according to a preset program.
  • the touch panel 1032 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 1080 is provided and can receive commands from the processor 1080 and execute them.
  • the touch panel 1032 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1030 can also include other input devices 1034.
  • other input devices 1034 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
  • the display unit 1040 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 1040 can include a display panel 1042.
  • the display panel 1042 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 1032 can cover the display panel 1042. When the touch panel 1032 detects a touch operation thereon or nearby, the touch panel 1032 transmits to the processor 1080 to determine the type of the touch event, and then the processor 1080 is The type of touch event provides a corresponding visual output on display panel 1042.
  • the touch panel 1032 and the display panel 1042 are used as two independent components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 1032 can be integrated with the display panel 1042. Realize the input and output functions of the phone.
  • the handset 1000 can also include at least one type of sensor 1050, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1042 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1042 and/or when the mobile phone moves to the ear. Or backlight.
  • the motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • Audio circuitry 1060, speaker 1062, and microphone 1064 can provide an audio interface between the user and the handset.
  • the audio circuit 1060 can transmit the converted electrical data of the received audio data to the speaker 1062, and convert it into a sound signal output by the speaker 1062.
  • the microphone 1064 converts the collected sound signal into an electrical signal, and the audio circuit 1060. After receiving, it is converted into audio data, and then processed by the audio data output processor 1080, transmitted to another mobile phone via the RF circuit 1010, or outputted to the memory 1020 for subsequent processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone through the WiFi module 1070 can help users to send and receive e-mail, browse the web and access streaming media, etc. It provides users with wireless broadband Internet access.
  • FIG. 10 shows the WiFi module 1070, it can be understood that it does not belong to the essential configuration of the mobile phone 1000 and can be omitted as needed.
  • the processor 1080 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1020, and invoking data stored in the memory 1020, The phone's various functions and processing data, so that the overall monitoring of the phone.
  • processor 1080 can include one or more processing units.
  • the processor 1080 can integrate an application processor and a modem, wherein the application processor primarily processes an operating system, a user interface, an application, etc.; the modem primarily processes wireless communications. It will be appreciated that the above described modem may also not be integrated into the processor 1080.
  • the processor 1080 can integrate an application processor and a baseband processor, and the baseband processor and other peripheral chips can form a modem.
  • the mobile phone 1000 also includes a power source 1090 (such as a battery) for powering various components.
  • the power source can be logically coupled to the processor 1080 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the handset 1000 may also include a camera, a Bluetooth module, and the like.
  • the processor 880 included in the mobile terminal implements the above information processing method when executing a computer program stored in the memory.
  • the mobile terminal can include a memory 1020 and a processor 1080.
  • the memory 1020 stores a computer program that, when executed by the processor 1080, causes the processor to perform the following operations:
  • the registration process is in a non-frozen state, the registration process that is in an unfrozen state is frozen.
  • a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the information processing method described above.
  • a computer program product comprising a computer program, when executed on a computer device, causes the computer device to perform the information processing method described above when executed.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as an external cache.
  • RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • synchronization Link (Synchlink) DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Bioethics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

An information processing method, comprising: when it is detected that a mobile terminal establishes a short-distance connection with other terminals, acquiring a registration process, running in the background, of registering a short-distance connection notification; when it is detected that a foreground process is executing a pre-set security operation, determining the state of the registration process; and when the registration process is in a non-frozen state, freezing the registration process in the non-frozen state.

Description

信息处理方法、移动终端及计算机可读存储介质Information processing method, mobile terminal and computer readable storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年12月29日提交中国专利局、申请号为201711480563.5、发明名称为“信息处理方法、装置、移动终端及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on Dec. 29, 2017, the Chinese Patent Application No. 201711480563.5, entitled "Information Processing Method, Apparatus, Mobile Terminal, and Computer Readable Storage Medium", the entire contents of which is hereby incorporated by reference. This is incorporated herein by reference.
技术领域Technical field
本申请涉及计算机技术领域,特别是涉及一种信息处理方法、移动终端及计算机可读存储介质。The present application relates to the field of computer technology, and in particular, to an information processing method, a mobile terminal, and a computer readable storage medium.
背景技术Background technique
随着智能移动终端(例如智能手机、平板电脑等)的功能日益强大,智能移动终端可帮助用户实现越来越多的业务,例如可以通过互联网等进行数据传输。而在没有移动网络信号的情况下,智能移动终端也可通过蓝牙、红外或近距离无线通讯技术(Near Field Communication,NFC)等进行短距离传输。With the increasing power of smart mobile terminals (such as smart phones, tablets, etc.), smart mobile terminals can help users achieve more and more services, such as data transmission via the Internet. In the absence of mobile network signals, smart mobile terminals can also transmit over short distances via Bluetooth, infrared or Near Field Communication (NFC).
发明内容Summary of the invention
本申请实施例提供一种信息处理方法、移动终端及计算机可读存储介质,可以提高通过短距离连接进行数据传输时的安全性。The embodiment of the present application provides an information processing method, a mobile terminal, and a computer readable storage medium, which can improve security when data is transmitted through a short distance connection.
一种信息处理方法,包括:An information processing method includes:
当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册所述短距离连接通知的注册进程;When detecting that the mobile terminal establishes a short-distance connection with other terminals, acquiring a registration process of registering the short-distance connection notification running in the background;
当检测到所述前台进程正在执行预设的安全操作时,确定所述注册进程的状态;Determining a status of the registration process when detecting that the foreground process is performing a preset security operation;
当所述注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。When the registration process is in a non-freeze state, the registration process in the non-freeze state is frozen.
一种移动终端,包括存储器及处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行以下操作:当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册所述短距离连接通知的注册进程;当检测到所述前台进程正在执行预设的安全操作时,确定所述注册进程的状态;当所述注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。A mobile terminal comprising a memory and a processor, wherein the memory stores a computer program, when the computer program is executed by the processor, causing the processor to perform the following operations: when detecting that the mobile terminal establishes with other terminals Acquiring a registration process of registering the short-distance connection notification running in the background when the short-distance connection is; determining the state of the registration process when detecting that the foreground process is performing a preset security operation; when the registration process When it is in the non-freeze state, the registration process in the non-freeze state is frozen.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行以下操作:当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册所述短距离连接通知的注册进程;当检测到所述前台进程正在执行预设的安全操作时,确定所述注册进程的状态;当所述注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor, causing the processor to perform an operation of: when detecting that a mobile terminal establishes a short-distance connection with other terminals, acquiring Registering a registration process of the short-distance connection notification running in the background; determining the state of the registration process when detecting that the foreground process is performing a preset security operation; when the registration process is in a non-freeze state, Freeze the registration process in an unfrozen state.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为一个实施例中移动终端的框图。1 is a block diagram of a mobile terminal in one embodiment.
图2为一个实施例中信息处理方法的系统架构图。2 is a system architecture diagram of an information processing method in an embodiment.
图3为一个实施例中信息处理方法的流程示意图。FIG. 3 is a schematic flow chart of an information processing method in an embodiment.
图4为一个实施例中对与冻结的注册进程具备通信机制的进程进行冻结的流程示意图。4 is a flow chart showing the process of freezing a process having a communication mechanism with a frozen registration process in one embodiment.
图5为一个实施例中确定注册进程的资源限制级别的流程示意图。FIG. 5 is a schematic flowchart of determining a resource restriction level of a registration process in an embodiment.
图6为一个实施例中资源组别的示意图。Figure 6 is a schematic diagram of a resource group in one embodiment.
图7为另一个实施例中确定注册进程的资源限制级别的流程示意图。FIG. 7 is a schematic flow chart of determining a resource restriction level of a registration process in another embodiment.
图8为一个实施例中终止处于冻结状态的进程的流程示意图。Figure 8 is a flow diagram showing the process of terminating a state in a frozen state in one embodiment.
图9为一个实施例中信息处理装置的框图。Figure 9 is a block diagram of an information processing apparatus in one embodiment.
图10为另一个实施例中移动终端的框图。Figure 10 is a block diagram of a mobile terminal in another embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It will be understood that the terms "first", "second" and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
图1为一个实施例中移动终端的框图。如图1所示,该移动终端包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,存储器可包括非易失性存储介质及处理器。移动终端的非易失性存储介质存储有操作系统及计算机程序,该计算机程序被处理器执行时以实现本申请实施例中提供的一种信息处理方法。该处理器用于提供计算和控制能力,支撑整个移动终端的运行。移动终端中的内存储器为非易失性存储介质中的计算机程序的运行提供环境。移动终端的网络接口用于与其他终端进行数据传输。移动终端的显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是移动终端外壳上设置的按键、轨迹球或触控板,也可以是外接的键盘、触控板或鼠标等。该移动终端可以是手机、平板电脑或者个人数字助理或穿戴式设备等。本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的移动终端的限定,具体的移动终端可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。1 is a block diagram of a mobile terminal in one embodiment. As shown in FIG. 1, the mobile terminal includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. The memory may include a non-volatile storage medium and a processor. The non-volatile storage medium of the mobile terminal stores an operating system and a computer program, which are executed by the processor to implement an information processing method provided in the embodiments of the present application. The processor is used to provide computing and control capabilities to support the operation of the entire mobile terminal. The internal memory in the mobile terminal provides an environment for the operation of a computer program in a non-volatile storage medium. The network interface of the mobile terminal is used for data transmission with other terminals. The display screen of the mobile terminal may be a liquid crystal display or an electronic ink display screen. The input device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the casing of the mobile terminal, or may be An external keyboard, trackpad, or mouse. The mobile terminal can be a mobile phone, a tablet or a personal digital assistant or a wearable device. A person skilled in the art can understand that the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the mobile terminal to which the solution of the present application is applied. The specific mobile terminal may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
图2为一个实施例中信息处理方法的系统架构图。如图2所示,该系统架构中包括JAVA空间层210、本地框架层220以及内核(Kernel)空间层230。JAVA空间层210上可包含冻结管理模块212,移动终端可通过该冻结管理模块212来实现对运行的各个应用的冻结策略,对后台耗电较多或是抢占大量系统资源的相关应用进行冻结操作。本地框架层220中包含资源优先级和限制管理模块222和平台冻结管理模块224。移动终端可通过资源优先级和限制管理模块222实时维护不同的应用处于不同的资源使用优先级和不同的资源组别中,并根据上层的需求来调整应用程序的资源组别从而达到优化性能,节省功耗的作用。移动终端可通过平台冻结管理模块224将后台可以冻结的应用按照进入冻结时间的长短,分配到对应预设的不同层次的冻结层。可选地,该冻结层可包括三个,分别是:CPU限制睡眠模式、CPU冻结睡眠模式、进程深度冻结模式。其中,CPU限制睡眠模式是指对相关进程所占用的CPU资源进行限制,使相关进程占用较少的CPU资源,将空余的CPU资源向其它未被冻结的进程倾斜,限制了对CPU资源的占用,也相应限制了进程对网络资源以及I/O接口资源的占用;CPU冻结睡眠模式是指禁止相关进程使用CPU,而保留对内存的占用,当禁止使用CPU资源时,相应的网络资源以及I/O接口资源也被禁止使用;进程深度冻结模式是指除禁止使用CPU资源之外,进一步对相关进程所占用的内存资源进行回收,回收的内存可供其它进程使用。可选地,本地框架层220还可包括接口模块,该接口模块包含开发给上层的binder接口,上层的框架或者应用通过提供的binder接口来 发送资源限制或者冻结的指令给资源优先级和限制管理模块222和平台冻结管理模块224。2 is a system architecture diagram of an information processing method in an embodiment. As shown in FIG. 2, the system architecture includes a JAVA spatial layer 210, a local framework layer 220, and a kernel space layer 230. The JAVA spatial layer 210 can include a freeze management module 212. The freeze management module 212 can implement a freeze policy for each running application, and freeze the related applications that consume more power in the background or preempt a large amount of system resources. . The resource priority and restriction management module 222 and the platform freeze management module 224 are included in the local framework layer 220. The mobile terminal can maintain different applications in different resource usage priorities and different resource groups in real time through the resource priority and restriction management module 222, and adjust the resource group of the application according to the requirements of the upper layer to achieve optimized performance. Save power. The mobile terminal can allocate the application that can be frozen in the background to the frozen layer corresponding to the preset different levels according to the length of the entry freeze time through the platform freeze management module 224. Optionally, the frozen layer may include three: a CPU limited sleep mode, a CPU freeze sleep mode, and a process deep freeze mode. The CPU restricts the sleep mode to limit the CPU resources occupied by the related processes, so that the related processes occupy less CPU resources, and the free CPU resources are tilted to other unfrozen processes, thereby limiting the occupation of CPU resources. It also limits the occupation of network resources and I/O interface resources by the process; CPU freeze sleep mode refers to prohibiting related processes from using the CPU, while preserving the occupation of memory, when prohibiting the use of CPU resources, the corresponding network resources and I The /O interface resource is also forbidden; the process deep freeze mode means that in addition to prohibiting the use of CPU resources, the memory resources occupied by the related processes are further recovered, and the recovered memory can be used by other processes. Optionally, the local framework layer 220 may further include an interface module, where the interface module includes a binder interface developed to the upper layer, and the upper layer framework or the application sends the resource restriction or the frozen instruction to the resource priority and the limit management through the provided binder interface. Module 222 and platform freeze management module 224.
内核空间层230中可包括UID管理模块231、Cgroup模块233、Binder管控模块235、进程内存回收模块237以及冻结超时退出模块239。其中,UID管理模块231用于实现基于应用的用户身份标识(User Identifier,UID)来管理第三方应用的资源或进行冻结。相比较于基于进程身份标识(Process Identifier,PID)来进行进程管控,通过UID更便于统一管理一个用户的应用的资源。Cgroup模块233用于提供一套完善的CPU、CPUSET、内存(memory)、输入/输出(input/output,I/O)和Net相关的资源限制机制。Binder管控模块235用于实现后台binder通信的优先级的控制。进程内存回收模块237用于实现进程深度冻结模式,这样能当某个第三方应用长期处于冻结状态的时候,会主要释放掉进程的文件区,从而达到节省内存的模块,也加快该应用在下次启动时的速度。冻结超时退出模块239可用于解决出现冻结超时场景产生的异常。通过上述的系统架构,可实现本申请各个实施例中的信息处理方法。The kernel space layer 230 may include a UID management module 231, a Cgroup module 233, a Binder management module 235, a process memory recovery module 237, and a freeze timeout exit module 239. The UID management module 231 is configured to implement an application-based User Identifier (UID) to manage resources of a third-party application or freeze. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID. The Cgroup module 233 is used to provide a complete set of CPU, CPUSET, memory, input/output (I/O) and Net related resource restriction mechanisms. The Binder management module 235 is used to implement the priority control of the background binder communication. The process memory recovery module 237 is configured to implement the process deep freeze mode, so that when a third-party application is in a frozen state for a long time, the file area of the process is mainly released, thereby saving the memory module and speeding up the application next time. The speed at startup. The freeze timeout exit module 239 can be used to resolve an exception generated by the freeze timeout scenario. Through the system architecture described above, the information processing method in various embodiments of the present application can be implemented.
如图3所示,在一个实施例中,提供一种信息处理方法,包括以下操作:As shown in FIG. 3, in an embodiment, an information processing method is provided, including the following operations:
操作310,当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册短距离连接通知的注册进程。 Operation 310, when detecting that the mobile terminal establishes a short-distance connection with other terminals, acquires a registration process of the registered short-distance connection notification running in the background.
短距离连接指的是采用短距离无线传输技术建立的连接,短距离无线传输可在预设距离内进行通信,该预设距离可以是10米、20米等。可选地,短距离无线传输可以是蓝牙(BLUETOOTH)、红外或近距离无线通讯技术(Near Field Communication,NFC)等中的一种,但不限于此。移动终端可与其他终端设备建立短距离连接,并通过建立的短距离连接进行数据传输。例如,移动终端可开启蓝牙通信功能,与周围其他开启蓝牙通信功能的终端进行配对,配对成功后,可与其他终端建立蓝牙连接。Short-distance connection refers to the connection established by short-range wireless transmission technology, and short-range wireless transmission can communicate within a preset distance, which may be 10 meters, 20 meters, and the like. Optionally, the short-range wireless transmission may be one of Bluetooth (BLUETOOTH), infrared or Near Field Communication (NFC), etc., but is not limited thereto. The mobile terminal can establish a short-distance connection with other terminal devices and perform data transmission through the established short-distance connection. For example, the mobile terminal can enable the Bluetooth communication function to pair with other terminals that open the Bluetooth communication function, and after the pairing is successful, the Bluetooth connection can be established with other terminals.
移动终端与其他终端建立短距离连接后,可获取在后台运行的注册该距离连接通知的注册进程。可选地,当移动终端检测到与其他终端建立短距离连接时,移动终端可确定连接的短距离无线传输的类型,并获取与该短距离无线传输的类型对应的注册进程信息。不同类型的短距离无线传输可对应不同的注册进程信息,注册进程信息可包括注册了对应类型的短距离无线传输服务的进程的标识、名称、注册时间等信息,其中,进程的标识可以由数字、字母或符号等中的一种或多种组成。可选地,进程可对需要使用的短距离无线传输服务进行注册。注册短距离无线传输服务成功后,进程可接收该短距离无线传输服务的通知,并可使用该短距离无线传输服务。短距离无线传输服务的通知可包括但不限于建立短距离连接、断开短距离连接等。例如,进程注册了蓝牙服务,注册成功后,该进程可接收到蓝牙的通知并可使用蓝牙进行数据传输等。不同类型的短距离无线传输的注册进程信息可记录在不同的注册表中,移动终端可根据连接的短距离无线传输的类型从对应的注册表中读取注册进程信息。After the mobile terminal establishes a short-distance connection with other terminals, the registration process of registering the distance connection notification running in the background can be obtained. Alternatively, when the mobile terminal detects that a short-distance connection is established with other terminals, the mobile terminal may determine the type of short-range wireless transmission of the connection and acquire registration process information corresponding to the type of the short-range wireless transmission. Different types of short-range wireless transmissions may correspond to different registration process information, and the registration process information may include information such as an identifier, a name, a registration time, and the like of a process of registering a short-range wireless transmission service of a corresponding type, wherein the identifier of the process may be represented by a number. One or more of letters, symbols, and the like. Alternatively, the process can register for short-range wireless transmission services that need to be used. After the registration of the short-range wireless transmission service is successful, the process can receive the notification of the short-range wireless transmission service and can use the short-range wireless transmission service. The notification of the short-range wireless transmission service may include, but is not limited to, establishing a short-distance connection, disconnecting a short-distance connection, and the like. For example, the process registers with the Bluetooth service. After successful registration, the process can receive notifications of Bluetooth and can use Bluetooth for data transmission. The registration process information of different types of short-range wireless transmissions may be recorded in different registries, and the mobile terminal may read the registration process information from the corresponding registry according to the type of short-range wireless transmission of the connection.
移动终端可根据与该短距离连接对应的注册进程信息获取注册了建立的短距离连接通知的各个注册进程,并从中获取当前在后台运行的注册进程。在一个实施例中,移动终端也可通过活动管理器的RunningAppProcessInfo类获取正在运行的所有进程列表,所有进程列表中可包括当前正在运行的各个进程,以及每个进程的运行状态,其中,运行状态可包括前台运行、后台运行等。移动终端可根据注册进程信息中包含的进程的标识在运行的所有进程列表中进行查询,获取正在后台运行的注册进程。The mobile terminal may acquire, according to the registration process information corresponding to the short-distance connection, each registration process registered with the established short-distance connection notification, and obtain a registration process currently running in the background. In an embodiment, the mobile terminal can also obtain a list of all running processes through the activity manager's RunningAppProcessInfo class, and all process lists can include each running process and the running status of each process, wherein the running state It can include foreground running, background running, and so on. The mobile terminal can query in the list of all processes running according to the identifier of the process included in the registration process information, and obtain the registration process running in the background.
操作320,当检测到前台进程正在执行预设的安全操作时,确定注册进程的状态。 Operation 320, determining the status of the registration process when it is detected that the foreground process is performing a preset security operation.
移动终端与其他终端建立短距离连接后,可对前台运行的前台进程进行监控,移动终端可以采集前台进程执行的操作信息,其中,操作信息可包括操作类型、操作内容、操作时间等。移动终端可根据前台进程执行的操作信息判断前台进程是否在执行预设的安全操 作,其中,预设的安全操作指的是安全级别高的操作,比如支付操作、转账操作等,但不限于此,安全操作可根据实际需求进行设定。当检测到前台进程正在执行预设的安全操作时,移动终端可确定后台运行的各个注册进程的状态。可选地,注册进程的状态可包括冻结状态及非冻结状态,其中,冻结状态指的是进程无法使用CPU、I/O及网络等资源,处于无法继续运行的状态,但是该进程依然会占据内存资源、硬盘资源等;非冻结状态指的是进程可使用CPU、I/O、内存及网络等系统资源,处于可运行执行任务的状态。After the mobile terminal establishes a short-distance connection with other terminals, the foreground process running in the foreground can be monitored, and the mobile terminal can collect operation information executed by the foreground process, where the operation information can include operation type, operation content, operation time, and the like. The mobile terminal may determine, according to the operation information executed by the foreground process, whether the foreground process is performing a preset security operation, where the preset security operation refers to a security level operation, such as a payment operation, a transfer operation, etc., but is not limited thereto. Safety operations can be set according to actual needs. When it is detected that the foreground process is performing a preset security operation, the mobile terminal can determine the status of each registration process running in the background. Optionally, the status of the registration process may include a frozen state and a non-freeze state, wherein the frozen state refers to a process incapable of using resources such as CPU, I/O, and network, and is in a state incapable of continuing to run, but the process still occupies Memory resources, hard disk resources, etc.; non-freeze state means that the process can use system resources such as CPU, I/O, memory, and network, and is in a state where it can run execution tasks.
在一个实施例中,移动终端可获取后台运行的各个注册进程的状态标签,并根据状态标签确定注册进程的状态。不同的状态可用不同的状态标签进行表示,例如,冻结状态对应的状态标签为0,非冻结状态对应的状态标签为1等,但不限于此。可选地,移动终端也可分别向后台运行的各个注册进程发送通信信号,并检测是否在预定时间段内接收到响应信号。当没有在预定时间段内接收到注册进程返回的响应信号时,移动终端可确定没有发送响应信号的注册进程的状态为冻结状态。当在预定时间段内接收到注册进程返回的响应信号时,移动终端可确定发送响应信号的注册进程的状态为非冻结状态。可以理解地,移动终端也可采用其他方式确定后台运行的各个注册进程的状态,并不仅限于上述几种方式。In one embodiment, the mobile terminal can obtain status tags for various registration processes running in the background and determine the status of the registration process based on the status tags. Different states may be represented by different status tags. For example, the status tag corresponding to the frozen state is 0, and the status tag corresponding to the non-freeze state is 1, etc., but is not limited thereto. Optionally, the mobile terminal may also send a communication signal to each registration process running in the background, respectively, and detect whether a response signal is received within a predetermined time period. When the response signal returned by the registration process is not received within the predetermined time period, the mobile terminal may determine that the state of the registration process that did not transmit the response signal is a frozen state. When receiving the response signal returned by the registration process within the predetermined time period, the mobile terminal may determine that the state of the registration process transmitting the response signal is a non-freeze state. It can be understood that the mobile terminal can also determine the status of each registration process running in the background in other manners, and is not limited to the above manners.
操作330,当注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。 Operation 330, when the registration process is in a non-freeze state, freezes the registration process in an unfrozen state.
当后台运行的注册进程处于非冻结状态时,移动终端可将处于非冻结状态的注册进程进行冻结。注册进程进行冻结后,将无法再继续运行,无法使用CPU、I/O及网络等资源。冻结的注册进程不能接收注册的短距离无线传输服务发送的通知,也不能再使用注册的短距离无线传输服务进行数据传输。When the registration process running in the background is in a non-freeze state, the mobile terminal can freeze the registration process in an unfrozen state. After the registration process is frozen, it will no longer continue to run, and resources such as CPU, I/O, and network cannot be used. The frozen registration process cannot receive notifications sent by the registered short-range wireless transmission service, and can no longer use the registered short-range wireless transmission service for data transmission.
在一个实施例中,移动终端可逐一检测后台运行的各个注册进程是否正在使用建立的短距离连接进行数据传输,并获取当前正在使用该短距离连接进行数据传输的注册进程。可选地,移动终端可检测后台运行的各个注册进程是否调用与建立的短距离连接对应的传输接口,从而确定正在使用该短距离连接进行数据传输的注册进程。移动终端可仅对正在进行数据传输的注册进程进行冻结,对于其他在后台运行但是不进行数据传输的注册进程可不进行冻结,正常进行运行执行任务。可以在提高通过短距离连接进行数据传输时的安全性的同时,保证系统正常响应,减少因进程被冻结造成无法响应的情况。In one embodiment, the mobile terminal may detect one by one whether each registration process running in the background is using the established short-distance connection for data transmission, and acquire a registration process that is currently using the short-distance connection for data transmission. Optionally, the mobile terminal may detect whether each registration process running in the background invokes a transmission interface corresponding to the established short-distance connection, thereby determining a registration process that is using the short-distance connection for data transmission. The mobile terminal can freeze only the registration process that is performing data transmission. For other registration processes that run in the background but do not perform data transmission, the registration process may not be frozen, and the execution task is normally performed. It can improve the security of data transmission over short-distance connections, ensure the system responds normally, and reduce the situation that the process is frozen and cannot respond.
在一个实施例中,当移动终端检测到前台进程结束执行的安全操作时,可对冻结的注册进程进行解冻,可选地,若前台进程结束执行的安全操作,移动终端可继续采集前台进程的操作信息,若前台进程在预设时间段内没有执行新的预设的安全操作,则可对冻结的注册进程进行解冻。注册进程从冻结状态解冻后,可以使用CPU、I/O、内存及网络等系统资源,可正常进行运行并执行任务。解冻后的注册进程可重新正常接收注册的短距离无线传输服务的通知,也可正常使用短距离无线传输服务进行数据传输等。In an embodiment, when the mobile terminal detects that the foreground process ends the security operation, the frozen registration process may be thawed. Alternatively, if the foreground process ends the security operation performed, the mobile terminal may continue to collect the foreground process. Operation information, if the foreground process does not perform a new preset security operation within a preset time period, the frozen registration process may be thawed. After the registration process is thawed from the frozen state, you can use system resources such as CPU, I/O, memory, and network to run normally and perform tasks. The thawing registration process can normally receive the notification of the registered short-range wireless transmission service, and can also normally use the short-range wireless transmission service for data transmission.
在本实施例中,当检测到移动终端与其他终端建立短距离连接时,移动终端可以获取在后台运行的注册短距离连接通知的注册进程,当检测到前台进程正在执行预设的安全操作时,移动终端可对处于非冻结状态的注册进程进行冻结,可以防止在通过短距离连接进行数据传输时造成信息泄露,可以提高短距离无线传输的安全性。In this embodiment, when detecting that the mobile terminal establishes a short-distance connection with other terminals, the mobile terminal may acquire a registration process of the registered short-distance connection notification running in the background, when detecting that the foreground process is performing the preset security operation. The mobile terminal can freeze the registration process in the non-freeze state, which can prevent information leakage when data transmission through the short-distance connection, and can improve the security of short-distance wireless transmission.
如图4所示,在一个实施例中,在操作330若注册进程处于非冻结状态,则对处于非冻结状态的注册进程进行冻结之后,还包括以下操作:As shown in FIG. 4, in an embodiment, after the registration process is in a non-freeze state in operation 330, after the registration process in the non-freeze state is frozen, the following operations are also included:
操作402,获取在后台运行的与冻结的注册进程具备通信机制的进程。 Operation 402, obtaining a process running in the background and having a communication mechanism with the frozen registration process.
当前台进程正在执行预设的安全操作时,移动终端对后台运行的处于非冻结状态的注册进程进行冻结后,移动终端可获取在后台运行的与冻结的注册进程具备通信机制的进程,其中,通信机制指的是在不同的进程之间进行传播或交换信息。After the current station process is performing the preset security operation, after the mobile terminal freezes the registration process that is running in the non-freeze state in the background, the mobile terminal may acquire a process that has a communication mechanism with the frozen registration process running in the background, where Communication mechanisms refer to the propagation or exchange of information between different processes.
可选地,通信机制可包括socket、binder、共享内存等,其中,网络上的两个程序通过一个双向的通信连接实现数据的交换,这个连接的一端称为一个socket;binder是 一种进程间通信机制,提供远程过程调用功能;共享内存就是允许两个不相关的进程访问同一个逻辑内存,共享内存是在两个正在运行的进程之间共享和传递数据的一种非常有效的方式,不同进程之间共享的内存通常安排为同一段物理内存。可选地,移动终端可检测是否存在与冻结的注册进程具有socket和binder通信中的至少一种的进程,并将与冻结的注册进程具有socket和binder通信中的至少一种的进程确定为具备通信机制的进程。移动终端还可检测是否存在与冻结的注册进程进行内存共享的进程,并将与冻结的注册进程进行内存共享的进程确定为具备通信机制的进程。Optionally, the communication mechanism may include a socket, a binder, a shared memory, etc., wherein two programs on the network exchange data through a two-way communication connection, one end of the connection is called a socket; the binder is an interprocess Communication mechanism, providing remote procedure call function; shared memory is to allow two unrelated processes to access the same logical memory, shared memory is a very effective way to share and transfer data between two running processes, different The memory shared between processes is usually arranged in the same piece of physical memory. Optionally, the mobile terminal may detect whether there is a process that has at least one of socket and binder communication with the frozen registration process, and determine that the process with at least one of socket and binder communication with the frozen registration process is determined to have The process of the communication mechanism. The mobile terminal can also detect whether there is a process for memory sharing with the frozen registration process, and determine a process that performs memory sharing with the frozen registration process as a process having a communication mechanism.
操作404,对具备通信机制的进程进行冻结。 Operation 404 freezes the process with the communication mechanism.
移动终端获取在后台运行的与冻结的注册进程具备通信机制的进程后,可获取各个具备通信机制的进程的状态。当具备通信机制的进程处于非冻结状态时,移动终端可对该具备通信机制的进程进行冻结。具备通信机制的进程被冻结后,将无法再继续运行,无法使用CPU、I/O及网络等资源。After the mobile terminal acquires a process running in the background and has a communication mechanism with the frozen registration process, the state of each process having the communication mechanism can be acquired. When the process with the communication mechanism is in a non-freeze state, the mobile terminal can freeze the process with the communication mechanism. After the process with the communication mechanism is frozen, it will no longer be able to continue running, and resources such as CPU, I/O, and network cannot be used.
在一个实施例中,当移动终端检测到前台进程结束执行的安全操作时,移动终端对冻结的注册进程进行解冻,可同时对冻结的与该注册进程具备通信机制的进程进行解冻。具备通信机制的进程进行解冻后,该具备通信机制的进程可正常与解冻的注册进程进行通信。In an embodiment, when the mobile terminal detects a security operation in which the foreground process ends execution, the mobile terminal unfreezes the frozen registration process, and simultaneously freezes the frozen process having the communication mechanism with the registration process. After the process with the communication mechanism is thawed, the process with the communication mechanism can normally communicate with the thawed registration process.
在本实施例中,移动终端可将与冻结的注册进程具备通信机制的进程进行冻结,可以防止冻结的注册进程被唤醒,造成信息泄露,进一步提高短距离无线传输的安全性。In this embodiment, the mobile terminal may freeze the process with the communication mechanism of the frozen registration process, thereby preventing the frozen registration process from being woken up, causing information leakage, and further improving the security of short-range wireless transmission.
如图5所示,在一个实施例中,在操作获取在后台运行的注册短距离连接通知的注册进程之后,还包括以下操作:As shown in FIG. 5, in one embodiment, after the operation of acquiring the registration short-distance connection notification running in the background, the following operations are also included:
操作502,获取注册进程的运行特征。 Operation 502, obtaining an operational characteristic of the registration process.
移动终端获取在后台运行的各个注册进程后,可获取各个注册进程的运行特征。运行特征可包括但不限于注册进程当前执行的任务、与其他进程的通信事件、当前占用的资源类型及比例等。After the mobile terminal acquires each registration process running in the background, the running characteristics of each registration process can be obtained. The operational characteristics may include, but are not limited to, tasks currently performed by the registration process, communication events with other processes, current resource types and ratios, and the like.
操作504,根据运行特征确定注册进程的资源限制等级。 Operation 504, determining a resource restriction level of the registration process according to the operational characteristics.
移动终端可对注册进程的运行特征进行分析,并根据运行特征确定注册进程的资源限制等级。可选地,移动终端可根据实际需求设定不同的资源限制等级,资源限制等级可用于表示使用资源被限制的程度,资源限制等级越高,受限制的程度可越大。受限制的资源可包括但不限于CPU资源、内存资源、I/O资源、网络资源等。不同的资源限制等级可对应不同的资源使用优先级,资源限制等级越高,对应的资源使用优先级可越小,资源限制等级越低,对应的资源使用优先级可越大。The mobile terminal can analyze the running characteristics of the registration process and determine the resource restriction level of the registration process according to the running characteristics. Optionally, the mobile terminal may set different resource restriction levels according to actual requirements. The resource restriction level may be used to indicate the extent to which the used resources are restricted. The higher the resource restriction level, the greater the degree of restriction. Restricted resources may include, but are not limited to, CPU resources, memory resources, I/O resources, network resources, and the like. Different resource restriction levels may correspond to different resource usage priorities. The higher the resource restriction level, the smaller the corresponding resource usage priority, and the lower the resource restriction level, the greater the corresponding resource usage priority.
在一个实施例中,移动终端设定的资源限制等级可包括无限制级别、普通限制级别、深度限制级别及冻结级别。无限制级别可指的是进程使用的资源不受限制。普通限制级别可指的是进程可使用较少的资源,比如最多仅可使用50%的资源等,但不限于此。深度限制级别可指的是进程可使用极少的资源,比如最多仅可使用20%的资源等,但不限于此。冻结级别指的是进程无法使用任何的资源,停止进程的一切行为。比如,当注册进程使用建立的短距离连接进行数据传输时,则可对应无限制级别;当注册进程未使用短距离无线传输服务,仅与其他进行短距离无线数据传输的注册进程进行通信时,则可对应普通限制级别;当注册进程未使用短距离无线传输服务,且仅与其他不进行短距离无线数据传输的进程进行通信时,则可对应深度资源限制级别等;当注册进程既未使用短距离无线传输服务,也不与其他进程进行通信时,则可对应冻结级别等,但不限于此。In an embodiment, the resource restriction level set by the mobile terminal may include an unrestricted level, a normal restriction level, a depth restriction level, and a freeze level. An unrestricted level can mean that resources used by a process are not restricted. The normal restriction level may refer to a process that can use fewer resources, such as up to 50% of resources, but is not limited thereto. The depth limit level can mean that the process can use very few resources, such as up to 20% of resources, but not limited to this. The freeze level refers to the process that cannot use any resources to stop all actions of the process. For example, when the registration process uses the established short-distance connection for data transmission, it can correspond to an unrestricted level; when the registration process does not use the short-range wireless transmission service, and only communicates with other registration processes that perform short-range wireless data transmission, It can correspond to the normal restriction level; when the registration process does not use the short-range wireless transmission service, and only communicates with other processes that do not perform short-range wireless data transmission, it can correspond to the depth resource restriction level, etc.; when the registration process is not used When the short-range wireless transmission service does not communicate with other processes, it can correspond to the freeze level, etc., but is not limited thereto.
操作506,将注册进程分配到与资源限制等级对应的资源组别中,并配置与资源限制等级对应的资源使用优先级。In operation 506, the registration process is allocated to the resource group corresponding to the resource restriction level, and the resource usage priority corresponding to the resource restriction level is configured.
移动终端确定注册进程的资源限制等级后,可将注册进程分配到与确定的资源限制等级对应的资源组别中,并配置与资源限制等级对应的资源使用优先级。可选地,移动终端 可基于内核Cgroup(control group)机制划分不同的资源组别,并可采用文件节点写配置的方式设置各个资源组别的资源使用优先级,对被分配到各个资源组别中的进程使用资源的时间或比例等进行管理,其中,Cgroup是内核中提供的一种可以限制、记录、隔离进程所使用的物理资源(比如:CPU、内存、I/O等资源)的机制。移动终端可加载Cgroup的配置文件,配置文件中可记录有划分的资源组别、各个资源组的资源使用优先级及与资源使用优先级对应的资源调度策略。资源调度策略可包括但不限于被分配到资源组别中的进程使用资源的时间、占用资源比例、使用的资源标识等,例如,可配置普通限制级别对应的资源组别的进程在1分钟内可使用30秒的CPU资源,且普通限制级别对应的资源组别的进程仅能使用编号为X的CPU资源等,但不限于此。当需要添加新的资源组别,或是修改资源组别的资源使用优先级及资源调度策略时,移动终端可通过修改Cgroup的配置文件。After the mobile terminal determines the resource restriction level of the registration process, the registration process may be allocated to the resource group corresponding to the determined resource restriction level, and the resource usage priority corresponding to the resource restriction level may be configured. Optionally, the mobile terminal may divide different resource groups based on a kernel Cgroup (control group) mechanism, and set a resource usage priority of each resource group by using a file node write configuration manner, and is allocated to each resource group. The process in the process is managed by the time or proportion of the resource. The Cgroup is a mechanism provided in the kernel that can limit, record, and isolate the physical resources used by the process (such as CPU, memory, I/O, etc.). . The mobile terminal can load a Cgroup configuration file, and the configuration file can record the divided resource groups, the resource usage priorities of the resource groups, and the resource scheduling policies corresponding to the resource usage priorities. The resource scheduling policy may include, but is not limited to, the time allocated by the process allocated to the resource group, the proportion of occupied resources, the resource identifier used, and the like. For example, the process of configuring the resource group corresponding to the common restriction level is within 1 minute. The CPU resource of 30 seconds can be used, and the process of the resource group corresponding to the common restriction level can only use the CPU resource numbered X, but is not limited thereto. When it is necessary to add a new resource group or modify the resource usage priority and resource scheduling policy of the resource group, the mobile terminal can modify the configuration file of the Cgroup.
移动终端将注册进程分配到与资源限制等级对应的资源组别中,并配置与资源限制等级对应的资源使用优先级后,注册进程可按照该资源组别对应的资源调度策略使用CPU、内存、I/O及网络等资源。在一个实施例中,移动终端可每隔一定时间段获取注册当前短距离连接通知的各个注册进程的运行特征,并根据运行特征确定注册进程的资源限制等级。注册进程的资源限制等级可随着运行特征的变化而进行改变。比如,注册进程结束短距离无线数据传输后,移动终端可提高该注册进程的资源限制等级,降低该注册进程的资源使用优先级;注册进程开始使用短距离连接进行数据传输后,移动终端可降低该注册进程的资源限制等级,提高该注册进程的资源使用优先级等,但不限于此。After the mobile terminal allocates the registration process to the resource group corresponding to the resource restriction level and configures the resource usage priority corresponding to the resource restriction level, the registration process may use the CPU, the memory, and the resource scheduling policy corresponding to the resource group. Resources such as I/O and network. In an embodiment, the mobile terminal may acquire the running characteristics of each registration process that registers the current short-distance connection notification at regular intervals, and determine the resource restriction level of the registration process according to the running characteristics. The resource restriction level of the registration process can change as the operational characteristics change. For example, after the registration process ends short-range wireless data transmission, the mobile terminal can increase the resource restriction level of the registration process and reduce the resource usage priority of the registration process; after the registration process starts using the short-distance connection for data transmission, the mobile terminal can be reduced. The resource restriction level of the registration process, the resource usage priority of the registration process, etc., but is not limited thereto.
可选地,当移动终端检测到前台进程正在执行预设的安全操作时,移动终端可对后台运行中处于非冻结状态的注册进程进行冻结,可将处于非冻结状态的注册进程添加到与冻结级别对应的资源组别中,并配置与该资源组别对应的资源使用优先级。Optionally, when the mobile terminal detects that the foreground process is performing the preset security operation, the mobile terminal may freeze the registration process in the non-freeze state in the background running, and may add and freeze the registration process in the non-freeze state. The resource group corresponding to the level is configured with the resource usage priority corresponding to the resource group.
图6为一个实施例中资源组别的示意图。如图6所示,移动终端中可设定有四个不同的资源限制等级,并划分有四个资源组别,其中,第一资源组别对应无限制级别,第二资源组别对应普通限制级别,第三资源组别对应深度限制级别,第四资源组别对应冻结级别。四个资源组别可分别对应不同的资源使用优先级,第一资源组别的资源使用优先级可高于第二资源组别,第二资源组别的资源使用优先级可高于第三资源组别,第三资源组别的资源使用优先级可高于第四资源组别。无限制级别的第一资源组别不限制进程使用的CPU、内存、I/O及网络等资源。普通限制级别的第二资源组别限制进程可使用较少的CPU、内存、I/O及网络等资源。深度限制级别的第三资源组别限制进程可使用极少的CPU、内存、I/O及网络等资源。冻结级别的第四资源组别限制进程不可使用CPU、内存、I/O及网络等资源。移动终端根据注册进程的运行特征确定资源限制等级,并将该注册进程添加到相应的资源组别中配置与资源组别对应的资源使用优先级,对注册进程使用的资源进行管理。Figure 6 is a schematic diagram of a resource group in one embodiment. As shown in FIG. 6, four different resource restriction levels can be set in the mobile terminal, and four resource groups are divided, wherein the first resource group corresponds to an unrestricted level, and the second resource group corresponds to an ordinary limit. Level, the third resource group corresponds to the depth limit level, and the fourth resource group corresponds to the freeze level. The four resource groups may respectively correspond to different resource usage priorities, the resource usage priority of the first resource group may be higher than the second resource group, and the resource usage priority of the second resource group may be higher than the third resource. In the group, the resource usage priority of the third resource group may be higher than the fourth resource group. The first resource group at an unrestricted level does not limit resources such as CPU, memory, I/O, and network used by the process. The second resource group restriction process of the normal restriction level can use less resources such as CPU, memory, I/O, and network. The third resource group limit process at the depth limit level uses very few resources such as CPU, memory, I/O, and network. The fourth resource group restriction process at the freeze level cannot use resources such as CPU, memory, I/O, and network. The mobile terminal determines the resource restriction level according to the running characteristics of the registration process, and adds the registration process to the corresponding resource group to configure the resource usage priority corresponding to the resource group, and manages the resources used by the registration process.
在本实施例中,移动终端可根据注册进程的运行特征确定资源限制级别,对注册进程动态实现不同等级的资源限制,优化系统性能,节省功耗。In this embodiment, the mobile terminal may determine the resource restriction level according to the running characteristics of the registration process, dynamically implement different levels of resource restrictions on the registration process, optimize system performance, and save power consumption.
如图7所示,在一个实施例中,上述信息处理方法,还包括以下操作:As shown in FIG. 7, in an embodiment, the foregoing information processing method further includes the following operations:
操作702,通过内核空间采集注册进程的运行特征,并将运行特征打包成数据包传送给用户空间。At operation 702, the running characteristics of the registration process are collected through the kernel space, and the running features are packaged into data packets and transmitted to the user space.
移动终端的虚拟空间中可包括有内核空间及用户空间,内核空间可用于存放内核的代码和数据,用户空间可用于存放应用程序的代码和数据。内核空间拥有较高的特权级别,在内核空间中运行的进程可拥有访问移动终端的所有硬件的权限,用户空间的权限则较低,在用户空间中运行的进程仅可使用系统的部分资源。The virtual space of the mobile terminal may include kernel space and user space, the kernel space may be used to store the code and data of the kernel, and the user space may be used to store the code and data of the application. Kernel space has a high privilege level. Processes running in kernel space can have access to all hardware of the mobile terminal. User space has lower permissions. Processes running in user space can only use some resources of the system.
移动终端可通过内核空间采集后台运行的各个注册进程的事件数据,事件数据可包括但不限于事件类型、事件时间、事件内容、事件所属的目标标识等。事件类型可包括但不 限于通信事件、创建事件、退出事件、更改标识事件、任务事件等。通信事件可包括binder通信事件及socket通信事件等。创建事件可指的是进程或线程等被创建的事件。退出事件指的是应用、进程或线程等退出的事件。更改标识事件可指的是进程或线程等更改自身的标识等。任务事件可指的是应用、进程或线程等执行的任务等。The mobile terminal can collect event data of each registration process running in the background through the kernel space, and the event data can include, but is not limited to, an event type, an event time, an event content, a target identifier to which the event belongs, and the like. Event types can include, but are not limited to, communication events, create events, exit events, change identification events, task events, and the like. Communication events may include binder communication events and socket communication events. Creating an event can refer to an event created by a process or thread. An exit event refers to an event that is exited by an application, process, or thread. A change identification event can refer to a process or a thread that changes its own identity, and the like. A task event can refer to a task, such as an application, a process, or a thread.
可选地,移动终端针对不同的注册进程,可采集不同事件类型的事件数据。移动终端可预先制定采集的事件类型及对应的进程标识,例如,可预先制定采集binder通信事件进程等,也可预先制定采集socket通信事件的应用或进程等。不同事件类型可分别对应不同的进程标识。Optionally, the mobile terminal may collect event data of different event types for different registration processes. The mobile terminal may pre-determine the type of the event to be collected and the corresponding process identifier. For example, the process of collecting the binder communication event may be pre-determined, or the application or process for collecting the socket communication event may be pre-defined. Different event types can correspond to different process identifiers.
移动终端通过内核空间采集各个注册进程的事件数据,可从事件数据中提取各个注册进程的运行特征,并可按照约定的包格式将运行特征打包成数据包传送给用户空间。可选地,内核空间与用户空间可采用异步的netlink的方式进行通信,netlink是一种可以实现用户进程与内核进程通信的一种特殊的进程间通信。内核空间通过异步通信的方式将各个注册进程的运行特征传输给用户空间,相比起用户空间主动查询的方式,更加快捷方便,可提高运行特征的传输效率。The mobile terminal collects event data of each registration process through the kernel space, extracts running characteristics of each registration process from the event data, and packages the running characteristics into data packets and transmits the data to the user space according to the agreed packet format. Optionally, the kernel space and the user space can communicate by means of an asynchronous netlink, which is a special inter-process communication that enables the user process to communicate with the kernel process. The kernel space transmits the running characteristics of each registration process to the user space through asynchronous communication, which is faster and more convenient than the active query mode of the user space, and can improve the transmission efficiency of the running features.
操作704,通过用户空间解析数据包,得到注册进程的运行特征。 Operation 704, parsing the data packet through the user space, and obtaining an operation feature of the registration process.
操作706,通过用户空间对运行特征进行分析,确定注册进程的资源限制等级。 Operation 706, analyzing the running characteristics through the user space, and determining a resource restriction level of the registration process.
用户空间接收到内核空间传输的数据包后,可对数据包进行解析,得到各个注册进程的运行特征。移动终端可通过用户空间对各个注册进程的运行特征进行分析,确定各个注册进程的资源限制等级。After the user space receives the data packet transmitted by the kernel space, the data packet can be parsed to obtain the running characteristics of each registration process. The mobile terminal can analyze the running characteristics of each registration process through the user space, and determine the resource restriction level of each registration process.
在本实施例中,移动终端可通过内核空间采集后台运行的各个注册进程的运行特征,并将采集的运行特征传输至用户空间进行分析,移动终端可提供更多确定资源限制等级的线索依据,可使注册进程的资源限制等级调整更加准确,提高资源管理效果及系统性能。In this embodiment, the mobile terminal can collect the running features of each registration process running in the background through the kernel space, and transmit the collected running features to the user space for analysis, and the mobile terminal can provide more clues for determining the resource restriction level. It can make the resource restriction level adjustment of the registration process more accurate, improve resource management effect and system performance.
如图8所示,在一个实施例中,上述信息处理方法,还包括以下操作:As shown in FIG. 8, in an embodiment, the information processing method further includes the following operations:
操作802,通过用户空间发送终止信号。 Operation 802, transmitting a termination signal through the user space.
当移动终端需要终止某个正在运行的进程时,可通过用户空间发送终止信号,该终止信号可用于终止进程的运行,使进程退出运行并释放占用的CPU、内存等系统资源。When the mobile terminal needs to terminate a running process, the termination signal can be sent through the user space, and the termination signal can be used to terminate the running of the process, causing the process to exit and release the occupied system resources such as CPU and memory.
操作804,截获终止信号,当终止信号的目标进程处于冻结状态时,则解冻目标进程及目标进程下包含的各个线程。In operation 804, the termination signal is intercepted, and when the target process of the termination signal is in a frozen state, the target process and each thread included in the target process are thawed.
移动终端可截获用户空间发送的终止信号,并判断该终止信号的目标进程是否处于冻结状态。当目标进程不处于冻结状态时,则移动终端可直接将终止信号发送给目标进程,目标进程可对该终止信号进行响应,终止目标进程的运行。当目标状态处于冻结状态时,由于处于冻结状态的进程无法正常接收其他进程发送的信号,因此不会对终止信号进行正常响应。而在传统的方式中,通常要编写两套不同的代码,分别用于终止冻结状态的进程及非冻结状态的进程,给系统的开发及维护造成了较大的障碍。移动终端截取终止信号后,当该终止信号的目标进程处于冻结状态时,则移动终端可先向目标进程发送解冻信号,对目标进程及目标进程下包含的各个线程进行解冻。解冻目标进程及目标进程下包含的所有线程,可防止出现僵尸进程,造成系统资源的浪费,其中,僵尸进程指的是进程虽然已经退出了,但是在系统进程表中还为它保留了一些退出状态的信息,占用进程表项。The mobile terminal intercepts the termination signal sent by the user space and determines whether the target process of the termination signal is in a frozen state. When the target process is not in the frozen state, the mobile terminal can directly send the termination signal to the target process, and the target process can respond to the termination signal to terminate the operation of the target process. When the target state is in a frozen state, the process that is in the frozen state cannot receive the signal sent by other processes normally, and therefore does not respond normally to the termination signal. In the traditional way, it is usually necessary to write two sets of different codes, which are used to terminate the frozen state process and the non-freeze state process, which poses a major obstacle to the development and maintenance of the system. After the mobile terminal intercepts the termination signal, when the target process of the termination signal is in a frozen state, the mobile terminal may first send a defrosting signal to the target process, and thaw the target process and each thread included in the target process. Unfreezing the target process and all the threads included in the target process can prevent the zombie process from being wasted, causing waste of system resources. The zombie process refers to the fact that although the process has exited, some exits are reserved for it in the system process table. Status information, which occupies the process table entry.
操作806,设置目标进程为不可冻结状态,并将终止信号发送给目标进程,终止信号用于终止目标进程。 Operation 806, setting the target process to a non-freeze state, and sending a termination signal to the target process, and the termination signal is used to terminate the target process.
移动终端解冻目标进程及目标进程下包含的各个线程后,可设置目标进程为不可冻结状态,不可冻结状态指的是无法重新对目标进程进行冻结。移动终端可将终止信号发送给目标进程,由于目标进程此时处于不可冻结状态,则可正常对终止信号进行响应,终止目标进程的运行,使目标进程退出运行并释放占用的CPU、内存等系统资源。After the mobile terminal unfreezes the target process and each thread included in the target process, the target process can be set to a non-frozen state, and the unfrozen state refers to that the target process cannot be frozen again. The mobile terminal can send the termination signal to the target process. Since the target process is in an unfrozen state at this time, the termination signal can be normally responded, the target process is terminated, the target process is exited, and the occupied CPU, memory, and the like are released. Resources.
在本实施例中,移动终端可安全终止处于冻结状态的进程,不会出现如僵尸进程的情 况。此外,用户空间对于冻结状态和非冻结状态的进程终止,均可发送统一的终止信号,无需编写两套不同的代码,可减少系统开发和维护成本。In this embodiment, the mobile terminal can safely terminate the process in the frozen state without the occurrence of a zombie process. In addition, the user space can send a unified termination signal for both the frozen state and the non-freeze state process termination, without having to write two different sets of code, which can reduce system development and maintenance costs.
在一个实施例中,提供一种信息处理方法,包括以下操作:In one embodiment, an information processing method is provided, including the following operations:
操作(1),当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册短距离连接通知的注册进程。Operation (1), when detecting that the mobile terminal establishes a short-distance connection with other terminals, acquires a registration process of the registered short-distance connection notification running in the background.
可选地,在操作(1)之后,还包括:获取注册进程的运行特征;根据运行特征确定注册进程的资源限制等级;将注册进程分配到与资源限制等级对应的资源组别中,并配置与资源限制等级对应的资源使用优先级。Optionally, after the operation (1), the method further includes: acquiring an operation feature of the registration process; determining a resource restriction level of the registration process according to the operation feature; assigning the registration process to the resource group corresponding to the resource restriction level, and configuring The resource usage priority corresponding to the resource restriction level.
可选地,获取注册进程的运行特征,包括:通过内核空间采集注册进程的运行特征,并将运行特征打包成数据包传送给用户空间;通过用户空间解析数据包,得到注册进程的运行特征;根据运行特征确定注册进程的资源限制等级,包括:通过用户空间对运行特征进行分析,确定注册进程的资源限制等级。Optionally, the running feature of the registration process is obtained, including: collecting, by using a kernel space, a running feature of the registration process, and packaging the running feature into a data packet and transmitting the data to the user space; and parsing the data packet through the user space to obtain an operation feature of the registration process; Determining the resource restriction level of the registration process according to the running characteristics, including: analyzing the running characteristics through the user space, and determining the resource restriction level of the registration process.
操作(2),当检测到前台进程正在执行预设的安全操作时,确定注册进程的状态。Operation (2) determines the status of the registration process when it is detected that the foreground process is performing a preset security operation.
操作(3),当注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。Operation (3), when the registration process is in a non-freeze state, the registration process in the non-freeze state is frozen.
可选地,操作(3),包括:获取当前正在使用短距离连接进行数据传输的注册进程,并对进行数据传输的注册进程进行冻结。Optionally, the operation (3) comprises: obtaining a registration process that is currently using a short-distance connection for data transmission, and freezing the registration process for performing data transmission.
可选地,在对进行数据传输的注册进程进行冻结之后,还包括:获取在后台运行的与冻结的注册进程具备通信机制的进程;对具备通信机制的进程进行冻结。Optionally, after the registration process for performing data transmission is frozen, the method further includes: acquiring a process running in the background and having a communication mechanism with the frozen registration process; and freezing the process having the communication mechanism.
可选地,在操作(3)之后,还包括:当前台进程结束安全操作时,对冻结的注册进程进行解冻。Optionally, after the operation (3), the method further includes: unfreezing the frozen registration process when the current station process ends the security operation.
可选地,上述信息处理方法,还包括:通过用户空间发送终止信号;截获终止信号,当终止信号的目标进程处于冻结状态时,则解冻目标进程及目标进程下包含的各个线程;设置目标进程为不可冻结状态,并将终止信号发送给目标进程,终止信号用于终止目标进程。Optionally, the foregoing information processing method further includes: sending a termination signal through the user space; intercepting the termination signal, and when the target process of the termination signal is in a frozen state, thawing the target process and each thread included in the target process; setting the target process The non-freeze state and the termination signal is sent to the target process, and the termination signal is used to terminate the target process.
在本实施例中,当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册短距离连接通知的注册进程,当检测到前台进程正在执行预设的安全操作时,可对处于非冻结状态的注册进程进行冻结,可以防止在通过短距离连接进行数据传输时造成信息泄露,可以提高短距离无线传输的安全性。In this embodiment, when detecting that the mobile terminal establishes a short-distance connection with other terminals, acquiring a registration process of the registered short-distance connection notification running in the background, when detecting that the foreground process is performing a preset security operation, The freezing of the registration process in the non-freeze state prevents information leakage when data transmission over short-distance connections, and improves the security of short-range wireless transmission.
应该理解的是,上述的流程示意图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,上述的流程示意图中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。It should be understood that the operations in the above-described flowcharts are sequentially displayed in accordance with the indication of the arrows, but the operations are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these operations is not strictly limited, and the operations may be performed in other sequences. Moreover, at least a part of the operations in the above flow diagram may include multiple sub-operations or multiple stages, which are not necessarily performed at the same time, but may be executed at different times, and these sub-operations or stages The order of execution is also not necessarily sequential, but may be performed alternately or alternately with at least a portion of the sub-operations or stages of other operations or other operations.
如图9所示,在一个实施例中,提供一种信息处理装置900,包括注册进程获取模块910、状态确定模块920及冻结模块930。As shown in FIG. 9, in an embodiment, an information processing apparatus 900 is provided, including a registration process acquisition module 910, a state determination module 920, and a freeze module 930.
注册进程获取模块910,用于当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册短距离连接通知的注册进程。The registration process obtaining module 910 is configured to acquire a registration process of the registered short-distance connection notification running in the background when detecting that the mobile terminal establishes a short-distance connection with other terminals.
状态确定模块920,用于当检测到前台进程正在执行预设的安全操作时,确定注册进程的状态。The status determining module 920 is configured to determine a status of the registration process when detecting that the foreground process is performing a preset security operation.
冻结模块930,用于当注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。The freezing module 930 is configured to freeze the registration process in the non-freezing state when the registration process is in the non-freeze state.
可选地,冻结模块930,还用于获取当前正在使用短距离连接进行数据传输的注册进 程,并对进行数据传输的注册进程进行冻结。Optionally, the freezing module 930 is further configured to acquire a registration process that is currently using a short-distance connection for data transmission, and freeze the registration process for performing data transmission.
可选地,上述信息处理装置900,还包括解冻模块。Optionally, the information processing apparatus 900 further includes a defrosting module.
解冻模块,用于当前台进程结束安全操作时,对冻结的注册进程进行解冻。The defrosting module is used to unfreeze the frozen registration process when the current process ends the security operation.
在本实施例中,当检测到移动终端与其他终端建立短距离连接时,移动终端可以获取在后台运行的注册短距离连接通知的注册进程,当检测到前台进程正在执行预设的安全操作时,移动终端可对处于非冻结状态的注册进程进行冻结,可以防止在通过短距离连接进行数据传输时造成信息泄露,可以提高短距离无线传输的安全性。In this embodiment, when detecting that the mobile terminal establishes a short-distance connection with other terminals, the mobile terminal may acquire a registration process of the registered short-distance connection notification running in the background, when detecting that the foreground process is performing the preset security operation. The mobile terminal can freeze the registration process in the non-freeze state, which can prevent information leakage when data transmission through the short-distance connection, and can improve the security of short-distance wireless transmission.
在一个实施例中,冻结模块930,还用于获取在后台运行的与冻结的注册进程具备通信机制的进程,并对具备通信机制的进程进行冻结。In one embodiment, the freeze module 930 is further configured to acquire a process running in the background and having a communication mechanism with the frozen registration process, and freeze the process having the communication mechanism.
在本实施例中,可将与冻结的注册进程具备通信机制的进程进行冻结,可以防止冻结的注册进程被唤醒,造成信息泄露,进一步提高短距离无线传输的安全性。In this embodiment, the process with the communication mechanism of the frozen registration process can be frozen, which can prevent the frozen registration process from being woken up, causing information leakage, and further improving the security of short-range wireless transmission.
在一个实施例中,上述信息处理装置900,除了包括注册进程获取模块910、状态确定模块920、冻结模块930及解冻模块,还包括特征获取模块、等级确定模块及配置模块。In one embodiment, the information processing apparatus 900 includes a registration process acquisition module 910, a state determination module 920, a freeze module 930, and a defrosting module, and a feature acquisition module, a level determination module, and a configuration module.
特征获取模块,用于获取注册进程的运行特征。A feature acquisition module is configured to acquire an operation feature of the registration process.
等级确定模块,用于根据运行特征确定注册进程的资源限制等级。A level determining module is configured to determine a resource restriction level of the registration process according to the running characteristics.
配置模块,用于将注册进程分配到与资源限制等级对应的资源组别中,并配置与资源限制等级对应的资源使用优先级。The configuration module is configured to allocate the registration process to the resource group corresponding to the resource restriction level, and configure the resource usage priority corresponding to the resource restriction level.
在本实施例中,可根据注册进程的运行特征确定资源限制级别,对注册进程动态实现不同等级的资源限制,优化系统性能,节省功耗。In this embodiment, the resource restriction level may be determined according to the running characteristics of the registration process, and resource restrictions of different levels may be dynamically implemented for the registration process to optimize system performance and save power consumption.
在一个实施例中,特征获取模块,包括In one embodiment, the feature acquisition module includes
采集单元,用于通过内核空间采集注册进程的运行特征,并将运行特征打包成数据包传送给用户空间。The collecting unit is configured to collect the running characteristics of the registration process through the kernel space, and package the running features into data packets and transmit the data to the user space.
解析单元,用于通过用户空间解析数据包,得到注册进程的运行特征。The parsing unit is configured to parse the data packet through the user space to obtain an operation feature of the registration process.
配置模块,还用于通过用户空间对运行特征进行分析,确定注册进程的资源限制等级。The configuration module is also used to analyze the running characteristics through the user space to determine the resource restriction level of the registration process.
在本实施例中,可通过内核空间采集后台运行的各个注册进程的运行特征,并将采集的运行特征传输至用户空间进行分析,可提供更多确定资源限制等级的线索依据,可使注册进程的资源限制等级调整更加准确,提高资源管理效果及系统性能。In this embodiment, the running characteristics of each registration process running in the background can be collected through the kernel space, and the collected running features are transmitted to the user space for analysis, and more clues for determining the resource restriction level can be provided, so that the registration process can be performed. The resource restriction level adjustment is more accurate, improving resource management effects and system performance.
在一个实施例中,上述信息处理装置900,除了包括注册进程获取模块910、状态确定模块920、冻结模块930、解冻模块、特征获取模块、等级确定模块及配置模块,还包括发送模块及设置模块。In one embodiment, the information processing apparatus 900 includes a registration process acquisition module 910, a state determination module 920, a freeze module 930, a defrosting module, a feature acquisition module, a level determination module, and a configuration module, and includes a sending module and a setting module. .
发送模块,用于通过用户空间发送终止信号。A sending module, configured to send a termination signal through a user space.
解冻模块,还用于截获终止信号,若终止信号的目标进程处于冻结状态,则解冻目标进程及目标进程下包含的各个线程。The thawing module is also used to intercept the termination signal. If the target process of the termination signal is in a frozen state, the target process and each thread included in the target process are thawed.
设置模块,用于设置目标进程为不可冻结状态,并将终止信号发送给目标进程,终止信号用于终止目标进程。A setting module is configured to set the target process to a non-freeze state, and send a termination signal to the target process, and the termination signal is used to terminate the target process.
在本实施例中,可安全终止处于冻结状态的进程,不会出现如僵尸进程的情况。此外,用户空间对于冻结状态和非冻结状态的进程终止,均可发送统一的终止信号,无需编写两套不同的代码,可减少系统开发和维护成本。In this embodiment, the process in the frozen state can be safely terminated without a situation such as a zombie process. In addition, the user space can send a unified termination signal for both the frozen state and the non-freeze state process termination, without having to write two different sets of code, which can reduce system development and maintenance costs.
本申请实施例还提供了一种移动终端。如图10所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该移动终端可以为包括手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)、销售终端(Point of Sales,POS)、车载电脑、穿戴式设备等任意终端设备,以移动终端为手机为例:The embodiment of the present application further provides a mobile terminal. As shown in FIG. 10, for the convenience of description, only the parts related to the embodiments of the present application are shown. For the specific technical details not disclosed, refer to the method part of the embodiment of the present application. The mobile terminal can be any mobile device, a tablet computer, a personal digital assistant (PDA), a point of sale (POS), a car computer, a wearable device, and the like, and the mobile terminal is used as a mobile phone. :
图10为与本申请实施例提供的移动终端相关的手机的部分结构的框图。参考图 10,手机包括:射频(Radio Frequency,RF)电路1010、存储器1020、输入单元1030、显示单元1040、传感器1050、音频电路1060、无线保真(wireless fidelity,WiFi)模块1070、处理器1080、以及电源1090等部件。本领域技术人员可以理解,图10所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 10 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal provided by an embodiment of the present application. Referring to FIG. 10, the mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, and a processor 1080. And power supply 1090 and other components. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 10 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
其中,RF电路1010可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器1080处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1010还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于GSM、GPRS、码分多址(Code Division Multiple Access,CDMA)、W-CDMA、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 1010 can be used for receiving and transmitting signals during the transmission and reception of information or during a call. The downlink information of the base station can be received and processed by the processor 1080. The uplink data can also be sent to the base station. Generally, RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 1010 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to GSM, GPRS, Code Division Multiple Access (CDMA), W-CDMA, Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
存储器1020可用于存储软件程序以及模块,处理器1080通过运行存储在存储器1020的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1020可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器1020可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1020 can be used to store software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.); The data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone. Moreover, memory 1020 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元1030可用于接收输入的数字或字符信息,以及产生与手机1000的用户设置以及功能控制有关的键信号输入。具体地,输入单元1030可包括触控面板1032以及其他输入设备1034。触控面板1032,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1032上或在触控面板1032附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板1032可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1080,并能接收处理器1080发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1032。除了触控面板1032,输入单元1030还可以包括其他输入设备1034。具体地,其他输入设备1034可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 1030 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 1000. Specifically, the input unit 1030 may include a touch panel 1032 and other input devices 1034. The touch panel 1032, which may also be referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 1032 or near the touch panel 1032. Operation) and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 1032 can include two portions of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 1080 is provided and can receive commands from the processor 1080 and execute them. In addition, the touch panel 1032 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1032, the input unit 1030 can also include other input devices 1034. Specifically, other input devices 1034 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
显示单元1040可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1040可包括显示面板1042。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1042。在一个实施例中,触控面板1032可覆盖显示面板1042,当触控面板1032检测到在其上或附近的触摸操作后,传送给处理器1080以确定触摸事件的类型,随后处理器1080根据触摸事件的类型在显示面板1042上提供相应的视觉输出。虽然在图10中,触控面板1032与显示面板1042是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1032与显示面板1042集成而实现手机的输入和输出功能。The display unit 1040 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone. The display unit 1040 can include a display panel 1042. In one embodiment, the display panel 1042 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. In one embodiment, the touch panel 1032 can cover the display panel 1042. When the touch panel 1032 detects a touch operation thereon or nearby, the touch panel 1032 transmits to the processor 1080 to determine the type of the touch event, and then the processor 1080 is The type of touch event provides a corresponding visual output on display panel 1042. Although in FIG. 10, the touch panel 1032 and the display panel 1042 are used as two independent components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 1032 can be integrated with the display panel 1042. Realize the input and output functions of the phone.
手机1000还可包括至少一种传感器1050,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1042的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1042和/或背光。运动传感器可包括加速度传感器,通过加速度 传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The handset 1000 can also include at least one type of sensor 1050, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1042 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1042 and/or when the mobile phone moves to the ear. Or backlight. The motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
音频电路1060、扬声器1062和传声器1064可提供用户与手机之间的音频接口。音频电路1060可将接收到的音频数据转换后的电信号,传输到扬声器1062,由扬声器1062转换为声音信号输出;另一方面,传声器1064将收集的声音信号转换为电信号,由音频电路1060接收后转换为音频数据,再将音频数据输出处理器1080处理后,经RF电路1010可以发送给另一手机,或者将音频数据输出至存储器1020以便后续处理。 Audio circuitry 1060, speaker 1062, and microphone 1064 can provide an audio interface between the user and the handset. The audio circuit 1060 can transmit the converted electrical data of the received audio data to the speaker 1062, and convert it into a sound signal output by the speaker 1062. On the other hand, the microphone 1064 converts the collected sound signal into an electrical signal, and the audio circuit 1060. After receiving, it is converted into audio data, and then processed by the audio data output processor 1080, transmitted to another mobile phone via the RF circuit 1010, or outputted to the memory 1020 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1070可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图10示出了WiFi模块1070,但是可以理解的是,其并不属于手机1000的必须构成,可以根据需要而省略。WiFi is a short-range wireless transmission technology. The mobile phone through the WiFi module 1070 can help users to send and receive e-mail, browse the web and access streaming media, etc. It provides users with wireless broadband Internet access. Although FIG. 10 shows the WiFi module 1070, it can be understood that it does not belong to the essential configuration of the mobile phone 1000 and can be omitted as needed.
处理器1080是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1020内的软件程序和/或模块,以及调用存储在存储器1020内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器1080可包括一个或多个处理单元。在一个实施例中,处理器1080可集成应用处理器和调制解调器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调器主要处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1080中。比如,该处理器1080可集成应用处理器和基带处理器,基带处理器与和其它外围芯片等可组成调制解调器。手机1000还包括给各个部件供电的电源1090(比如电池),优选的,电源可以通过电源管理系统与处理器1080逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The processor 1080 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1020, and invoking data stored in the memory 1020, The phone's various functions and processing data, so that the overall monitoring of the phone. In one embodiment, processor 1080 can include one or more processing units. In one embodiment, the processor 1080 can integrate an application processor and a modem, wherein the application processor primarily processes an operating system, a user interface, an application, etc.; the modem primarily processes wireless communications. It will be appreciated that the above described modem may also not be integrated into the processor 1080. For example, the processor 1080 can integrate an application processor and a baseband processor, and the baseband processor and other peripheral chips can form a modem. The mobile phone 1000 also includes a power source 1090 (such as a battery) for powering various components. Preferably, the power source can be logically coupled to the processor 1080 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
在一个实施例中,手机1000还可以包括摄像头、蓝牙模块等。In one embodiment, the handset 1000 may also include a camera, a Bluetooth module, and the like.
在本申请实施例中,该移动终端所包括的处理器880执行存储在存储器上的计算机程序时实现上述的信息处理方法。In the embodiment of the present application, the processor 880 included in the mobile terminal implements the above information processing method when executing a computer program stored in the memory.
在一个实施例中,该移动终端可包括存储器1020及处理器1080,存储器1020中存储有计算机程序,该计算机程序被处理器1080执行时,使得处理器执行如下操作:In one embodiment, the mobile terminal can include a memory 1020 and a processor 1080. The memory 1020 stores a computer program that, when executed by the processor 1080, causes the processor to perform the following operations:
当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册短距离连接通知的注册进程;Obtaining a registration process of registering a short-distance connection notification running in the background when detecting that the mobile terminal establishes a short-distance connection with other terminals;
当检测到前台进程正在执行预设的安全操作时,确定注册进程的状态;Determining the status of the registration process when it is detected that the foreground process is performing a preset security operation;
若注册进程处于非冻结状态,则对处于非冻结状态的注册进程进行冻结。If the registration process is in a non-frozen state, the registration process that is in an unfrozen state is frozen.
在一个实施例中,提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述的信息处理方法。In one embodiment, a computer readable storage medium is provided having stored thereon a computer program that, when executed by a processor, implements the information processing method described above.
在一个实施例中,提供一种包含计算机程序的计算机程序产品,当其在计算机设备上运行时,使得计算机设备执行时实现上述的信息处理方法。In one embodiment, a computer program product comprising a computer program, when executed on a computer device, causes the computer device to perform the information processing method described above when executed.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a non-volatile computer readable storage medium. Wherein, the program, when executed, may include the flow of an embodiment of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
如此处所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随 机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any reference to a memory, storage, database or other medium as used herein may include non-volatile and/or volatile memory. Suitable non-volatile memories can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which acts as an external cache. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization. Link (Synchlink) DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the claims. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.

Claims (21)

  1. 一种信息处理方法,包括:An information processing method includes:
    当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册所述短距离连接通知的注册进程;When detecting that the mobile terminal establishes a short-distance connection with other terminals, acquiring a registration process of registering the short-distance connection notification running in the background;
    当检测到所述前台进程正在执行预设的安全操作时,确定所述注册进程的状态;及Determining a status of the registration process when detecting that the foreground process is performing a preset security operation; and
    当所述注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。When the registration process is in a non-freeze state, the registration process in the non-freeze state is frozen.
  2. 根据权利要求1所述的方法,其特征在于,所述对处于非冻结状态的注册进程进行冻结,包括:The method of claim 1, wherein the freezing of the registration process in an unfrozen state comprises:
    获取当前正在使用所述短距离连接进行数据传输的注册进程,并对所述进行数据传输的注册进程进行冻结。Obtaining a registration process that is currently using the short-distance connection for data transmission, and freezing the registration process for performing data transmission.
  3. 根据权利要求2所述的方法,其特征在于,在所述对所述进行数据传输的注册进程进行冻结之后,所述方法还包括:The method according to claim 2, wherein after the freezing of the registration process for performing data transmission, the method further comprises:
    获取在后台运行的与冻结的注册进程具备通信机制的进程;及Obtaining a process running in the background that has a communication mechanism with the frozen registration process; and
    对所述具备通信机制的进程进行冻结。The process with the communication mechanism is frozen.
  4. 根据权利要求1至3任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:
    当所述前台进程结束所述安全操作时,对冻结的注册进程进行解冻。When the foreground process ends the security operation, the frozen registration process is thawed.
  5. 根据权利要求1所述的方法,其特征在于,在所述获取在后台运行的注册所述短距离连接通知的注册进程之后,所述方法还包括:The method according to claim 1, wherein after the obtaining the registration process of registering the short-range connection notification running in the background, the method further comprises:
    获取所述注册进程的运行特征;Obtaining an operational characteristic of the registration process;
    根据所述运行特征确定所述注册进程的资源限制等级;及Determining a resource restriction level of the registration process according to the operating characteristic; and
    将所述注册进程分配到与所述资源限制等级对应的资源组别中,并配置与所述资源限制等级对应的资源使用优先级。The registration process is allocated to a resource group corresponding to the resource restriction level, and a resource usage priority corresponding to the resource restriction level is configured.
  6. 根据权利要求5所述的方法,其特征在于,所述获取所述注册进程的运行特征,包括:The method according to claim 5, wherein the obtaining the running characteristics of the registration process comprises:
    通过内核空间采集所述注册进程的运行特征,并将所述运行特征打包成数据包传送给用户空间;Collecting, by the kernel space, an running feature of the registration process, and packaging the running feature into a data packet and transmitting the data to the user space;
    通过所述用户空间解析所述数据包,得到所述注册进程的运行特征;及Parsing the data packet by the user space to obtain an operation characteristic of the registration process; and
    所述根据所述运行特征确定所述注册进程的资源限制等级,包括:Determining, according to the running feature, a resource restriction level of the registration process, including:
    通过所述用户空间对所述运行特征进行分析,确定所述注册进程的资源限制等级。The running feature is analyzed by the user space to determine a resource restriction level of the registration process.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    通过用户空间发送终止信号;Sending a termination signal through user space;
    截获所述终止信号,当所述终止信号的目标进程处于冻结状态时,则解冻所述目标进程及所述目标进程下包含的各个线程;及Intercepting the termination signal, when the target process of the termination signal is in a frozen state, then thawing the target process and each thread included in the target process; and
    设置所述目标进程为不可冻结状态,并将所述终止信号发送给所述目标进程,所述终止信号用于终止所述目标进程。Setting the target process to a non-freeze state, and transmitting the termination signal to the target process, the termination signal is used to terminate the target process.
  8. 一种移动终端,包括存储器及处理器,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行以下操作:A mobile terminal includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following operations:
    当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册所述短距离连接通知的注册进程;When detecting that the mobile terminal establishes a short-distance connection with other terminals, acquiring a registration process of registering the short-distance connection notification running in the background;
    当检测到所述前台进程正在执行预设的安全操作时,确定所述注册进程的状态;及Determining a status of the registration process when detecting that the foreground process is performing a preset security operation; and
    当所述注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。When the registration process is in a non-freeze state, the registration process in the non-freeze state is frozen.
  9. 根据权利要求8所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述对处于非冻结状态的注册进程进行冻结时,还执行以下操作:The mobile terminal according to claim 8, wherein when said computer program is executed by said processor, said processor further executes the following when performing said freezing of a registration process in a non-freeze state operating:
    获取当前正在使用所述短距离连接进行数据传输的注册进程,并对所述进行数据传输 的注册进程进行冻结。Obtaining a registration process that is currently using the short-distance connection for data transmission, and freezing the registration process for performing data transmission.
  10. 根据权利要求9所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述对所述进行数据传输的注册进程进行冻结之后,还执行以下操作:The mobile terminal according to claim 9, wherein when said computer program is executed by said processor, said processor further executes after said executing said registration process for performing data transfer is frozen The following operations:
    获取在后台运行的与冻结的注册进程具备通信机制的进程;及Obtaining a process running in the background that has a communication mechanism with the frozen registration process; and
    对所述具备通信机制的进程进行冻结。The process with the communication mechanism is frozen.
  11. 根据权利要求8至10任一项所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,还执行以下操作:The mobile terminal according to any one of claims 8 to 10, characterized in that, when the computer program is executed by the processor, the following operations are also performed:
    当所述前台进程结束所述安全操作时,对冻结的注册进程进行解冻。When the foreground process ends the security operation, the frozen registration process is thawed.
  12. 根据权利要求8所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述获取在后台运行的注册所述短距离连接通知的注册进程之后,还执行以下操作:A mobile terminal according to claim 8, wherein said computer program is executed by said processor to cause said processor to perform said registration process of registering said short-range connection notification running in the background After that, also do the following:
    获取所述注册进程的运行特征;Obtaining an operational characteristic of the registration process;
    根据所述运行特征确定所述注册进程的资源限制等级;及Determining a resource restriction level of the registration process according to the operating characteristic; and
    将所述注册进程分配到与所述资源限制等级对应的资源组别中,并配置与所述资源限制等级对应的资源使用优先级。The registration process is allocated to a resource group corresponding to the resource restriction level, and a resource usage priority corresponding to the resource restriction level is configured.
  13. 根据权利要求12所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述获取所述注册进程的运行特征时,还执行以下操作:The mobile terminal according to claim 12, wherein when the computer program is executed by the processor, the processor further performs the following operations when performing the acquiring the running feature of the registration process:
    通过内核空间采集所述注册进程的运行特征,并将所述运行特征打包成数据包传送给用户空间;Collecting, by the kernel space, an running feature of the registration process, and packaging the running feature into a data packet and transmitting the data to the user space;
    通过所述用户空间解析所述数据包,得到所述注册进程的运行特征;及Parsing the data packet by the user space to obtain an operation characteristic of the registration process; and
    所述根据所述运行特征确定所述注册进程的资源限制等级,包括:Determining, according to the running feature, a resource restriction level of the registration process, including:
    通过所述用户空间对所述运行特征进行分析,确定所述注册进程的资源限制等级。The running feature is analyzed by the user space to determine a resource restriction level of the registration process.
  14. 根据权利要求8所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,还执行以下操作:The mobile terminal of claim 8, wherein when said computer program is executed by said processor, the following operations are further performed:
    通过用户空间发送终止信号;Sending a termination signal through user space;
    截获所述终止信号,当所述终止信号的目标进程处于冻结状态时,则解冻所述目标进程及所述目标进程下包含的各个线程;及Intercepting the termination signal, when the target process of the termination signal is in a frozen state, then thawing the target process and each thread included in the target process; and
    设置所述目标进程为不可冻结状态,并将所述终止信号发送给所述目标进程,所述终止信号用于终止所述目标进程。Setting the target process to a non-freeze state, and transmitting the termination signal to the target process, the termination signal is used to terminate the target process.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,使得所述处理器执行以下操作:A computer readable storage medium having stored thereon a computer program, wherein when the computer program is executed by a processor, the processor causes the processor to:
    当检测到移动终端与其他终端建立短距离连接时,获取在后台运行的注册所述短距离连接通知的注册进程;When detecting that the mobile terminal establishes a short-distance connection with other terminals, acquiring a registration process of registering the short-distance connection notification running in the background;
    当检测到所述前台进程正在执行预设的安全操作时,确定所述注册进程的状态;及Determining a status of the registration process when detecting that the foreground process is performing a preset security operation; and
    当所述注册进程处于非冻结状态时,则对处于非冻结状态的注册进程进行冻结。When the registration process is in a non-freeze state, the registration process in the non-freeze state is frozen.
  16. 根据权利要求15所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述对处于非冻结状态的注册进程进行冻结时,还执行以下操作:The mobile terminal according to claim 15, wherein when said computer program is executed by said processor, said processor further executes the following when performing said freezing of a registration process in an unfrozen state operating:
    获取当前正在使用所述短距离连接进行数据传输的注册进程,并对所述进行数据传输的注册进程进行冻结。Obtaining a registration process that is currently using the short-distance connection for data transmission, and freezing the registration process for performing data transmission.
  17. 根据权利要求16所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述对所述进行数据传输的注册进程进行冻结之后,还执行以下操作:The mobile terminal of claim 16, wherein when the computer program is executed by the processor, causing the processor to perform after performing the freezing of the registration process for performing data transmission The following operations:
    获取在后台运行的与冻结的注册进程具备通信机制的进程;及Obtaining a process running in the background that has a communication mechanism with the frozen registration process; and
    对所述具备通信机制的进程进行冻结。The process with the communication mechanism is frozen.
  18. 根据权利要求15至17任一项所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,还执行以下操作:The mobile terminal according to any one of claims 15 to 17, wherein when said computer program is executed by said processor, the following operations are further performed:
    当所述前台进程结束所述安全操作时,对冻结的注册进程进行解冻。When the foreground process ends the security operation, the frozen registration process is thawed.
  19. 根据权利要求15所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述获取在后台运行的注册所述短距离连接通知的注册进程之后,还执行以下操作:The mobile terminal according to claim 15, wherein said computer program is executed by said processor to cause said processor to perform said registration process of registering said short-range connection notification running in the background After that, also do the following:
    获取所述注册进程的运行特征;Obtaining an operational characteristic of the registration process;
    根据所述运行特征确定所述注册进程的资源限制等级;及Determining a resource restriction level of the registration process according to the operating characteristic; and
    将所述注册进程分配到与所述资源限制等级对应的资源组别中,并配置与所述资源限制等级对应的资源使用优先级。The registration process is allocated to a resource group corresponding to the resource restriction level, and a resource usage priority corresponding to the resource restriction level is configured.
  20. 根据权利要求19所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器在执行所述获取所述注册进程的运行特征时,还执行以下操作:The mobile terminal according to claim 19, wherein when the computer program is executed by the processor, the processor further performs the following operations when performing the acquiring the running feature of the registration process:
    通过内核空间采集所述注册进程的运行特征,并将所述运行特征打包成数据包传送给用户空间;Collecting, by the kernel space, an running feature of the registration process, and packaging the running feature into a data packet and transmitting the data to the user space;
    通过所述用户空间解析所述数据包,得到所述注册进程的运行特征;及Parsing the data packet by the user space to obtain an operation characteristic of the registration process; and
    所述根据所述运行特征确定所述注册进程的资源限制等级,包括:Determining, according to the running feature, a resource restriction level of the registration process, including:
    通过所述用户空间对所述运行特征进行分析,确定所述注册进程的资源限制等级。The running feature is analyzed by the user space to determine a resource restriction level of the registration process.
  21. 根据权利要求15所述的移动终端,其特征在于,所述计算机程序被所述处理器执行时,还执行以下操作:The mobile terminal of claim 15, wherein when said computer program is executed by said processor, the following operations are further performed:
    通过用户空间发送终止信号;Sending a termination signal through user space;
    截获所述终止信号,当所述终止信号的目标进程处于冻结状态时,则解冻所述目标进程及所述目标进程下包含的各个线程;及Intercepting the termination signal, when the target process of the termination signal is in a frozen state, then thawing the target process and each thread included in the target process; and
    设置所述目标进程为不可冻结状态,并将所述终止信号发送给所述目标进程,所述终止信号用于终止所述目标进程。Setting the target process to a non-freeze state, and transmitting the termination signal to the target process, the termination signal is used to terminate the target process.
PCT/CN2018/116438 2017-12-29 2018-11-20 Information processing method, and mobile terminal and computer-readable storage medium WO2019128538A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711480563.5 2017-12-29
CN201711480563.5A CN109995927B (en) 2017-12-29 2017-12-29 Information processing method and device, mobile terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2019128538A1 true WO2019128538A1 (en) 2019-07-04

Family

ID=67065057

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116438 WO2019128538A1 (en) 2017-12-29 2018-11-20 Information processing method, and mobile terminal and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN109995927B (en)
WO (1) WO2019128538A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094179A (en) * 2021-04-23 2021-07-09 曙光信息产业(北京)有限公司 Job distribution method and device, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101083003A (en) * 2006-05-29 2007-12-05 富士通株式会社 Portable terminal unit
US20130043835A1 (en) * 2011-08-18 2013-02-21 Samsung Electronics Co., Ltd. Apparatus and method for non-contact recharging and near field communication in a portable electronic device
CN103413165A (en) * 2013-08-07 2013-11-27 歌尔声学股份有限公司 Method for controlling NFC label and controlled NFC label

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015135997A (en) * 2014-01-16 2015-07-27 サイレックス・テクノロジー株式会社 Peripheral device server
CN103761149A (en) * 2014-01-27 2014-04-30 深圳市文鼎创数据科技有限公司 Electronic equipment and function switching method thereof
CN107368175B (en) * 2017-07-03 2023-07-04 北京小米移动软件有限公司 Processing method and device for reducing terminal power consumption and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101083003A (en) * 2006-05-29 2007-12-05 富士通株式会社 Portable terminal unit
US20130043835A1 (en) * 2011-08-18 2013-02-21 Samsung Electronics Co., Ltd. Apparatus and method for non-contact recharging and near field communication in a portable electronic device
CN103413165A (en) * 2013-08-07 2013-11-27 歌尔声学股份有限公司 Method for controlling NFC label and controlled NFC label

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094179A (en) * 2021-04-23 2021-07-09 曙光信息产业(北京)有限公司 Job distribution method and device, electronic equipment and readable storage medium
CN113094179B (en) * 2021-04-23 2024-04-19 曙光信息产业(北京)有限公司 Job allocation method, job allocation device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN109995927A (en) 2019-07-09
CN109995927B (en) 2021-02-09

Similar Documents

Publication Publication Date Title
WO2019128540A1 (en) Resource management method, mobile terminal and computer readable storage medium
WO2019137170A1 (en) Information processing method, mobile terminal, and computer readable storage medium
WO2018103484A1 (en) Data processing method, apparatus and system for live broadcast page
KR102399798B1 (en) Adaptive communication method and apparatus
JP6517370B2 (en) Method and terminal for interaction between terminal and network device
WO2019128546A1 (en) Application program processing method, electronic device, and computer readable storage medium
CN113821803B (en) Security architecture system, security management method and computing device
WO2019128571A1 (en) Resource management method and device, mobile terminal, as well as computer readable storage medium
CN108334345B (en) Application processing method and device, readable storage medium and mobile terminal
CN109992965B (en) Process processing method and device, electronic equipment and computer readable storage medium
WO2019128537A1 (en) Application freezing method, and computer device and computer-readable storage medium
CN110032429B (en) Information processing method and device, mobile terminal and computer readable storage medium
WO2019128573A1 (en) Information processing method, apparatus, computer device and computer-readable storage medium
WO2019137173A1 (en) Resource management method, mobile terminal and computer-readable storage medium
WO2019128588A1 (en) Process processing method and apparatus, electronic device, computer readable storage medium
CN104133728A (en) Method and device for communication between processes
WO2019128574A1 (en) Information processing method and device, computer device and computer readable storage medium
CN109992380B (en) Application program processing method and device, electronic equipment and computer readable storage medium
WO2019184631A1 (en) Information processing method and apparatus, computer-readable storage medium, and terminal
WO2019128586A1 (en) Application processing method, electronic device, and computer readable storage medium
WO2019128553A1 (en) Application processing method, electronic device, and computer-readable storage medium
WO2018045874A1 (en) Method for information processing and related product
WO2019128569A1 (en) Method and apparatus for freezing application, and storage medium and terminal
CN109992323B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN109992360B (en) Process processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18894579

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18894579

Country of ref document: EP

Kind code of ref document: A1