Face recognition method, template configuration method, device, equipment and storage medium
By storing face feature information templates for other terminals with specified position relationships in the local feature library of the target terminal, the problem of limited improvement of face recognition speed in the prior art is solved, and the rapid recognition of users who have not performed face recognition is achieved, and the efficiency of face recognition is improved.
Patent Information
- Application Number
- CN202010805259.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-12
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2040-08-12
AI Technical Summary
The prior art has limited scenarios and low efficiency in improving the speed of face recognition, and cannot effectively improve the recognition speed of users who have not performed face recognition on the device.
By storing face feature information templates in other terminals with specified position relationships with the terminal in the local feature library of the target terminal, the corresponding face feature information templates in the local database can be retrieved for face recognition when the face feature information of the target face is received for the first time.
It expands the scene of improving the speed of face recognition, improves the efficiency of face recognition, and allows users who have not performed face recognition on the device to enjoy the effect of fast recognition.
Smart Images

Figure CN114140837B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of face recognition technology, and in particular to a face recognition method, template configuration method, device, equipment and storage medium. Background Art
[0002] With the continuous development of artificial intelligence (AI), the application of facial payment technology has also become popular, and more and more merchants have integrated facial payment functions into their payment services.
[0003] In related technologies, in order to improve the speed of face recognition, after a user performs a face scan operation for the first time on a device with face recognition function, the device will save the user's corresponding facial feature information template in the device's local database. When the user's facial information is received again in the future, the local data can be directly called for face recognition.
[0004] In the above solution, for a device, only the face recognition speed of users who have performed face recognition on the device can be improved. The scenarios where the face recognition speed is improved are small, and the efficiency of face recognition is not high. Summary of the invention
[0005] The embodiments of the present application provide a face recognition method, a template configuration method, an apparatus, a device, and a storage medium, which can expand the scenarios where the face recognition speed is improved, thereby improving the efficiency of face recognition. The technical solution is as follows:
[0006] On the one hand, a face recognition method is provided, the method being executed by a target terminal, the method comprising:
[0007] Obtain facial feature information of the target face;
[0008] Matching the facial feature information in a local feature library, wherein the local feature library stores facial feature information templates of matched users, wherein the matched users are users that have been matched in a designated terminal, wherein the designated terminal includes the target terminal and other terminals that have a designated positional relationship with the target terminal;
[0009] In response to a match between the facial feature information template of the target user and the facial feature information, the target user is taken as a user corresponding to the target face.
[0010] On the other hand, a template configuration method is provided, the method being executed by a server, the method comprising:
[0011] Acquire associated users of the target terminal, wherein the associated users include users that have been matched in other terminals; the other terminals are terminals that have a specified location relationship with the target terminal;
[0012] Obtaining a facial feature information template of the associated user;
[0013] The facial feature information template of the associated user is sent to the target terminal.
[0014] On the other hand, a face recognition device is provided, which is applied to a target terminal and includes:
[0015] The first acquisition module is used to acquire facial feature information of a target face;
[0016] A matching module, used for matching the facial feature information in a local feature library, wherein the local feature library stores facial feature information templates of matched users, wherein the matched users are users that have been matched in a designated terminal, wherein the designated terminal includes the target terminal and other terminals having a designated positional relationship with the target terminal;
[0017] The determination module is used to determine the target user as the user corresponding to the target face in response to the facial feature information template of the target user matching the facial feature information.
[0018] In a possible implementation manner, the device further includes:
[0019] A second acquisition module is used to acquire a facial feature information template of an associated user from a server before matching the facial feature information in a local feature library; the associated user includes a user that has been matched in the other terminal;
[0020] The storage module is used to store the acquired facial feature information template in the local feature library.
[0021] In a possible implementation, the second acquisition module includes:
[0022] A receiving submodule, configured to receive a heartbeat response data packet returned by the server; the heartbeat response data packet is returned by the server to a heartbeat request regularly sent by the target terminal;
[0023] The acquisition submodule is used to acquire the facial feature information template of the user that has been matched in the other terminal and is carried in the heartbeat response data packet.
[0024] In a possible implementation manner, the device further includes:
[0025] A reporting module, used for reporting the identification information of the target user to the server;
[0026] The identification information of the target user includes at least one of the following information:
[0027] The target user's identity, the target user's facial feature information, the target terminal's location information, the time when the target user performs facial recognition on the target terminal, and the target terminal's device identification.
[0028] In a possible implementation, the reporting module is used to report the identification information of the target user to the server via a heartbeat request; the heartbeat request is a request sent to the server at a regular interval.
[0029] In a possible implementation, the device includes:
[0030] A third acquisition module is used to obtain the update time of the facial feature information template of the matched user in the local feature library; the update time is the time when the corresponding user was last matched in the designated terminal;
[0031] The deleting module is used to delete the facial feature information templates of the matched user whose corresponding update time and current time have a duration greater than a duration threshold.
[0032] In a possible implementation, the matching module includes:
[0033] A first matching submodule is used to match the facial feature information with each first type feature template in the local feature library; the first type feature template is a facial feature information template of a user that has been matched in the target terminal;
[0034] The second matching submodule is used to match the facial feature information with each second type feature template in the local feature library in response to the facial feature information not matching the each first type feature template; the second type feature template is a facial feature information template of a user that has not been matched in the target terminal and has been matched in the other terminals.
[0035] On the other hand, a template configuration device is provided, the device is applied in a server, and the device includes:
[0036] A first acquisition module is used to acquire associated users of a target terminal, wherein the associated users include users that have been matched in other terminals; the other terminals are terminals that have a specified location relationship with the target terminal;
[0037] A second acquisition module, used to acquire the facial feature information template of the associated user;
[0038] The sending module is used to send the facial feature information template of the associated user to the target terminal.
[0039] In a possible implementation manner, the device further includes:
[0040] A receiving module, configured to receive the identification information of the associated user uploaded by the target terminal;
[0041] An updating module, used for updating the facial feature information template of the associated user according to the identification information of the associated user;
[0042] The identification information of the associated user includes at least one of the following information:
[0043] The identity of the associated user, the facial feature information of the associated user, the location information of the other terminal, the time when the associated user performs facial recognition on the other terminal, and the device identifier of the other terminal.
[0044] In a possible implementation manner, the other terminal having a specified position relationship with the target terminal includes at least one of the following terminals:
[0045] a terminal whose distance to the target terminal is within a specified distance interval;
[0046] A terminal in the same pre-divided area as the target terminal;
[0047] and a terminal in a user active area, wherein the user active area is determined based on an activity range of a user that has been matched in the target terminal.
[0048] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the face recognition method provided in the various optional implementations as described above.
[0049] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the template configuration method provided in the various optional implementations described above.
[0050] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the face recognition method provided in the various optional implementations described above.
[0051] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the template configuration method provided in the various optional implementations described above.
[0052] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the face recognition method provided in the above various optional implementations.
[0053] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the template configuration method provided in the above various optional implementations.
[0054] The technical solution provided by this application may have the following beneficial effects:
[0055] By storing facial feature information templates of other terminals having a specified positional relationship with the target terminal in the local feature library of the target terminal, when the target terminal receives the facial feature information of the target face for the first time, it can retrieve the corresponding facial feature information template in the local database for face recognition, thereby expanding the scenarios for improving the face recognition speed and improving the efficiency of face recognition.
[0056] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1A schematic diagram of the structure of a face recognition system provided by an exemplary embodiment of the present application is shown;
[0059] Figure 2 A flow chart of a face recognition method provided by an exemplary embodiment of the present application is shown;
[0060] Figure 3 A flow chart of a template configuration method provided by an exemplary embodiment of the present application is shown;
[0061] Figure 4 A schematic diagram of a face recognition system provided by an exemplary embodiment of the present application is shown;
[0062] Figure 5 A flow chart of a face recognition method provided by an exemplary embodiment of the present application is shown;
[0063] Figure 6 A schematic diagram showing the distribution of a target terminal and other terminals provided by an exemplary embodiment of the present application is shown;
[0064] Figure 7 A schematic diagram showing a preset divided area provided by an exemplary embodiment of the present application is shown;
[0065] Figure 8 A schematic diagram of a face recognition system provided by an exemplary embodiment of the present application is shown;
[0066] Fig. 9 A schematic diagram of a face recognition system shown in an exemplary embodiment of the present application is shown;
[0067] Fig.10 A block diagram of a face recognition device provided by an exemplary embodiment of the present application is shown;
[0068] Fig.11 A block diagram of a template configuration device provided by an exemplary embodiment of the present application is shown;
[0069] Fig.12 is a structural block diagram of a computer device according to an exemplary embodiment;
[0070] Fig.13 It is a structural block diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION
[0071] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0072] The embodiment of the present application proposes a face recognition method, which can realize that when the target terminal receives the face feature information of the target face for the first time, the corresponding face feature information template in the local database is retrieved for face recognition, thereby improving the efficiency of face recognition. For ease of understanding, the terms involved in the present application are explained below.
[0073] 1) Artificial Intelligence
[0074] Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0075] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. The display device including an image acquisition component shown in this application mainly involves computer vision technology and machine learning / deep learning.
[0076] 2) Computer Vision (CV)
[0077] Computer vision is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further perform graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D (3D images) technology, virtual reality, augmented reality, simultaneous positioning and mapping, and other technologies, as well as common face recognition technologies.
[0078] 3) Face Recognition
[0079] Face recognition is a biometric technology that identifies a person based on his or her facial features.
[0080] Face recognition uses a camera or a webcam to collect images or video streams containing faces, and automatically detects faces in the images, and then performs a series of related application operations on the detected face images. The technology includes image acquisition, feature location, identity confirmation and search, etc.
[0081] Please refer to Figure 1 , which shows a schematic diagram of the structure of a face recognition system provided by an exemplary embodiment of the present application, such as Figure 1 As shown, the face recognition system includes a server 110 and a terminal 120 .
[0082] The above-mentioned server 110 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0083] The terminal 120 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a manual cash register device, a self-service cash register device, etc. with a face recognition function, but is not limited thereto.
[0084] The above system includes one or more servers 110 and multiple terminals 120. The embodiment of the present application does not limit the number of servers 110 and terminals 120.
[0085] The terminal and the server are connected via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0086] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies. This application is not limited here.
[0087] Please refer to Figure 2 , which shows a flowchart of a face recognition method provided by an exemplary embodiment of the present application, the method is executed by a target terminal, and the target terminal may be Figure 1 Any terminal in the face recognition system shown in Figure 2 As shown, the method includes:
[0088] Step 210, obtaining facial feature information of the target face.
[0089] In a possible implementation, facial feature information is extracted based on the shapes of facial organs, distance features between facial organs, and the like.
[0090] In the embodiment of the present application, the target face refers to the face image captured by the image acquisition device of the target terminal, where the image acquisition device can be a camera or a camera component.
[0091] Step 220, matching facial feature information in a local feature library, wherein the local feature library stores facial feature information templates of matched users, wherein the matched users are users that have been matched in a specified terminal, wherein the specified terminal includes a target terminal and other terminals that have a specified positional relationship with the target terminal.
[0092] Generally speaking, when performing face recognition, the terminal uses a camera as a recognition information acquisition device to obtain the facial image of the recognition object in a non-contact manner and send it to the server; after obtaining the image, the server matches it with the database image to complete the recognition process. In order to improve the efficiency of face recognition, the terminal requests the relevant face feature information template from the server when performing face recognition for the first time, and saves the face feature information template in the local feature library corresponding to the terminal after matching, so that the face feature information template in the local feature library can be directly called for face recognition the next time matching is performed, thereby improving the efficiency of face recognition.
[0093] In an embodiment of the present application, in order to further improve the efficiency of face recognition, the local database of the target terminal not only stores the face feature information templates of users that have been matched by the target terminal, but also stores the face feature information templates of users that have not been matched by the target terminal but have been matched by other terminals that have a specified position relationship with the target terminal. For example, when other terminals that have a specified relationship with the target terminal have performed face recognition on user A and have obtained and saved the face feature information template corresponding to user A, the face feature information template corresponding to user A will be shared with the target terminal through the server. Even if the target terminal performs face recognition on user A for the first time, the face feature information template can be directly extracted from the local feature library corresponding to the target terminal, thereby improving the efficiency of face recognition.
[0094] Step 230, in response to the facial feature information template of the target user matching the facial feature information, the target user is taken as the user corresponding to the target face.
[0095] To summarize, the face recognition method provided in the embodiment of the present application stores face feature information templates in other terminals that have a specified positional relationship with the target terminal in the local feature library of the target terminal, so that when the target terminal first receives the face feature information of the target face, it can retrieve the corresponding face feature information template in the local database for face recognition, thereby improving the efficiency of face recognition.
[0096] Please refer to Figure 3, which shows a flow chart of a template configuration method provided by an exemplary embodiment of the present application, the method is executed by a server, and the server may be Figure 1 The server in the face recognition system shown in FIG. Figure 3 As shown, the method includes:
[0097] Step 310: Acquire the associated users of the target terminal, where the associated users include users that have been matched in other terminals; the other terminals are terminals that have a specified location relationship with the target terminal.
[0098] Step 320, obtaining the facial feature information template of the associated user.
[0099] In one possible implementation, the server corresponds to a background feature library, which is used to record the identity of each user, the facial feature information template of each user, the location information of each terminal, the time when each user performs facial recognition on each terminal, and the device identification of each terminal.
[0100] In a possible implementation, based on the identity identifier of the associated user, a facial feature information template of the associated user is obtained from a background feature library.
[0101] Step 330: Send the facial feature information template of the associated user to the target terminal.
[0102] To summarize, the template configuration method provided in the embodiment of the present application obtains users who have been matched in other terminals that have a specified position relationship with the target terminal as associated users of the target terminal, and sends the facial feature information template of the associated user to the target terminal, so that the target terminal stores the facial feature information templates in other terminals that have a specified position relationship with the target terminal in the local feature library, so that when the target terminal receives the facial feature information of the target face for the first time, it can call the corresponding facial feature information template in the local database for face recognition, thereby improving the efficiency of face recognition.
[0103] This application provides a face recognition system, which includes at least two terminals and a server. Taking the face payment scenario as an example, please refer to Figure 4 , which shows a schematic diagram of a face recognition system provided by an exemplary embodiment of the present application, such as Figure 4 As shown, the face recognition system includes a first terminal 410, a second terminal 420 and a server 430.
[0104] Assume that user A has not performed face recognition on the first terminal 410 and the second terminal 420, and the face feature information template of user A is not saved in the local feature library of the first terminal 410 and the second terminal 420. At time T1, user A uses the face payment function on the first terminal 410. Since the face feature information template of user A is not saved in the local feature library of the first terminal 410, the first terminal sends the acquired face feature information of user A to the server. The server performs face recognition based on the received face feature information of user A and the face feature information template corresponding to user A in the background server, and returns the recognition result to the first terminal 410. In one possible implementation, Figure 4 As shown, the recognition result includes the recognition information of user A and the facial feature information target of user A, and the first terminal 410 saves the facial feature information template of user A in the local feature library; in another possible implementation, the recognition result only includes the recognition information of user A, and the terminal saves the acquired facial feature information of user A as the facial feature information template of user A in the local feature library based on the recognition information of user A, or sends the facial feature information template request information of user A to the server based on the recognition information of user A, and saves the facial feature information template returned by the server based on the request in the local feature library. At the same time, based on the identity of user A obtained by recognition and the location information of the first terminal 410, the server sends the facial feature information template corresponding to user A to the second terminal 420 that has a specified location relationship with the first terminal, and after receiving the facial feature information template corresponding to user A, the second terminal 420 stores it in the local feature library. At time T2, user A uses the facial payment function on the second terminal 420, and the second terminal 420 performs facial recognition on user A by directly calling the facial feature information template of user A stored in the local feature library.
[0105] Since the second terminal matches user A by directly calling the facial feature information template stored in the local feature library, the steps of obtaining the facial feature information template are reduced, thereby reducing the time for facial recognition and improving the efficiency of facial recognition.
[0106] In practical applications, this method can be applied to situations where users have facial recognition payment needs.
[0107] For example, there are multiple cashier counters in a supermarket, which can be manual cashier counters or self-service cashier counters. Each cashier counter is equipped with a terminal that supports facial payment. When a user uses facial payment for the first time at one of the cashier counters, the terminal corresponding to the cashier counter obtains the facial feature information template corresponding to the user. At the same time, the facial feature information template of the user will also be synchronized to the terminals corresponding to other cashier counters in the supermarket. When the user makes facial payment at another cashier counter in the supermarket next time, the terminal corresponding to the cashier counter can directly call the facial feature information template of the user stored in the local feature library to perform facial recognition on the user.
[0108] For another example, in a large shopping mall, many merchants are equipped with terminals that support facial payment. When a user uses facial payment for the first time in a merchant, the facial feature information template corresponding to the user will be synchronized to other terminals that support facial payment in the mall. Later, when the user goes to another merchant to make a facial payment, the terminal in the merchant can use the facial feature information template of the user stored in the local feature library to perform facial recognition on the user.
[0109] For another example, there are multiple terminals that support facial payment on a route that a user often takes (such as a commuting route). During a commute, the user makes a facial payment at one of the terminals. The user's facial feature information template will be synchronized to other terminals on the commuting route. When the user subsequently makes a facial payment at another terminal during another commute, the other terminal can directly complete facial recognition of the user through the locally stored facial feature information template of the user.
[0110] In the scheme shown in the above-mentioned embodiment of the present application, when the above-mentioned target terminal obtains users that have been matched in other terminals that have a specified position relationship with the target terminal, it can be obtained through the server. For example, when face matching occurs on other terminals, the server obtains information about users that have been matched by other terminals, and synchronizes the face feature information templates of users that have been matched by other terminals to the target terminal; or, the target terminal can also obtain face feature information templates of users that have been matched directly in the other terminals from other terminals; for example, the target terminal obtains the identifiers of other terminals that have a specified position relationship with it from the server (such as terminal addresses), or the target terminal is pre-set with identifiers of other terminals that have a specified position relationship with it, and the target terminal maintains communication with the other terminals. When face matching is performed on users in other terminals that have not been matched on the target terminal, the target terminal obtains the face feature information templates of the user from the other terminals and stores them locally.
[0111] For example, the target terminal obtains the facial feature information template of the user that has been matched in other terminals through the server. Please refer to Figure 5 , which shows a flowchart of a face recognition method provided by an exemplary embodiment of the present application, the method can be executed by a target terminal interacting with a server, and the target terminal can be Figure 1 Any terminal in the face recognition system shown in the figure, the server can be Figure 1 The server in the face recognition system shown in FIG. Figure 5 As shown, the method includes:
[0112] Step 510: The server obtains the associated users of the target terminal, where the associated users include users that have been matched in other terminals; the other terminals are terminals that have a specified location relationship with the target terminal.
[0113] In one possible implementation, the server corresponds to a background feature library, which is used to record the identity of each user, the facial feature information template of each user, the location information of each terminal, the time when each user performs facial recognition on each terminal, and the device identification of each terminal, etc.
[0114] Step 520: The server obtains the facial feature information template of the associated user.
[0115] In a possible implementation, the server obtains the facial feature information template of the associated user from a background feature library based on the identity identifier of the associated user.
[0116] In a possible implementation, the server receives identification information of an associated user uploaded by other terminals;
[0117] According to the identification information of the associated user, the facial feature information template of the associated user is updated.
[0118] The identification information of the associated user includes at least one of the following information:
[0119] The identity of the associated user, the facial feature information of the associated user, the location information of other terminals, the time when the associated user performs face recognition on other terminals, and the device identification of other terminals.
[0120] In a possible implementation, other terminals having a specified position relationship with the target terminal include terminals whose distances to the target terminal are within a specified distance interval, and the specified distance interval can be set by developers or managers according to actual needs, or can be automatically set by the server. Figure 6 , which shows a distribution diagram of a target terminal and other terminals provided by an exemplary embodiment of the present application, such as Figure 6As shown, the line between the target terminal 610 and other terminals is connected to obtain the distance between the two. Assuming that the specified distance interval is (0, m], the unit is meter, the server will confirm the terminal whose distance to the target terminal 610 is less than or equal to m as the terminal having a specified position relationship with the target terminal, such as terminal 620 and terminal 630, while the distance between terminal 640 and terminal 650 and the target terminal 610 is greater than m, and they do not have a specified position relationship with the target terminal.
[0121] In a possible implementation, other terminals having a specified positional relationship with the target terminal include terminals in a preset partition area with the target terminal. The preset partition area can be divided by the developer or manager according to actual needs, or can be automatically set by the server. For example, the developer or manager uses a business district as a preset partition area, determines that the terminal with the face-scanning payment function is the target terminal, and other terminals with the face-scanning payment function in the same area are other terminals; or, preset a fixed-size partition. Please refer to Figure 7 , which shows a schematic diagram of a preset divided area provided by an exemplary embodiment of the present application, such as Figure 7 As shown, a rectangular area with a as the length and b as the width is constructed, and the rectangular area is used as the preset division area. The target terminal 710 is in the rectangular area, and the server regards other terminals in the area as terminals that have a specified position relationship with the target terminal. For example, terminal 720, terminal 730 and terminal 740 can be confirmed as terminals that have a specified position relationship with the target terminal, while terminal 750 does not have a specified position relationship with the target terminal.
[0122] It should be noted that the above description of the preset divided areas is only illustrative, and the present application does not limit the scope, shape, etc. of the preset divided areas.
[0123] In a possible implementation, other terminals having a specified positional relationship with the target terminal include terminals within a user active area, and the user active area is determined based on the activity range of the user that has been matched in the target terminal. That is, the user that has been matched in the target terminal is used as a reference user, and the active area range of the target user is obtained based on the activity range of the reference user in the server database.
[0124] In a possible implementation, the server uses the area with the most reference users, or the area with the number of reference users greater than a preset threshold, as the user active area, and uses the terminals in the user active area as other terminals with a specified position relationship with the target terminal. For example, the activity range of reference user A is area A, area B and area C, the activity range of reference user B is area C, area D and area F, and the activity range of reference user C is area B, area C and area E. Then, among areas A to F, area C has the most reference users, followed by area B, and the other areas are in parallel. Therefore, the server can use area C as the user active area, or the server can also set the preset threshold to 2, and obtain the areas with more than 2 reference users, that is, areas C and B, as the user active areas.
[0125] Alternatively, in another possible implementation, the server obtains the terminals matched by each reference user in their respective activity range as reference terminals; and obtains the number of matched reference users in each reference terminal, and obtains reference terminals whose number of matched reference users is greater than the number threshold as other terminals that have a specified position relationship with the target terminal. For example, assuming that the users matched in the target terminal include user A, user B, and user C, user A has matched terminals A, terminal B, and terminal C in its corresponding activity range; user B has matched terminals B, terminal F, and terminal G in its corresponding activity range; user C has matched terminals A, terminal B, and terminal D in its corresponding activity range, then in the above terminals, the number of reference users that have matched terminal B is 3, the number of reference users that have matched terminal A is 2, and the number of reference users that have matched other terminals is 1. If the number threshold is set to 2, the server obtains terminals B and C as other terminals that have a specified position relationship with the target terminal.
[0126] In a possible implementation, the above methods for confirming other terminals may be used alone or in combination with each other, that is, the server may use at least one of the above confirmation methods to determine other terminals having a specified location relationship with the target terminal.
[0127] The embodiments of the present application only use the above three methods for determining other terminals as examples. The server can also determine other terminals that have a specified position relationship with the target terminal by or in combination with other methods. For example, the server determines the seed user by the user who has been identified more times in the target terminal, and determines all or part of the terminals with face recognition functions in the area where the seed user often appears as other terminals that have a specified position relationship with the target terminal. The embodiments of the present application do not limit the way in which the server determines other terminals that have a specified position relationship with the target terminal.
[0128] In a possible implementation, when the server updates the facial feature information template of the associated user according to the identification information of the associated user, the facial feature information template of the associated user is replaced with the facial feature information in the identification information of the associated user based on the identity identifier of the associated user.
[0129] That is to say, the server updates the facial feature information template corresponding to the user based on the facial feature information of the user uploaded by each terminal to ensure the real-time performance of the data in the background feature library.
[0130] In a possible implementation, in response to the facial feature information being picture information, when updating the facial feature information template of the associated user based on the identity identifier of the associated user, the server obtains the facial feature information template of the associated user and the clarity of the facial feature information in the identification information of the associated user respectively;
[0131] A high-definition face feature information template is obtained as the associated user.
[0132] In order to ensure the accuracy of face recognition in practical applications, it is necessary to ensure the clarity of the facial feature information template. Therefore, the server can adopt the principle of clarity priority when updating the facial feature information template. Under the premise that the clarity is the same or similar, or the clarity of the facial feature information uploaded by the terminal is higher than that of the original facial feature information template, the facial feature information uploaded by the terminal is obtained as a new facial feature information template.
[0133] In one possible implementation, the server adds the time when the associated user performs face recognition on other terminals in the background feature library based on the identification information of the associated user to obtain the update time of the facial feature information template, and notifies the target terminal so that the target terminal can subsequently manage the template based on the timeliness of the facial feature information template.
[0134] Step 530: The server sends the facial feature information template of the associated user to the target terminal, and correspondingly, the target terminal obtains the facial feature information of the target face.
[0135] In a possible implementation, the server sends the facial feature information template of the associated user to the target terminal in the form of a heartbeat response data packet to ensure timely update of the facial feature information template in the target terminal.
[0136] In order to ensure the real-time nature of the user information in the local feature library corresponding to the terminal and the background feature library corresponding to the server, a heartbeat service is added to this application. Taking face payment as an example, please refer to Figure 8 , which shows a schematic diagram of a face recognition system provided by an exemplary embodiment of the present application, such as Figure 8As shown, the face recognition system includes a terminal 810 that supports face payment, and a server 820 corresponding to face payment.
[0137] The terminal 810 and the server 820 establish a connection via the heartbeat service 830 to ensure periodic updates of messages between the two.
[0138] like Figure 8 As shown, the terminal 810 corresponds to a local feature library, which is used to store the device identification of the terminal, the user's identity identification, the user's facial feature information template, and the update time of the user's facial feature information template, etc.; the server 820 corresponding to the face-swiping payment corresponds to a background feature library, which is used to store the device identification of each terminal, the location information of each terminal, the user's identity identification, the user's facial feature information template, the update time of the user's facial feature information template, etc.
[0139] In one possible implementation, in response to a heartbeat request sent by the terminal in a first cycle, the server selects from the background feature library, based on the location information of the terminal, users corresponding to facial feature information templates that are newly added and / or updated in the local feature libraries of other terminals that have a certain location relationship with the terminal within the first cycle as associated users of the terminal, and sends the facial feature information templates corresponding to the associated users to the terminal in the form of a heartbeat response data packet to update the local feature library of the terminal; correspondingly, the terminal sends the facial feature information templates that are newly added and / or updated in its local database within the second cycle to the server in the form of a heartbeat request, the newly added and / or updated facial feature information templates are facial feature information templates obtained from the server because the terminal has not matched a user, and the heartbeat request is used to instruct the server to update the local feature libraries of other terminals that have a certain location relationship with the terminal based on the facial feature information templates updated in the terminal, and at the same time update the background feature library corresponding to the server.
[0140] In a possible implementation manner, the first period is equal to the second period, or the first period is not equal to the second period.
[0141] In a possible implementation, the terminal obtains the location information of the terminal by calling the positioning service 840. For example, by calling the map software, the longitude and latitude information of the terminal is obtained as the location information of the terminal.
[0142] Step 540: The target terminal matches the facial feature information in the local feature library.
[0143] In a possible implementation, the target terminal obtains a facial feature information template of an associated user from a server; the associated user includes a user that has been matched in other terminals;
[0144] The target terminal stores the acquired facial feature information template in the local feature library.
[0145] In a possible implementation, the target terminal receives a heartbeat response data packet returned by the server; the heartbeat response data packet is returned by the server to a heartbeat request sent regularly by the target terminal;
[0146] The target terminal obtains the facial feature information template of the user that has been matched in other terminals and is carried in the heartbeat response data packet.
[0147] That is to say, in an embodiment of the present application, the terminal will send a heartbeat request containing a request to update the local database to the server at a certain period. In response to the heartbeat request, the server sends a facial feature information template containing the matched users updated and / or newly added in other terminals during the period to the target terminal to ensure timely update of the facial feature information template in the target terminal.
[0148] In one possible implementation, the local feature library includes a first type of feature template and a second type of feature template; the first type of feature template is a facial feature information template of a user that has been matched in the target terminal; the second type of feature template is a facial feature information template of a user that has not been matched in the target terminal but has been matched in other terminals.
[0149] Matching facial feature information in the local feature library can be achieved as follows:
[0150] Matching the facial feature information with each first type feature template in the local feature library;
[0151] In response to the facial feature information not matching each of the first type feature templates, the facial feature information is matched with each of the second type feature templates in the local feature library.
[0152] For the target terminal, the probability that a user who has been matched in the target terminal will be matched again on the target terminal is greater than the probability that a user who has not been matched in the target terminal will be matched on the target terminal. Based on the above considerations, in order to improve the efficiency of face matching, when storing face feature information, the local feature library of the target terminal stores the face feature information template of the user who has been matched by the target terminal as the first type of feature template, and stores the face feature information template of the user who has been matched in other terminals but has not been matched by the target terminal as the second type of feature template. When performing face matching, the first type of feature template is used for matching first. After the first type of feature template fails to match, it is determined that the user is the first time to be matched on the target terminal, and the second type of feature template is used for corresponding matching.
[0153] In one possible implementation, in response to the facial feature information not matching each second-type feature template, indicating that the user has not been matched on the target terminal and other terminals having a specified positional relationship with the target terminal, the target terminal sends the facial feature information to the server, and the server performs facial recognition based on the facial feature information template in the background feature library and then feeds back the recognition result to the target terminal.
[0154] Step 550, in response to the facial feature information template of the target user matching the facial feature information, the target terminal regards the target user as the user corresponding to the target face.
[0155] In a possible implementation, when the facial feature information template matches the facial feature information, the facial feature information template of the target user stored in the local database is updated based on the acquired facial feature information.
[0156] In a possible implementation, the acquired facial feature information of the target user is used as a new facial feature information template of the target user to replace the facial feature information template of the target user stored in the local feature library. Since the facial feature information of the user may change slightly over time, the newly acquired facial feature information of the target user is used as the facial feature information template of the target user to ensure the immediacy of the facial feature information template, thereby improving the accuracy of face recognition.
[0157] Alternatively, in another possible implementation, when the facial feature information template is stored in the form of an image, the definition of the target user's facial feature information obtained in real time and the target user's facial feature information template are obtained respectively, and the one with higher definition is obtained as the target user's facial feature information template. During the use of the target device, due to the movement of the user or the instability of the target device, the acquired facial image of the target user may be relatively blurred (but within the matching range). At this time, if it is used as the target user's facial feature information template, it will affect the accuracy of subsequent face recognition. Therefore, in order to ensure the accuracy of face recognition, the target terminal can adopt the principle of clarity priority when updating the facial feature information template.
[0158] After the terminal updates and / or adds a facial feature information template to the local feature library, the updated and / or newly added facial feature information template is sent to the server through the heartbeat service, so that the server updates the facial feature information template in the background feature library to ensure the consistency of the information.
[0159] Step 560: The target terminal reports the identification information of the target user to the server.
[0160] The identification information of the target user includes at least one of the following information:
[0161] The target user's identity, the target user's facial feature information, the target terminal's location information, the time when the target user performs facial recognition on the target terminal, and the target terminal's device identification.
[0162] In a possible implementation, the location information of the target user is recorded in the form of longitude and latitude.
[0163] In a possible implementation manner, the target terminal obtains the location information of the target terminal by calling a positioning service.
[0164] In a possible implementation, the target terminal reports the identification information of the target user to the server through a heartbeat request, and the heartbeat request is a request sent to the server at a fixed time. That is, the target terminal sends a heartbeat request containing the user identification information updated in the local database within the period to the server at a certain period, and the heartbeat request is used to instruct the server to share the user identification information updated in the local database with the terminal having a specified location relationship with the user target terminal.
[0165] In a possible implementation, the heartbeat request is also used to instruct the server to update data in a background feature library corresponding to the server based on the updated user identification information.
[0166] Since there are cases where users occasionally perform face recognition operations in the target terminal, in order to reduce the occupation of the local feature library by the face feature information templates of such users, in a possible implementation method, the target terminal obtains the update time of the face feature information template of the matched user in the local feature library; the update time is the time when the corresponding user was last matched in the designated terminal;
[0167] The target terminal deletes the facial feature information templates of the matched user whose duration between the corresponding update time and the current time is greater than the duration threshold.
[0168] Taking the target terminal as an example, when the facial feature information template of a certain user stored in the target terminal and other terminals with a specified position relationship with it has not been used for facial feature information matching for a long time, it is confirmed that the user has not been active in the area where the target terminal is located for a long time. In order to reduce the memory occupation of the local feature library, the facial feature information template of the user in the local feature library of the target terminal and other terminals with a specified position relationship with it is deleted. For example, the user moves away from the area where the target terminal is located, resulting in the terminal in the range where the facial feature information template of the user is stored not being used by the user for a long time.
[0169] To summarize, the face recognition method provided in the embodiment of the present application stores face feature information templates in other terminals that have a specified positional relationship with the target terminal in the local feature library of the target terminal, so that when the target terminal first receives the face feature information of the target face, it can retrieve the corresponding face feature information template in the local database for face recognition, thereby improving the efficiency of face recognition.
[0170] Please refer to Fig. 9 , which shows a schematic diagram of a face recognition system shown in an exemplary embodiment of the present application, such as Fig. 9 As shown, the face recognition system includes a first terminal 910, a second terminal 920 and a server 930.
[0171] like Fig. 9 As shown, the terminal includes a face recognition module, a local feature library and a heartbeat service module, and the server correspondingly includes a face recognition module and a background feature library.
[0172] Assume that user A has not performed face recognition on the first terminal 910 and the second terminal 920, and the face feature information template of user A is not saved in the local feature databases corresponding to the first terminal 910 and the second terminal 920. At time T1, user A uses the face payment function on the first terminal 910, and the face recognition module 911 performs face recognition on user A based on the acquired face feature information of user A. Since the face feature information template of user A is not saved in the local database of the first terminal 910, the face recognition module 911 sends the face feature information corresponding to user A to the server; after the face recognition module 931 in the server obtains the face feature information of user A, it performs face recognition by calling the face feature information template in the background feature database 932, obtains the corresponding recognition result, and sends the recognition result to the first terminal 910, which includes the face feature information template of user A; the first terminal 910 saves the face feature information template in the recognition result in the local database.
[0173] The first terminal 910 sends a first heartbeat request to the server at a frequency of the first period to notify the server of the facial feature information template updated and / or newly added in the local feature library within the first period. In a possible implementation, the first terminal sends a user ID to the server to notify the server that the facial feature information template corresponding to the user ID has been updated and / or newly added in the local database corresponding to the first terminal, instructing the server to update the facial feature information template in the background feature library, and at the same time, sends the facial feature information template updated and / or newly added in the local feature library of the first terminal to the second terminal 920 having a specified position relationship with the first terminal 910. The second terminal 920 receives the facial feature information template updated and / or newly added in the local feature library of the first terminal, and updates the facial feature information template in the local feature library of the second terminal 920.
[0174] At time T2, user A uses the face payment function on the second terminal 920, and the second terminal 920 directly calls the face feature information template of user A stored in the local feature library to perform face recognition on user A. Since the second terminal matches user A by directly calling the face feature information template stored in the local feature library, the step of obtaining the face feature information template is reduced, thereby reducing the time of face recognition and improving the efficiency of face recognition.
[0175] In one possible implementation, the first terminal 910 sends a second heartbeat request to the server at a frequency of the second period, and the second heartbeat request is a facial information template update request, so that the server responds to the second heartbeat request, and based on the location information of the first terminal, filters out from the background database the users corresponding to the newly added and / or updated user identification information in the local feature library of other terminals that have a certain location relationship with the terminal within the second period as associated users of the terminal, and sends the facial feature information template corresponding to the associated user to the first terminal 910 in the form of a heartbeat response data packet to update the local feature library of the first terminal.
[0176] The first period and the second period may be the same or different.
[0177] Please refer to Fig.10 , which shows a block diagram of a face recognition device provided by an exemplary embodiment of the present application, the device is applied to a target terminal, which can be Figure 1 Any terminal in the face recognition system shown in Fig.10 As shown, the device comprises:
[0178] The first acquisition module 1010 is used to acquire facial feature information of a target face;
[0179] A matching module 1020 is used to match facial feature information in a local feature library, wherein the local feature library stores facial feature information templates of matched users, wherein the matched users are users that have been matched in a specified terminal, wherein the specified terminal includes a target terminal and other terminals having a specified positional relationship with the target terminal;
[0180] The determination module 1030 is used to determine the target user as the user corresponding to the target face in response to the facial feature information template of the target user matching the facial feature information.
[0181] In a possible implementation, the device further includes:
[0182] A second acquisition module is used to acquire a facial feature information template of an associated user from a server before matching the facial feature information in a local feature library; the associated user includes a user that has been matched in other terminals;
[0183] The storage module is used to store the acquired facial feature information template in the local feature library.
[0184] In a possible implementation, the second acquisition module includes:
[0185] The receiving submodule is used to receive the heartbeat response data packet returned by the server; the heartbeat response data packet is returned by the server to the heartbeat request sent regularly by the target terminal;
[0186] The acquisition submodule is used to obtain the facial feature information template of the user that has been matched in other terminals and is carried in the heartbeat response data packet.
[0187] In a possible implementation, the device further includes:
[0188] A reporting module, used to report the identification information of the target user to the server;
[0189] The identification information of the target user includes at least one of the following information:
[0190] The target user's identity, the target user's facial feature information, the target terminal's location information, the time when the target user performs facial recognition on the target terminal, and the target terminal's device identification.
[0191] In a possible implementation, the reporting module is used to report the identification information of the target user to the server via a heartbeat request; the heartbeat request is a request sent to the server at a regular interval.
[0192] In a possible implementation, the device includes:
[0193] The third acquisition module is used to obtain the update time of the facial feature information template of the matched user in the local feature library; the update time is the time when the corresponding user was last matched in the specified terminal;
[0194] The deletion module is used to delete the facial feature information templates of the matched user whose corresponding update time and current time have a duration greater than a duration threshold.
[0195] In a possible implementation, the matching module includes:
[0196] A first matching submodule is used to match the facial feature information with each first type feature template in the local feature library; the first type feature template is a facial feature information template of a user that has been matched in the target terminal;
[0197] The second matching submodule is used to match the facial feature information with each second type feature template in the local feature library in response to the facial feature information not matching each first type feature template; the second type feature template is a facial feature information template of the user that has not been matched in the target terminal and has been matched in other terminals.
[0198] To summarize, the face recognition device provided in the embodiment of the present application is applied to a target terminal. By storing face feature information templates in other terminals that have a specified positional relationship with the target terminal in the local feature library of the target terminal, when the target terminal receives the face feature information of the target face for the first time, it can retrieve the corresponding face feature information template in the local database for face recognition, thereby improving the efficiency of face recognition.
[0199] Please refer to Fig.11 , which shows a block diagram of a template configuration device provided by an exemplary embodiment of the present application, the device is applied to a server, and the server may be Figure 1 The server in the face recognition system shown in FIG. Fig.11 As shown, the device comprises:
[0200] A first acquisition module 1110 is used to acquire associated users of a target terminal, wherein the associated users include users that have been matched in other terminals; the other terminals are terminals that have a specified location relationship with the target terminal;
[0201] The second acquisition module 1120 is used to acquire the facial feature information template of the associated user;
[0202] The sending module 1130 is used to send the facial feature information template of the associated user to the target terminal.
[0203] In a possible implementation, the device further includes:
[0204] A receiving module, configured to receive the identification information of the associated user uploaded by the target terminal;
[0205] An updating module, used for updating the facial feature information template of the associated user according to the identification information of the associated user;
[0206] The identification information of the associated user includes at least one of the following information:
[0207] The identity of the associated user, the facial feature information of the associated user, the location information of the other terminal, the time when the associated user performs facial recognition on the other terminal, and the device identifier of the other terminal.
[0208] In a possible implementation manner, the other terminal having a specified position relationship with the target terminal includes at least one of the following terminals:
[0209] a terminal whose distance to the target terminal is within a specified distance interval;
[0210] A terminal in the same pre-divided area as the target terminal;
[0211] and a terminal in a user active area, wherein the user active area is determined based on an activity range of a user that has been matched in the target terminal.
[0212] To summarize, the template configuration device provided in the embodiment of the present application is applied to a server, and obtains users who have been matched in other terminals that have a specified position relationship with the target terminal as associated users of the target terminal, and sends the facial feature information template of the associated user to the target terminal, so that the target terminal stores the facial feature information templates in other terminals that have a specified position relationship with the target terminal in the local feature library, so that when the target terminal receives the facial feature information of the target face for the first time, it can retrieve the corresponding facial feature information template in the local database for face recognition, thereby improving the efficiency of face recognition.
[0213] Fig.12 1 is a structural block diagram of a computer device 1200 according to an exemplary embodiment. The computer device can be implemented as the server in the above solution of the present application.
[0214] The computer device 1200 includes a central processing unit (CPU) 1201, a system memory 1204 including a random access memory (RAM) 1202 and a read-only memory (ROM) 1203, and a system bus 1205 connecting the system memory 1204 and the central processing unit 1201. The computer device 1200 also includes a basic input / output system (I / O system) 1206 for facilitating information transmission between various components in the computer, and a large-capacity storage device 1207 for storing an operating system 1213, application programs 1214, and other program modules 1215.
[0215] The basic input / output system 1206 includes a display 1208 for displaying information and an input device 1209 such as a mouse and a keyboard for user inputting information. The display 1208 and the input device 1209 are connected to the central processing unit 1201 through an input / output controller 1210 connected to the system bus 1205. The basic input / output system 1206 may also include an input / output controller 1210 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1210 also provides output to a display screen, a printer, or other types of output devices.
[0216] The mass storage device 1207 is connected to the central processing unit 1201 through a mass storage controller (not shown) connected to the system bus 1205. The mass storage device 1207 and its associated computer readable medium provide non-volatile storage for the computer device 1200. That is, the mass storage device 1207 may include a computer readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0217] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM) flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above. The above-mentioned system memory 704 and mass storage device 1207 can be collectively referred to as memory.
[0218] According to various embodiments of the present disclosure, the computer device 1200 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 1200 can be connected to the network 1212 through the network interface unit 1211 connected to the system bus 1205, or the network interface unit 1211 can be used to connect to other types of networks or remote computer systems (not shown).
[0219] The memory also includes at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is stored in the memory. The central processing unit 1201 implements all or part of the steps in the face recognition method and template configuration method shown in the above-mentioned embodiments by executing the at least one instruction, at least one program, code set or instruction set.
[0220] Fig.13 is a block diagram of a computer device 1300 according to an exemplary embodiment. The computer device 1300 may be Figure 1 The terminal in the face recognition system shown.
[0221] Typically, the computer device 1300 includes a processor 1301 and a memory 1302 .
[0222] The processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1301 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0223] The memory 1302 may include one or more computer-readable storage media, which may be non-transitory. The memory 1302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1302 is used to store at least one instruction, which is used to be executed by the processor 1301 to implement the method provided in the method embodiment of the present application.
[0224] In some embodiments, the computer device 1300 may also optionally include: a peripheral device interface 1303 and at least one peripheral device. The processor 1301, the memory 1302 and the peripheral device interface 1303 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1303 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1304, a display screen 1305, a camera assembly 1306, an audio circuit 1307 and a power supply 1309.
[0225] In some embodiments, the computer device 1300 further includes one or more sensors 1310 , including but not limited to: an acceleration sensor 1311 , a gyroscope sensor 1312 , a pressure sensor 1313 , an optical sensor 1315 , and a proximity sensor 1316 .
[0226] Those skilled in the art will understand that Fig.13 The structure shown in the figure does not constitute a limitation on the computer device 1300, and the computer device 1300 may include more or less components than shown in the figure, or combine some components, or adopt a different component arrangement.
[0227] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory including at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set can be executed by a processor to perform the above Figure 2 Figure 3 or Figure 5 All or part of the steps of the method shown in any embodiment. For example, the non-transitory computer-readable storage medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0228] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned Figure 2 , Figure 3 or Figure 5 All or part of the steps of the method shown in any embodiment.
[0229] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0230] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A face recognition method, characterized in that: The method is performed by a target terminal, and the method includes: Sending a second heartbeat request to the server at a frequency of a second period to instruct the server to filter out, based on the location information of the target terminal, users corresponding to the newly added and / or updated user identification information in the local feature library of other terminals having a specified location relationship with the target terminal within the second period from the background feature library corresponding to the server as associated users of the target terminal; the other terminals are terminals in a user active area, the user active area is an area with the most reference users, or the user active area is an area where the number of the reference users passing through is greater than a preset threshold; or the other terminals are terminals where the number of matched reference users is greater than a number threshold; wherein the reference users are users that have been matched in the target terminal; Receive a heartbeat response data packet returned by the server; the heartbeat response data packet is returned by the server to the second heartbeat request periodically sent by the target terminal; Acquire the facial feature information template of the associated user carried in the heartbeat response data packet, which has been matched in the other terminals and has not been matched in the target terminal; the facial feature information template of the associated user is a second type feature template; The facial feature information template of the associated user is stored in a local feature library corresponding to the target terminal; the local feature library also stores the facial feature information template of the user that has been matched in the target terminal, and the facial feature information template of the user that has been matched in the target terminal is a first type feature template; Obtain facial feature information of the target face; Matching the facial feature information with each of the first type feature templates; In response to the facial feature information not matching each of the first-type feature templates, matching the facial feature information with each of the second-type feature templates; In response to a match between the facial feature information template of the target user and the facial feature information, taking the target user as a user corresponding to the target face; In response to the facial feature information not matching each of the second-type feature templates, it is determined that the user to whom the target face belongs has not been matched on the target terminal and the other terminals, and the facial feature information is sent to the server, so that the server performs face recognition based on the facial feature information template in the background feature library and then feeds back the recognition result to the target terminal; Through the first heartbeat request, the identification information of the target user is reported to the server to instruct the server to share the updated user identification information in the local feature library with the other terminals, and at the same time, update the data in the background feature library corresponding to the server based on the updated user identification information.
2. The method according to claim 1, characterized in that: The identification information of the target user includes at least one of the following information: The target user's identity, the target user's facial feature information, the target terminal's location information, the time when the target user performs facial recognition on the target terminal, and the target terminal's device identification.
3. The method according to claim 2, characterized in that The first heartbeat request is a request sent to the server at a regular interval.
4. The method according to claim 1, characterized in that: The method further comprises: Acquire the update time of the face feature information template in the local feature library; the update time is the time when the corresponding user was last matched in the designated terminal, and the designated terminal includes the target terminal and the other terminals; Among the facial feature information templates in the local feature library, the facial feature information templates whose duration between the corresponding update time and the current time is greater than the duration threshold are deleted.
5. A template configuration method, characterized in that: The method is executed by a server, and comprises: Receiving a second heartbeat request sent by the target terminal at a frequency of a second period; For the second heartbeat request, based on the location information of the target terminal, users corresponding to the newly added and / or updated user identification information in the local feature library of other terminals having a specified location relationship with the target terminal within the second period are screened out from the background feature library corresponding to the server as associated users of the target terminal; the other terminals are terminals in a user active area, the user active area is an area with the most reference users, or the user active area is an area where the number of the reference users passing through is greater than a preset threshold; or the other terminals are terminals where the number of matched reference users is greater than a quantity threshold; wherein the reference users are users who have been matched in the target terminal; Acquire the facial feature information template of the associated user that has been matched in the other terminals and has not been matched in the target terminal; the facial feature information template of the associated user is a second type feature template; The facial feature information template of the associated user is sent to the target terminal in the form of a heartbeat response data packet, and the target terminal stores the facial feature information template of the associated user in a local feature library corresponding to the target terminal, so that the target terminal obtains the facial feature information of the target face and matches the facial feature information in the local feature library; the local feature library also stores the facial feature information templates of users that have been matched in the target terminal, and the facial feature information templates of users that have been matched in the target terminal are first type feature templates; The method further comprises: Receiving a first heartbeat request sent by the target terminal; sharing the updated user identification information in the local feature library of the target terminal with the other terminals according to the first heartbeat request, and updating the data in the background feature library based on the updated user identification information; The target terminal obtains facial feature information of the target face and matches the facial feature information in the local feature library, including: Match the facial feature information with each of the first-type feature templates; in response to the facial feature information not matching each of the first-type feature templates, match the facial feature information with each of the second-type feature templates; in response to the facial feature information template of the target user matching the facial feature information, take the target user as the user corresponding to the target face; in response to the facial feature information not matching each of the second-type feature templates, determine that the user to which the target face belongs has not been matched on the target terminal and the other terminals, send the facial feature information to the server, so that the server performs facial recognition based on the facial feature information template in the background feature library, and then feeds back the recognition result to the target terminal.
6. The method according to claim 5, characterized in that The method further comprises: Receiving identification information of the associated user uploaded by the other terminal; updating the facial feature information template of the associated user according to the identification information of the associated user; The identification information of the associated user includes at least one of the following information: The identity of the associated user, the facial feature information of the associated user, the location information of the other terminal, the time when the associated user performs facial recognition on the other terminal, and the device identifier of the other terminal.
7. A face recognition device, characterized in that: The device is applied to a target terminal, and the device includes: A second acquisition module is used to send a second heartbeat request to the server at a frequency of a second period to instruct the server to filter out users corresponding to the newly added and / or updated user identification information in the local feature library of other terminals having a specified position relationship with the target terminal within the second period from the background feature library corresponding to the server based on the location information of the target terminal as associated users of the target terminal; the other terminals are terminals in a user active area, the user active area is an area with the most reference users, or the user active area is an area where the number of the reference users passing through is greater than a preset threshold; or the other terminals are terminals where the number of matched reference users is greater than a number threshold; wherein the reference users are users that have been matched in the target terminal; receiving a heartbeat response data packet returned by the server; the heartbeat response data packet is returned by the server to the target terminal by the second heartbeat request sent periodically; obtaining a facial feature information template of the associated user carried in the heartbeat response data packet, which has been matched in the other terminals and not matched in the target terminal; the facial feature information template of the associated user is a second type feature template; A storage module, used to store the facial feature information template of the associated user in a local feature library corresponding to the target terminal; the local feature library also stores the facial feature information template of the user that has been matched in the target terminal, and the facial feature information template of the user that has been matched in the target terminal is a first type feature template; The first acquisition module is used to acquire facial feature information of a target face; a matching module, configured to match the facial feature information with each of the first-type feature templates; and in response to the facial feature information not matching each of the first-type feature templates, matching the facial feature information with each of the second-type feature templates; A recognition module, configured to, in response to a match between a face feature information template of a target user and the face feature information, identify the target user as a user corresponding to the target face; A module for performing the following steps: in response to the facial feature information not matching each of the second-type feature templates, determining that the user to whom the target face belongs has not been matched on the target terminal and the other terminals, sending the facial feature information to the server, so that the server performs face recognition based on the facial feature information template in the background feature library and then feeds back the recognition result to the target terminal; The reporting module is used to report the identification information of the target user to the server through the first heartbeat request to instruct the server to share the updated user identification information in the local feature library with the other terminals, and at the same time, update the data in the background feature library corresponding to the server based on the updated user identification information.
8. The device according to claim 7, characterized in that The identification information of the target user includes at least one of the following information: The target user's identity, the target user's facial feature information, the target terminal's location information, the time when the target user performs facial recognition on the target terminal, and the target terminal's device identification.
9. The device according to claim 8, characterized in that The first heartbeat request is a request sent to the server at a regular interval.
10. The device according to claim 7, characterized in that The device also includes: A third acquisition module is used to obtain the update time of the face feature information template in the local feature library; the update time is the time when the corresponding user is most recently matched in the designated terminal, and the designated terminal includes the target terminal and the other terminals; The deletion module is used to delete the facial feature information templates in the local feature library whose corresponding update time and current time have a duration greater than a duration threshold.
11. A template configuration device, characterized in that: The device is applied in a server, and comprises: A module for performing the following steps: receiving a second heartbeat request sent by a target terminal at a frequency of a second period; A first acquisition module is used for selecting, for the second heartbeat request, based on the location information of the target terminal, from the background feature library corresponding to the server, users corresponding to the user identification information newly added and / or updated in the local feature library of other terminals having a specified location relationship with the target terminal within the second period as associated users of the target terminal; the other terminals are terminals in a user active area, the user active area is an area with the most reference users, or the user active area is an area where the number of the reference users passing through is greater than a preset threshold; or the other terminals are terminals where the number of matched reference users is greater than a number threshold; wherein the reference users are users that have been matched in the target terminal; A second acquisition module is used to acquire the facial feature information template of the associated user that has been matched in the other terminals and has not been matched in the target terminal; the facial feature information template of the associated user is a second type feature template; A sending module, used for sending the facial feature information template of the associated user to the target terminal in the form of a heartbeat response data packet, and the target terminal stores the facial feature information template of the associated user in a local feature library corresponding to the target terminal, so that the target terminal obtains the facial feature information of the target face, and matches the facial feature information in the local feature library; the local feature library also stores the facial feature information templates of users that have been matched in the target terminal, and the facial feature information templates of users that have been matched in the target terminal are first type feature templates; The apparatus also includes means for performing the following steps: Receiving a first heartbeat request sent by the target terminal; sharing the updated user identification information in the local feature library of the target terminal with the other terminals according to the first heartbeat request, and updating the data in the background feature library based on the updated user identification information; The target terminal obtains facial feature information of the target face and matches the facial feature information in the local feature library, including: Match the facial feature information with each of the first-type feature templates; in response to the facial feature information not matching each of the first-type feature templates, match the facial feature information with each of the second-type feature templates; in response to the facial feature information template of the target user matching the facial feature information, take the target user as the user corresponding to the target face; in response to the facial feature information not matching each of the second-type feature templates, determine that the user to which the target face belongs has not been matched on the target terminal and the other terminals, send the facial feature information to the server, so that the server performs facial recognition based on the facial feature information template in the background feature library, and then feeds back the recognition result to the target terminal.
12. The device according to claim 11, characterized in that The device also includes: A receiving module, configured to receive the identification information of the associated user uploaded by the other terminal; An updating module, used for updating the facial feature information template of the associated user according to the identification information of the associated user; The identification information of the associated user includes at least one of the following information: The identity of the associated user, the facial feature information of the associated user, the location information of the other terminal, the time when the associated user performs facial recognition on the other terminal, and the device identifier of the other terminal.
13. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set; The at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the face recognition method as described in any one of claims 1 to 4; or, the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the template configuration method as described in claim 5 or 6.
14. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set; The at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the face recognition method as described in any one of claims 1 to 4; or, the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the template configuration method as described in claim 5 or 6.
Citation Information
Patent Citations
Human face identification efficiency improvement method
CN108009482A
Face-scanning payment method and device, readable storage medium and terminal equipment
CN110378696A