Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
Example one
Referring to fig. 1, a flowchart of a method for prompting a user according to an embodiment of the present invention is shown. The method comprises the following steps:
101: monitoring an event for calling acquisition equipment in the terminal;
102: and when the event is monitored, outputting prompt information.
According to the embodiment of the invention, the event calling the acquisition equipment is monitored, and the prompt information is output when the event calling the acquisition equipment is monitored so as to prompt the user that the acquisition equipment starts to work, so that the occurrence of a vicious event that the acquisition equipment is called under the condition that the user is unaware of malicious application to cause privacy leakage of the user is prevented, and the safety of the user is improved.
Example two
Referring to fig. 2, a flowchart of a method for prompting a user according to an embodiment of the present invention is shown. It should be noted that, the embodiment of the present invention is described by taking a mode of prompting a user by starting a prompting device after calling an acquisition device in an Android operating system as an example.
The method comprises the following steps:
201: and monitoring and calling an event of the acquisition equipment in the terminal.
In the Android operating system, when an application or operating system calls a camera or a microphone or other acquisition equipment to acquire images or sound, the operation is performed on a file corresponding to the acquisition equipment on the bottom layer of the Android operating system.
For example: in the file path of the system: the/dev/video 0 (the corresponding file names may be different in different devices, and the file names are not limited herein) files are files corresponding to the cameras. When an application needs to use a camera to take a picture or record a video, a specific API (application programming Interface) in an operating system may be called or a file corresponding to the camera may be directly read. The acquisition equipment in the terminal is called through the two modes, and the actions reflected on the bottom layer of the operating system are all through the API of the bottom layer: the sys _ read () function calls the harvesting device, so monitoring the event of the harvesting device in the calling terminal can be done by monitoring the underlying API: the sys _ read () function completes.
Thus, step 201 is represented in the present embodiment as: and monitoring an event for reading the file corresponding to the acquisition equipment in the operating system.
During the process of monitoring the reading operation of the operating system or the application on the file, the following operation can be performed:
2011: and monitoring an event of reading the file in an operating system of the terminal.
The event of reading the file is an API (application programming interface) at the bottom layer of the operating system: operation of sys _ read (). When the function is called, the file name and the path information of the called file are carried as parameters of the function, so that when an event of reading the file in an operating system is monitored, whether the event is the event of reading the file corresponding to the acquisition device is determined according to the parameters in the function.
2012: and determining whether the file subjected to the reading operation in the event of the reading operation is the file corresponding to the acquisition equipment.
The path information and the file name of the file corresponding to the acquisition equipment in the current terminal are stored in advance.
2013: and if the file subjected to the reading operation in the event of the reading operation is the file corresponding to the acquisition equipment, determining that the event for calling the acquisition equipment is monitored.
Further, this step may be performed during the execution process when the operating system is started, and the execution manner of step 201 is: and monitoring and calling an event of the acquisition equipment in the terminal when an operating system of the terminal is started.
202: and when the event is monitored, outputting prompt information.
Wherein, the mode of terminal output prompt message is through predetermined prompt facility output prompt message, and predetermined prompt facility can be: breathing lights, speakers, motors, etc. may output display effects, sound effects, or vibration effects.
Therefore, the manner of outputting the prompt information through the preset prompting device in step 202 can be as follows:
2021: and starting the breathing lamp in the terminal, and controlling the breathing lamp to display according to a preset display mode.
The preset display mode can be that the long-bright display is carried out according to the preset first time; the breathing lamp can be displayed according to the preset second time, the breathing lamp is turned off after the preset third time, the process is repeated for the preset times, and the breathing lamp is displayed in a flashing mode.
Or,
2022: and starting a loudspeaker in the terminal, and controlling the loudspeaker to play a preset prompt tone.
Or,
2023: and starting a motor in the terminal, and controlling the motor to vibrate according to a preset vibration mode.
The continuous vibration can be carried out according to a preset first time; the motor can also vibrate intermittently according to the preset second time, wait for the preset third time to stop vibrating, and then repeat the preset times to vibrate according to the process.
According to the embodiment of the invention, the event calling the acquisition equipment is monitored, and the prompt information is output when the event calling the acquisition equipment is monitored so as to prompt the user that the acquisition equipment starts to work, so that the occurrence of a vicious event that malicious software calls the acquisition equipment under the condition that the user does not know the malicious software is prevented, the privacy of the user is leaked, and the safety of the user is improved.
EXAMPLE III
Referring to fig. 3, a schematic structural diagram of a device for prompting a user according to an embodiment of the present invention is shown. The device includes:
a monitoring module 301, configured to monitor an event for calling an acquisition device in the terminal;
and the output module 302 is configured to output a prompt message when the event is monitored.
As an embodiment, the monitoring module 301 may be configured to:
and monitoring an event of reading the file corresponding to the acquisition equipment in an operating system of the terminal.
As an embodiment, the monitoring module 301 may include:
a monitoring unit 3011, configured to monitor an event of performing a read operation on a file in an operating system of the terminal;
a determining unit 3012, configured to determine whether a file subjected to a read operation in the event of the read operation is a file corresponding to the acquisition device;
the processing unit 3013 is configured to determine that an event for calling the acquisition device is monitored when a file subjected to a read operation in the event of the read operation is a file corresponding to the acquisition device.
As an embodiment, the monitoring module 301 may further be configured to:
and monitoring and calling an event of the acquisition equipment in the terminal when an operating system of the terminal is started.
As an embodiment, the output module 302 may include:
the first control unit 3021 is configured to start a breathing lamp in the terminal, and control the breathing lamp to display according to a preset display mode;
a second control unit 3022, configured to start a speaker in the terminal, and control the speaker to play a preset warning tone;
a third control unit 3023 for starting the motor in the terminal and controlling the motor to vibrate according to a preset vibration manner.
According to the embodiment of the invention, the event calling the acquisition equipment is monitored, and the prompt information is output when the event calling the acquisition equipment is monitored so as to prompt the user that the acquisition equipment starts to work, so that the occurrence of a vicious event that malicious software calls the acquisition equipment under the condition that the user does not know the malicious software is prevented, the privacy of the user is leaked, and the safety of the user is improved.
Example four
The embodiment of the invention provides a terminal, which can comprise one or more of the following components: a processor for executing computer program instructions to perform the various processes and methods, Random Access Memory (RAM) and Read Only Memory (ROM) for information and storing program instructions, memory for storing data and information, I/O devices, interfaces, antennas, and the like.
For an example, refer to fig. 4, which shows a block diagram of a terminal according to a fourth embodiment of the present invention, where the terminal is configured to implement the method for prompting a user in the foregoing embodiment. The terminal 400 may include an RF (Radio Frequency)circuit 410, amemory 420, aninput unit 430, adisplay unit 440, asensor 450, anaudio circuit 460, a WiFi (wireless fidelity)module 470, aprocessor 480, apower supply 482, acamera 490, and the like. Those skilled in the art will appreciate that the terminal configuration shown in fig. 4 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The various components of the terminal 400 will now be described in detail with reference to fig. 4:
theRF circuit 410 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to theprocessor 480; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuit includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, theRF circuitry 410 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), and the like.
Thememory 420 may be used to store software programs and modules, and theprocessor 480 executes various functional applications and data processing of the terminal 400 by operating the software programs and modules stored in thememory 420. Thememory 420 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 400, and the like. Further, thememory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
Theinput unit 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal 400. Specifically, theinput unit 430 may include atouch panel 431 andother input devices 432. Thetouch panel 431, also called a touch screen, may collect touch operations of a user on or near the touch panel 431 (e.g., operations of the user on or near thetouch panel 431 using any suitable object or accessory such as a finger or a stylus) and drive the corresponding connection device according to a preset program. Alternatively, thetouch panel 431 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to theprocessor 480, and receives and executes commands sent from theprocessor 480. In addition, thetouch panel 431 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. Theinput unit 430 may includeother input devices 432 in addition to thetouch panel 431. In particular,other input devices 432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Thedisplay unit 440 may be used to display information input by the user or information provided to the user and various menus of the terminal 400. TheDisplay unit 440 may include aDisplay panel 441, and optionally, theDisplay panel 441 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, thetouch panel 431 may cover thedisplay panel 441, and when thetouch panel 431 detects a touch operation on or near thetouch panel 431, the touch panel is transmitted to theprocessor 480 to determine the type of the touch event, and then theprocessor 480 provides a corresponding visual output on thedisplay panel 441 according to the type of the touch event. Although in fig. 4, thetouch panel 431 and thedisplay panel 441 are two separate components to implement the input and output functions of the terminal 400, in some embodiments, thetouch panel 431 and thedisplay panel 441 may be integrated to implement the input and output functions of the terminal 400.
The terminal 400 can also include at least onesensor 450, such as a gyroscope sensor, a magnetic induction sensor, an optical sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of thedisplay panel 441 according to the brightness of ambient light, and a proximity sensor that may turn off thedisplay panel 441 and/or a backlight when the terminal 400 is moved to the ear. As one of the motion sensors, the acceleration sensor may detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the terminal is stationary, and may be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping), and the like, and the terminal 400 may further be configured with other sensors such as a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Theaudio circuit 460, speaker 461, microphone 462 may provide an audio interface between a user and the terminal 400. Theaudio circuit 460 may transmit the electrical signal converted from the received audio data to the speaker 461, and convert the electrical signal into a sound signal for output by the speaker 461; on the other hand, the microphone 462 converts the collected sound signal into an electric signal, which is received by theaudio circuit 460 and converted into audio data, which is then processed by the audiodata output processor 480, and then transmitted to, for example, another terminal via theRF circuit 410, or output to thememory 420 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and the terminal 400 can help a user send and receive e-mails, browse web pages, access streaming media, and the like through theWiFi module 470, and provides the user with wireless broadband internet access. Although fig. 4 shows theWiFi module 470, it is understood that it does not belong to the essential constitution of the terminal 400 and can be omitted entirely as needed within the scope not changing the essence of the invention.
Theprocessor 480 is a control center of the terminal 400, connects various parts of the entire terminal using various interfaces and lines, performs various functions of the terminal 400 and processes data by operating or executing software programs and/or modules stored in thememory 420 and calling data stored in thememory 420, thereby monitoring the entire terminal. Optionally,processor 480 may include one or more processing units; preferably, theprocessor 480 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated intoprocessor 480.
The terminal 400 also includes a power supply 482 (e.g., a battery) for powering the various components, which may preferably be logically coupled to theprocessor 482 via a power management system to provide management of charging, discharging, and power consumption via the power management system.
Thecamera 490 is generally composed of a lens, an image sensor, an interface, a digital signal processor, a CPU, a display screen, and the like. The lens is fixed above the image sensor, and the focusing can be changed by manually adjusting the lens; the image sensor is equivalent to the 'film' of a traditional camera and is the heart of a camera for acquiring images; the interface is used for connecting the camera with the terminal mainboard in a flat cable, board-to-board connector and spring connection mode and sending the acquired image to thememory 420; the digital signal processor processes the acquired image through a mathematical operation, converts the acquired analog image into a digital image, and transmits the digital image to thememory 420 through an interface.
Although not shown, the terminal 400 may further include a bluetooth module or the like, which is not described in detail herein.
In order to implement the method for prompting the user in the foregoing, the terminal in the embodiment of the present invention includes:
one or more processors;
a memory; and
one or more modules stored in the memory and configured to be executed by the one or more processors, the one or more modules having the functionality to:
monitoring an event for calling acquisition equipment in the terminal;
and when the event is monitored, outputting prompt information.
As an embodiment, the monitoring an event that invokes a collection device in the terminal includes:
and monitoring an event of reading the file corresponding to the acquisition equipment in an operating system of the terminal.
Further, the monitoring an event of performing a reading operation on a file corresponding to the acquisition device in an operating system of the terminal includes:
monitoring an event for reading a file in an operating system of the terminal;
determining whether a file subjected to reading operation in the event of the reading operation is a file corresponding to the acquisition equipment;
and if the file subjected to the reading operation in the event of the reading operation is the file corresponding to the acquisition equipment, determining that the event for calling the acquisition equipment is monitored.
As an embodiment, the event invoking the acquisition device in the monitoring system includes:
and when the operating system of the terminal is started, monitoring an event for calling the acquisition equipment in the system.
As an embodiment, the outputting the prompt information includes:
starting a breathing lamp in the terminal, and controlling the breathing lamp to display according to a preset display mode; or,
starting a loudspeaker in the terminal, and controlling the loudspeaker to play a preset prompt tone; or,
and starting a motor in the terminal, and controlling the motor to vibrate according to a preset vibration mode.
According to the embodiment of the invention, the event calling the acquisition equipment is monitored, and the prompt information is output when the event calling the acquisition equipment is monitored so as to prompt the user that the acquisition equipment starts to work, so that the occurrence of a vicious event that malicious software calls the acquisition equipment under the condition that the user does not know the malicious software is prevented, the privacy of the user is leaked, and the safety of the user is improved.
EXAMPLE five
An embodiment of the present invention further provides a non-volatile readable storage medium, where the non-volatile readable storage medium may be a readable storage medium included in the memory in the foregoing embodiment; or a computer readable storage medium, which exists separately and is not assembled into the terminal, for implementing the method for prompting the user in the above embodiments.
The storage medium has stored therein one or more modules (programs) that, when implemented in an apparatus, cause the apparatus to perform the following steps (instructions):
monitoring an event for calling acquisition equipment in the terminal;
and when the event is monitored, outputting prompt information.
As an embodiment, the monitoring an event that invokes a collection device in the terminal includes:
and monitoring an event of reading the file corresponding to the acquisition equipment in an operating system of the terminal.
Further, the monitoring an event of performing a reading operation on a file corresponding to the acquisition device in an operating system of the terminal includes:
monitoring an event for reading a file in an operating system of the terminal;
determining whether a file subjected to reading operation in the event of the reading operation is a file corresponding to the acquisition equipment;
and if the file subjected to the reading operation in the event of the reading operation is the file corresponding to the acquisition equipment, determining that the event for calling the acquisition equipment is monitored.
As an embodiment, the event invoking the acquisition device in the monitoring system includes:
and when the operating system of the terminal is started, monitoring an event for calling the acquisition equipment in the operating system of the terminal.
As an embodiment, the outputting the prompt information includes:
starting a breathing lamp in the terminal, and controlling the breathing lamp to display according to a preset display mode; or,
starting a loudspeaker in the terminal, and controlling the loudspeaker to play a preset prompt tone; or,
and starting a motor in the terminal, and controlling the motor to vibrate according to a preset vibration mode.
According to the embodiment of the invention, the event calling the acquisition equipment is monitored, and the prompt information is output when the event calling the acquisition equipment is monitored so as to prompt the user that the acquisition equipment starts to work, so that the occurrence of a vicious event that malicious software calls the acquisition equipment under the condition that the user does not know the malicious software is prevented, the privacy of the user is leaked, and the safety of the user is improved.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.