Face image recognition method, device and equipment based on position sequence

By fusing face feature vectors and historical position sequences to generate target vectors, the problem of inaccurate face image recognition in the prior art is solved, and a safer and more accurate face recognition is achieved.

CN119741747APending Publication Date: 2025-04-01ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411836189.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The prior art is difficult to accurately distinguish similar faces or faces that have not been brushed in facial image recognition, resulting in inaccurate recognition.

Method used

By obtaining the face image and target position, a face feature vector is generated, a similar vector to be confirmed is recalled, and its historical position sequence is obtained. Then, the historical position sequence and the target position are fused to generate the target vector to determine whether the user corresponding to the vector to be confirmed is the user corresponding to the face image.

Benefits of technology

It realizes safer and more accurate facial image recognition, overcoming the problem of cold start of the initial face-scan user and refined determination during recall of similar users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741747A_ABST
    Figure CN119741747A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a face image recognition method, device and equipment based on a position sequence. The method comprises the steps of obtaining a face image, and determining a target position when the face image is obtained; generating a face feature vector corresponding to the face image, and recalling a to-be-confirmed vector similar to the face feature vector; acquiring a historical position sequence corresponding to the vector to be confirmed; fusing the historical position sequence and the target position to generate a target vector; and determining whether the user corresponding to the vector to be confirmed is the user corresponding to the face image or not according to a target vector. Therefore, the target position and the historical position sequence are learned, and the behavior of the user is further represented.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application submitted to the China Patent Office on March 3, 2022, with application number 202210210679.1, and invention name "A method, device and equipment for recognizing facial images based on position sequence". The full text of the application is incorporated into this application by reference. Technical Field

[0002] The present invention relates to the field of Internet technology, and in particular to a method, device and apparatus for recognizing facial images based on position sequences. Background Art

[0003] With the development of mobile Internet, the use of face recognition for identity recognition has become more and more widely used. Although computer vision algorithms can be used to obtain face comparison vectors more accurately, they need to be recalled on a scale of hundreds of millions. However, for a large number of similar faces or faces that have never been scanned, it will be difficult to distinguish whether it is the real person through vector comparison.

[0004] Based on this, a more secure and accurate facial image recognition method is needed. Summary of the invention

[0005] One or more embodiments of the present specification provide a method, apparatus, device and storage medium for recognizing facial images based on position sequences, so as to solve the following technical problem: a more secure and accurate facial image recognition solution is needed.

[0006] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0007] In a first aspect, an embodiment of the present specification provides a method for recognizing facial images based on a position sequence, comprising: acquiring a facial image, determining a target position when acquiring the facial image; generating a facial feature vector corresponding to the facial image, and recalling a vector to be confirmed that is similar to the facial feature vector; acquiring a historical position sequence corresponding to the vector to be confirmed; fusing the historical position sequence and the target position to generate a target vector; and determining, based on the target vector, whether the user corresponding to the vector to be confirmed is the user corresponding to the facial image.

[0008] In a second aspect, an embodiment of the present specification provides a facial image recognition device based on a position sequence, comprising: a first acquisition module, which acquires a facial image and determines a target position when acquiring the facial image; a recall module, which generates a facial feature vector corresponding to the facial image and recalls a vector to be confirmed that is similar to the facial feature vector; a second acquisition module, which acquires a historical position sequence corresponding to the vector to be confirmed; a fusion module, which fuses the historical position sequence and the target position to generate a target vector; and an identification module, which determines, based on the target vector, whether the user corresponding to the vector to be confirmed is the user corresponding to the facial image.

[0009] In a third aspect, an embodiment of the present specification provides an electronic device, including:

[0010] at least one processor; and,

[0011] a memory communicatively connected to the at least one processor; wherein,

[0012] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect.

[0013] In a fourth aspect, an embodiment of the present specification provides a non-volatile computer storage medium storing computer executable instructions. When a computer reads the computer executable instructions in the storage medium, the instructions enable one or more processors to execute the method described in the first aspect.

[0014] At least one of the above technical solutions adopted in one or more embodiments of this specification can achieve the following beneficial effects: by acquiring a face image, determine the target position when acquiring the face image; generate a face feature vector corresponding to the face image, and recall the vector to be confirmed that is similar to the face feature vector; obtain a historical position sequence corresponding to the vector to be confirmed; fuse the historical position sequence and the target position to generate a target vector; determine whether the user corresponding to the vector to be confirmed is the user corresponding to the face image according to the target vector. In this way, the target position and the historical position sequence are learned to further characterize the user's behavior, overcome the problems of cold start of the initial face scanning user and the need for refined determination when recalling similar users, and realize safer and more accurate recognition of face images. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0016] Figure 1 A schematic diagram of a flow chart of a method for recognizing facial images based on position sequences provided in an embodiment of this specification;

[0017] Figure 2 A schematic diagram of fusing the historical position sequence and the target position provided in an embodiment of this specification;

[0018] Figure 3 A timing diagram of face recognition provided by an embodiment of this specification;

[0019] Figure 4 A schematic diagram of a facial image recognition device based on position sequence provided in an embodiment of this specification;

[0020] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0021] The embodiments of this specification provide a method, apparatus, device and storage medium for recognizing facial images based on position sequences.

[0022] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0023] like Figure 1 As shown, Figure 1 A schematic flow chart of a method for recognizing facial images based on position sequences provided in an embodiment of this specification. Figure 1 The process in may include the following steps:

[0024] S101: Acquire a face image and determine a target position when acquiring the face image.

[0025] Usually, an application uses a face image when identity authentication is required. For example, when a user logs in or makes a payment using the application's client, the application provides a scanning box in the client to obtain the face image and send it to the server, which can then receive the face image.

[0026] At the same time, the client can obtain the instant location of the user when the face is scanned through the positioning device of the device where the application is located.

[0027] S103, generating a facial feature vector corresponding to the facial image, and recalling vectors to be confirmed that are similar to the facial feature vector.

[0028] The server can perform preliminary processing on the face image to obtain a face feature vector containing the face features, and then recall a vector to be confirmed that is similar to the face feature vector.

[0029] For example, the server can recall the first few facial feature vectors with the highest similarity to the generated facial feature vector based on a database of pre-stored facial feature vectors. For example, the server can recall the top 5 vectors with the spatial distance or cosine similarity to the generated facial feature vector as the vectors to be confirmed.

[0030] S105: Acquire a historical position sequence corresponding to the vector to be confirmed.

[0031] The historical location sequence is an ordered array containing the user's historical locations. The historical location can be the location when the user scans the code, pays, or activates the client in the client. The number of historical locations included in the historical location sequence can be customized based on actual needs.

[0032] For example, the historical position sequence contains the 20 historical positions closest to the current moment. In other words, the historical positions contained in the historical position sequence are dynamically adjusted and generated according to the time dimension. For example, the sequence composed of the past 20 historical positions generated today will be updated again tomorrow to generate the sequence composed of the most recent 20 historical positions.

[0033] S107, fusing the historical position sequence and the target position to generate a target vector.

[0034] Specifically, if Figure 2 As shown, Figure 2 A schematic diagram of fusing the historical position sequence and the target position provided in an embodiment of this specification.

[0035] Since the historical position sequence contains N positions, N is a natural number, for example, when N=3, it can be "Beijing, Beijing, Tianjin". Obviously, the vector embedding method can be used to vectorize the N vectors respectively, and convert the N positions into N embedded position vectors of the same dimension (for example, in Figure 2 In the same way, the target position can be converted into an embedded target vector with the same dimension.

[0036] Then, a subsequent model can be used to further fuse the features of the embedded position vector and the embedded target vector. For example, vector multiplication, concatenation, etc. can be used to achieve feature fusion to generate a target vector.

[0037] S109: Determine, according to the target vector, whether the user corresponding to the vector to be confirmed is the user corresponding to the face image.

[0038] The generated target vector contains the features of both the historical position sequence and the target position. Therefore, the target vector features can be identified using a fully connected layer to generate an evaluation result. The evaluation result is used to characterize the correlation between the historical position sequence and the target position, thereby determining whether the target position is reasonable.

[0039] If the correlation is not strong (usually characterized by the evaluation result not exceeding the preset threshold), it means that based on the historical location sequence, the target location is not a reasonable face scanning location (for example, the historical location sequence represents that the user often moves around Beijing, Tianjin, etc., and the target location occurs in Guangzhou, then it may be considered that the correlation is not strong), that is, the user corresponding to the vector to be confirmed is not the user corresponding to the facial image; otherwise, it can be considered that the user corresponding to the vector to be confirmed is the user corresponding to the facial image.

[0040] like Figure 3 As shown, Figure 3 A timing diagram of face recognition provided in an embodiment of this specification. In this diagram, the server generates a prediction result by calling the vector to be confirmed similar to the user's face vector and the corresponding historical position sequence for comprehensive evaluation and returns it to the user.

[0041] By acquiring a face image, determining the target position when acquiring the face image; generating a face feature vector corresponding to the face image, recalling the vector to be confirmed that is similar to the face feature vector; acquiring a historical position sequence corresponding to the vector to be confirmed; fusing the historical position sequence and the target position to generate a target vector; and determining whether the user corresponding to the vector to be confirmed is the user corresponding to the face image based on the target vector. In this way, the target position and the historical position sequence are learned to further characterize the user's behavior, overcome the problem of requiring refined determination when recalling similar users, and achieve safer and more accurate face image recognition.

[0042] In one embodiment, when fusing the N embedded position vectors and the embedded target vector to generate a target vector, the following method can be adopted: confirming the order of the N embedded position vectors in the historical position sequence; encoding and decoding the N embedded position vectors in sequence to generate N encoding vectors corresponding to the positions one by one, wherein the encoding input when encoding the i-th embedded position vector includes the encoding input when encoding the i-1-th embedded position vector, 1<i≤N; and fusing the N encoding vectors and the embedded target vector in sequence to generate a target vector.

[0043] like Figure 2 As shown in , the transformer layer can be used to encode and decode the N embedded position vectors. In the transformer layer, N encoders are included at the same time. All encoders have the same feature, that is, they receive a list of vectors (i.e., the aforementioned embedded position vectors), and each vector in the list has the same dimension size. In the initial encoder, it is the word vector, but in other encoders, it is the output of the encoder of the next layer, that is, the encoding input when encoding the i-th embedded position vector includes the encoding input when encoding the i-1-th embedded position vector, 1<i≤N.

[0044] At the same time, the transformer layer adds a sequential representation vector to each input embedding position vector, where the sequential representation vector is used to represent the order of the historical position corresponding to the embedding position vector in the historical position sequence. Then, the decoder can be used to decode the output of each encoder to generate N encoding vectors. In this way, the encoding vector output by each decoder also combines the sequential features and the features of the previous historical positions. The generated encoding vector has the same dimension as the embedding position vector and the embedding target vector.

[0045] Furthermore, the N encoding vectors and the embedded target vector can be fused in sequence to generate a target vector.

[0046] In one embodiment, when sequentially fusing the N encoding vectors and the embedded target vector to generate a target vector, the following method can be adopted: sequentially multiplying the N encoding vectors and the embedded target vector to generate corresponding N intermediate processing vectors; and splicing the N intermediate processing vectors to generate a target vector.

[0047] like Figure 2 As shown in , in the fusion process, for each coding vector, the same fusion unit can be used to sequentially multiply the N coding vectors and the embedded target vector to generate corresponding N intermediate processing vectors; then, the generated N intermediate processing vectors are spliced ​​to obtain the target vector.

[0048] In this process, the target vectors can be multiplied based on the pre-trained results, or weighted multiplication can be performed using different weights.

[0049] In one embodiment, when determining whether the user corresponding to the to-be-confirmed vector is the user corresponding to the face image based on the target vector, other user features may also be integrated based on the target vector to make a judgment.

[0050] For example, the user behavior sequence information of the user can also be integrated, including the user's age, gender, activation sequence, code scanning payment sequence, etc. The user behavior sequence information is also converted into a vector and integrated with the target vector.

[0051] Among them, when one-hot encoding is performed on user behavior sequence information, some features will be encoded as sparse features (for example, gender, age, etc.), while other features may be encoded as dense features.

[0052] Specifically, when one-hot encoding is performed on the features, the continuous features contained in the user behavior sequence information can be determined as dense features, and then a dense vector can be generated based on the dense features. For example, for the historical credit sequence evaluation of a user, it may be a vector containing multiple credit scores in the form of (7, 7.2, 8.1, 6.7), and after one-hot encoding, it may be a dense feature in the form of (010110100).

[0053] The continuous features contained in the user behavior sequence information can be determined as sparse features, and then a sparse vector can be generated based on the dense features. For example, the user's age may be encoded as a coded feature of (0001) or (0000).

[0054] At this time, different feature extraction methods can be used for the sparse vector and the dense vector respectively, and then fused, so as to concatenate the dense vector, the sparse vector and the target vector to generate a comprehensive feature vector, such as Figure 2As shown in . When the comprehensive feature vector is evaluated by using multiple fully connected layers, it can be determined according to the comprehensive feature vector whether the user corresponding to the vector to be confirmed is the user corresponding to the face image.

[0055] In one embodiment, the dense vector is processed in the following manner: Figure 2 As shown in , the dense features can be processed linearly to generate dense vectors. For example, a linear transformation function or a basic model of linear transformation, such as a model of linear transformation such as xgboost / lightgbm, can be used to generate dense vectors.

[0056] In one embodiment, the sparse vector can be obtained by fusing the dense feature and the sparse feature. Specifically, as mentioned above, the sparse feature can be firstly vector-embedded to obtain a plurality of corresponding feature vectors.

[0057] Furthermore, the sparse features and the dense features can be fused to generate a cross feature vector. For example, the feature vector and the dense features can be directly added to generate a cross feature vector, or a multiplication and concatenation method can be used to generate a cross feature vector. The specific method of fusing the cross feature vector can be determined based on actual needs.

[0058] For the obtained cross-feature vector, since it is actually a fusion of multiple sparse features. It is easy to understand that the correlation between the sparse features is not strong. Based on this, the cross-feature vector can be divided into multiple sub-vectors in a subspace manner (for example, the cross-feature vector can be converted into a high-dimensional vector, and then the high-dimensional vector is divided into multiple word vectors), and then, the corresponding multiple local models are used to process the multiple sub-vectors separately, generate corresponding multiple intermediate processing results, and splice the multiple intermediate processing results to generate a sparse vector.

[0059] In this process, each local model can process part of the sub-vectors. For any word vector, which local model to choose for processing can be selected based on the trained gating module. At the same time, the weight of each local model can also be pre-trained. By adopting this method, the sparse features in the user behavior sequence information can be better processed to help improve the accuracy of the model for face recognition.

[0060] Based on the same idea, one or more embodiments of this specification also provide devices and apparatuses corresponding to the above methods, such as Figure 4 , Figure 5 shown.

[0061] In the second aspect, Figure 4 As shown, Figure 4 A schematic diagram of a facial image recognition device based on position sequence provided in an embodiment of this specification, the device comprising:

[0062] A first acquisition module 401, acquiring a face image and determining a target position when acquiring the face image;

[0063] A recall module 403 generates a facial feature vector corresponding to the facial image, and recalls vectors to be confirmed that are similar to the facial feature vector;

[0064] A second acquisition module 405 is configured to acquire a historical position sequence corresponding to the vector to be confirmed;

[0065] A fusion module 407, fusing the historical position sequence and the target position to generate a target vector;

[0066] The identification module 409 determines, according to the target vector, whether the user corresponding to the vector to be confirmed is the user corresponding to the face image.

[0067] Optionally, the fusion module 407 determines N positions included in the historical position sequence, where N is a natural number; performs vector embedding on the N positions and the target position to generate N embedded position vectors corresponding to the N positions and an embedded target vector corresponding to the target position. The N embedded position vectors and the embedded target vector are fused to generate a target vector.

[0068] Optionally, the fusion module 407 confirms the order of the N embedded position vectors in the historical position sequence; encodes and decodes the N embedded position vectors in sequence to generate N encoding vectors corresponding to the positions one by one, wherein the encoding input when encoding the i-th embedded position vector includes the encoding input when encoding the i-1-th embedded position vector, 1<i≤N; and sequentially fuses the N encoding vectors and the embedded target vector to generate a target vector.

[0069] Optionally, the fusion module 407 sequentially multiplies the N encoding vectors and the embedded target vector to generate corresponding N intermediate processing vectors; and concatenates the N intermediate processing vectors to generate a target vector.

[0070] Optionally, the recognition module 409 obtains a dense vector and a sparse vector generated based on the user's behavior sequence information; concatenates the dense vector, the sparse vector and the target vector to generate a comprehensive feature vector; and determines whether the user corresponding to the vector to be confirmed is the user corresponding to the face image based on the comprehensive feature vector.

[0071] Optionally, the recognition module 409 determines the continuous features contained in the user's behavior sequence information as dense features, and generates a dense vector based on the dense features; and determines the discontinuous features contained in the user's behavior sequence information as sparse features, and fuses the dense features and the sparse features to generate a sparse vector.

[0072] Optionally, the recognition module 409 performs linear processing on the dense features to generate a dense vector.

[0073] Optionally, the recognition module 409 fuses the sparse features and the dense features to generate a cross feature vector; divides the cross feature vector into multiple sub-vectors; uses corresponding multiple local models to process the multiple sub-vectors respectively to generate corresponding multiple intermediate processing results; and splices the multiple intermediate processing results to generate a sparse vector.

[0074] In the third aspect, Figure 5 As shown, Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification, the device includes:

[0075] at least one processor; and,

[0076] a memory communicatively connected to the at least one processor; wherein,

[0077] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect.

[0078] In the fourth aspect, based on the same idea, one or more embodiments of the present specification also provide a non-volatile computer storage medium corresponding to the above method, storing computer executable instructions. When the computer reads the computer executable instructions in the storage medium, the instructions enable one or more processors to execute the method described in the first aspect.

[0079] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0080] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0081] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0082] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0083] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0084] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0085] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0087] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0088] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0089] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0090] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0091] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0092] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0093] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0094] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.

Claims

1. A method for recognizing facial images based on position sequences, comprising: Acquire a facial image, and determine a target position when acquiring the facial image; Generate a facial feature vector corresponding to the facial image, and recall vectors to be confirmed that are similar to the facial feature vector; Acquire a historical position sequence corresponding to the vector to be confirmed, where the historical position sequence includes the historical positions of the user; Fusion of the historical position sequence and the target position to generate a target vector; Determining whether the user corresponding to the vector to be confirmed is the user corresponding to the facial image according to the target vector, including: obtaining a dense vector and a sparse vector generated based on the user's behavior sequence information; splicing the dense vector, the sparse vector and the target vector to generate a comprehensive feature vector; determining whether the user corresponding to the vector to be confirmed is the user corresponding to the facial image according to the comprehensive feature vector.

2. The method of claim 1, wherein: Fusion of the historical position sequence and the target position to generate a target vector includes: Determine N positions included in the historical position sequence, where N is a natural number; Vector embedding is performed on the N positions and the target position to generate N embedded position vectors corresponding to the N positions and an embedded target vector corresponding to the target position. The N embedded position vectors and the embedded target vector are fused to generate a target vector.

3. The method of claim 2, wherein: Fusion of the N embedded position vectors and the embedded target vector to generate a target vector includes: confirming the order of the N embedded position vectors in the historical position sequence; Encode and decode the N embedded position vectors in sequence to generate N encoding vectors corresponding to the positions one by one, wherein the encoding input when encoding the i-th embedded position vector includes the encoding input when encoding the i-1-th embedded position vector, 1<i≤N; The N encoding vectors and the embedded target vector are sequentially fused to generate a target vector.

4. The method of claim 3, wherein: The N encoding vectors and the embedded target vector are sequentially fused to generate a target vector, including: Multiplying the N encoding vectors and the embedded target vector in sequence to generate corresponding N intermediate processing vectors; The N intermediate processing vectors are concatenated to generate a target vector.

5. The method of claim 1, wherein: Obtain dense vectors and sparse vectors generated based on the user's behavior sequence information, including: Determining continuous features included in the user's behavior sequence information as dense features, and generating a dense vector according to the dense features; And, determining the discontinuous features contained in the user's behavior sequence information as sparse features, and fusing the dense features and the sparse features to generate a sparse vector.

6. The method of claim 5, wherein: Generating a dense vector according to the dense feature includes: The dense features are linearly processed to generate dense vectors.

7. The method of claim 5, wherein: Fusion of the dense features and the sparse features to generate a sparse vector includes: Fusion of the sparse features and the dense features to generate a cross feature vector; Dividing the cross-feature vector into a plurality of sub-vectors; Using corresponding multiple local models to process the multiple sub-vectors respectively to generate corresponding multiple intermediate processing results; The multiple intermediate processing results are concatenated to generate a sparse vector.

8. A facial image recognition device based on position sequence, comprising: A first acquisition module, acquiring a face image and determining a target position when acquiring the face image; A recall module generates a facial feature vector corresponding to the facial image and recalls vectors to be confirmed that are similar to the facial feature vector; A second acquisition module is configured to acquire a historical position sequence corresponding to the vector to be confirmed, wherein the historical position sequence includes the historical positions of the user; A fusion module, fusing the historical position sequence and the target position to generate a target vector; The recognition module determines whether the user corresponding to the vector to be confirmed is the user corresponding to the face image according to the target vector, including: obtaining a dense vector and a sparse vector generated based on the user's behavior sequence information; splicing the dense vector, the sparse vector and the target vector to generate a comprehensive feature vector; and determining whether the user corresponding to the vector to be confirmed is the user corresponding to the face image according to the comprehensive feature vector.

9. The device of claim 8, wherein: The fusion module determines N positions included in the historical position sequence, where N is a natural number; Perform vector embedding on the N positions and the target position to generate N embedded position vectors corresponding to the N positions and an embedded target vector corresponding to the target position. Fusion of the N embedded position vectors and the embedded target vector generates a target vector.

10. The device of claim 9, wherein: The fusion module confirms the order of the N embedded position vectors in the historical position sequence; encodes and decodes the N embedded position vectors in sequence to generate N encoding vectors corresponding to the positions one by one, wherein the encoding input when encoding the i-th embedded position vector includes the encoding input when encoding the i-1-th embedded position vector, 1<i≤N; and sequentially fuses the N encoding vectors and the embedded target vector to generate a target vector.

11. The device of claim 10, wherein: The fusion module sequentially multiplies the N encoding vectors and the embedded target vector to generate corresponding N intermediate processing vectors; and splices the N intermediate processing vectors to generate a target vector.

12. The device of claim 8, wherein: The recognition module determines the continuous features included in the user's behavior sequence information as dense features, and generates a dense vector according to the dense features; and determines the discontinuous features included in the user's behavior sequence information as sparse features, The dense features and the sparse features are fused to generate a sparse vector.

13. The device of claim 12, wherein: The recognition module performs linear processing on the dense features to generate a dense vector.

14. The device of claim 12, wherein: The recognition module fuses the sparse features and the dense features to generate a cross feature vector; divides the cross feature vector into multiple sub-vectors; uses corresponding multiple local models to process the multiple sub-vectors respectively to generate corresponding multiple intermediate processing results; and splices the multiple intermediate processing results to generate a sparse vector.

15. An electronic device, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.