Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an embodiment of a fingerprint touch-based photographing method according to the present invention, where the method is applied to a terminal, and the terminal includes a fingerprint sensor for collecting a fingerprint.
The terminal may be a smart phone, a tablet computer, a vehicle-mounted computer, a personal digital assistant, and the like, which is not limited herein.
The fingerprint sensor, also known as fingerprint sensor, is a key device for realizing automatic fingerprint acquisition, and in the fingerprint sensor, the detection of a fingerprint is realized by detecting a tiny capacitance formed by a finger surface and an induction chip of the fingerprint sensor.
In the embodiment, the photographing method based on fingerprint touch includes:
s101: a fingerprint touch event is received from a fingerprint sensor by a fingerprint module.
The Fingerprint module (Fingerprint) is used for specially processing information related to fingerprints in the terminal, including registration, identification, deletion and the like of the fingerprints, and is closely related inside, less in relation with other modules and relatively independent.
When a user touches the fingerprint sensor, a current signal or an interrupt signal is generated, i.e., a fingerprint touch event is generated.
Optionally, in order to avoid a situation of false touch, for example, in the process of operating the terminal, clothes and the like touch the fingerprint sensor, in another embodiment, the fingerprint sensor is touched for a certain time before a fingerprint touch event is generated.
Optionally, in this embodiment, the fingerprint of the user is not recognized, that is, a fingerprint touch event is generated as long as the user touches the fingerprint sensor. Of course, in other embodiments, the fingerprint touch event may be generated after inputting the matching fingerprint, that is, the fingerprint touch event is generated only when inputting the fingerprint meeting the requirement, and the generation of the fingerprint touch event is not limited herein.
S102: controlling the fingerprint module to send the fingerprint touch event to a registered user in the fingerprint module, wherein the registered user includes a camera application.
The user registered in the fingerprint module is stored in the fingerprint module, and can receive the fingerprint touch event sent by the fingerprint module.
The number of registered users in the fingerprint module can be more than one, and can be more than one, wherein the registered users include a camera application, and of course, the registered users can also include other applications, such as WeChat, QQ, notepad, and the like.
When the fingerprint module receives a fingerprint touch event, the fingerprint module sends the fingerprint touch event to a registered user in the fingerprint module.
S103: and controlling the camera application to receive the fingerprint touch event and take a picture in response to the fingerprint touch event.
The control camera application receives the fingerprint touch event and responds to the fingerprint touch event to take a picture, so that the functions that a user touches the fingerprint sensor with a hand and the terminal takes a picture are realized, namely, the fingerprint touch picture taking technology is realized.
Optionally, in order to perfect the fingerprint touch photographing technology of the terminal, in another embodiment, the step S103 further includes:
s1031: it is determined whether a camera application is running.
S1032: and when the camera application is running, controlling the camera application to receive the fingerprint touch event and take pictures in response to the fingerprint touch event.
That is, only when the camera application is running, the camera application is controlled to receive the fingerprint touch event, and then take a picture, otherwise, the fingerprint touch event is not received, so that the situation that a user mistakenly touches the fingerprint sensor and takes a picture when other applications are running is avoided.
Optionally, the specifically determining whether the camera application is running includes: and judging whether the camera application is running in the foreground of the terminal.
Of course, in another embodiment, step S103 may further specifically include:
s1033: and controlling the camera application to receive the fingerprint touch event and judging whether the camera application is running.
S1034: and controlling the camera application to take a picture in response to the fingerprint touch event when the camera application is running.
Different from the above steps S1031 to S1032, in the present embodiment, the step of determining whether the camera application is running is performed after the step of controlling the camera application to receive the fingerprint touch event, that is, after the camera application receives the fingerprint touch event, the step of determining whether the camera application is running may be performed, specifically, whether the camera application is running in the foreground may be determined, and when the camera application is running, the camera application is controlled to take a picture in response to the fingerprint touch event, otherwise, the picture is not taken.
In the above embodiment, the fingerprint touch event from the fingerprint sensor is directly received by the fingerprint module, and the event is sent to the camera application, so that photographing is realized. Compared with the prior art, firstly, the fingerprint module receives fewer messages, the action response is more timely, the functional stability is better, the touch photographing of the terminal fingerprint is ensured not to generate time delay, and the data can be processed in time; secondly, in the aspect of project integration, only interfaces for registering and storing camera applications need to be added in the fingerprint module, and the fingerprint module is closely related to other modules, and is less related to other modules, so that the concept of high cohesion low coupling (the tightness of the combination of elements in one module is high, and the tightness of the connection between modules in a system structure is low) in software design is better met, and the later maintenance and the transplantation of developers are facilitated.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another embodiment of a fingerprint touch-based photographing method according to the present invention, and in the embodiment, the method includes:
s204: the control camera application registers as a registered user of the fingerprint module.
The camera application is controlled to register as a registered user of the fingerprint module, i.e. the camera application is enabled to listen to and receive fingerprint touch events sent by the fingerprint module.
Referring to fig. 3, fig. 3 is a schematic flowchart of step S204 in this embodiment, step S204 specifically includes:
s2041: and controlling the camera application to request the application to become a registered user from the fingerprint management submodule so that the camera application can receive a fingerprint touch event from the fingerprint sensor of the fingerprint module.
In this application scenario, the fingerprint module includes: a Fingerprint Service sub-module (Fingerprint Service) and a Fingerprint management sub-module (Fingerprint manager).
Of course, in other embodiments, the fingerprint module may further include other modules such as a fingerprint communication sub-module (Fingerprinted), which is not limited herein.
The fingerprint management sub-module is used for helping an upper layer to access the fingerprint service sub-module, and the fingerprint service sub-module is responsible for managing logics of processes of fingerprint registration, identification, deletion, permission check and the like and is a service for processing a fingerprint core service.
S2042: controlling the fingerprint management sub-module to notify the fingerprint service sub-module of the request of the camera application, so that the fingerprint service sub-module adds the camera application to the registered user list
In order to enable the camera application to receive the fingerprint touch event from the fingerprint sensor of the fingerprint module, the camera application is firstly controlled to request the fingerprint management sub-module to become a registered user, when the fingerprint management sub-module receives the request of applying to become the registered user, the fingerprint management sub-module notifies the fingerprint service sub-module of the request, and the fingerprint service sub-module adds the camera application to a registered user list, namely, the camera application is enabled to monitor and receive the fingerprint touch event sent by the fingerprint module.
S201: a fingerprint touch event is received from a fingerprint sensor by a fingerprint module.
In this embodiment, step S201 specifically includes: a fingerprint touch event from a fingerprint sensor is received by a fingerprint service sub-module.
That is, when the fingerprint sensor generates a fingerprint touch event, the fingerprint touch event is received by the fingerprint service sub-module in the fingerprint module.
S202: controlling the fingerprint module to send the fingerprint touch event to a registered user in the fingerprint module, wherein the registered user includes a camera application.
Optionally, in this embodiment, step S202 specifically includes:
s2021: and controlling the fingerprint service submodule to traverse the registered users in the registered user list.
More than one registered user in the registered user list may be provided, for example, the registered user may include applications such as WeChat, QQ, notepad, etc., and when more than one registered user exists, the fingerprint service sub-module is controlled to traverse the registered users in the registered user list.
S2022: and controlling the fingerprint service sub-module to send the fingerprint touch event to the registered user in the registered user list.
The fingerprint touch event is sent to all registered users in the list of registered users, i.e. in this embodiment, any user registered in the fingerprint module can capture the fingerprint touch event.
Of course, in other embodiments, the fingerprint module is controlled to send the fingerprint touch event to the registered user in the fingerprint module, and the fingerprint module may be controlled to send the fingerprint touch event to a specific registered user in the fingerprint module, as long as the specific registered user includes the camera application, which is not limited herein.
S203: and controlling the camera application to receive the fingerprint touch event and take a picture in response to the fingerprint touch event.
The control camera application receives the fingerprint touch event and responds to the fingerprint touch event to take a picture, so that the functions that a user touches the fingerprint sensor with a hand and the terminal takes a picture are realized, namely, the fingerprint touch picture taking technology is realized.
Optionally, in this embodiment, the method for photographing based on fingerprint touch further includes:
s205: and controlling the fingerprint management sub-module to monitor whether a request for becoming a registered user exists or not so that the application sending the request can receive a fingerprint touch event from the fingerprint sensor of the fingerprint module.
S206: when the fingerprint management submodule receives a request for being applied to become a registered user, the fingerprint management submodule is controlled to inform the fingerprint service submodule of the application of the request to be sent, so that the fingerprint service submodule adds the application to a registered user list.
That is, in the present embodiment, the fingerprint management sub-module is controlled to monitor whether there is a request for requesting a registered user or not at all times, and when there is a request for requesting a registered user, the user who issued the request is added to the registered user list so that the fingerprint touch event can be sent to the application when a fingerprint touch event is subsequently received, that is, the fingerprint touch event can be captured by any registered application.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an embodiment of a terminal according to the present invention, where the terminal includes: the processor 40, the fingerprint sensor 41, the communication circuit 42 and the memory 43, wherein the fingerprint sensor 41, the communication circuit 42 and the memory 43 are respectively coupled to the processor 40, and the processor 40 controls itself, the fingerprint sensor 41, the communication circuit 42 and the memory 43 to implement the steps of the fingerprint touch based photographing method in any of the above embodiments.
Wherein, the terminal can be smart mobile phone, panel computer, on-vehicle computer and personal digital assistant etc. do not do the restriction here, and the terminal still includes: a fingerprint module (not shown), a camera application (not shown).
The processor 40 receives a fingerprint touch event from the fingerprint sensor 41 through the fingerprint module and controls the fingerprint module to transmit the fingerprint touch event to a registered user in the fingerprint module, including a camera application, through the communication circuit 42, and the processor 40 controls the camera application to receive the fingerprint touch event and take a picture in response to the touch event.
In an application scenario, the fingerprint module further includes: a fingerprint service sub-module (not shown) and a fingerprint management sub-module (not shown).
Wherein, the processor 40 sends the fingerprint touch event to the registered user in the fingerprint module through the fingerprint module via the communication circuit 42, which specifically includes: the processor 40, through the fingerprint service sub-module, sends the fingerprint touch event to the registered user in the fingerprint service sub-module through the communication circuit 42.
For a detailed photographing method based on fingerprint touch, please refer to the photographing method based on fingerprint touch in any of the above embodiments, which is not described herein again.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of the apparatus with storage function according to the present invention, the apparatus with storage function 50 stores program data 501, and the program data 501 can be executed to implement the steps in the fingerprint touch-based photographing method in any of the above embodiments, wherein for a detailed fingerprint touch-based photographing method, reference is made to the above embodiments, and details are not repeated here.
The device 50 with storage function may be, but is not limited to, a usb disk, an SD card, a PD optical drive, a mobile hard disk, a high-capacity floppy drive, a flash memory, a multimedia memory card, or a server.
In summary, in distinction from the state of the art, the fingerprint touch based photographing method of the present invention is applied to a terminal including a fingerprint sensor for acquiring a fingerprint, the photographing method including: receiving, by a fingerprint module, a fingerprint touch event from a fingerprint sensor; controlling a fingerprint module to send a fingerprint touch event to a registered user in the fingerprint module, wherein the registered user comprises a camera application; the control camera application receives the fingerprint touch event and responds to the fingerprint touch event to take a picture, and by the picture taking method, on one hand, the interference of a system on the control camera application can be reduced during picture taking, the stability of a picture taking function is ensured, on the other hand, the control camera application can better accord with the thought of high cohesion and low coupling of software design, and the control camera application is convenient for later maintenance and transplantation of developers.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.