Contact search method, device, equipment and storage medium

By performing gender recognition and feature vector matching on user images, the problem of inaccurate contact retrieval due to duplicate names in the existing technology is solved, and more efficient contact data retrieval is achieved.

CN115809350BActive Publication Date: 2025-09-12BEIJING HYDROPHIS NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211508599.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-09-12
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

Existing contact information retrieval methods mainly rely on names or titles, which results in an inability to accurately retrieve corresponding contacts in the case of duplicate names, resulting in low retrieval accuracy and efficiency.

Method used

By receiving the user image to be retrieved, the image is segmented to extract the face area, the gender is identified using the pre-built gender recognition model, the contact images of similar gender in the contact database are screened, and the image similarity is screened based on the feature vector, and finally the target contact data is retrieved.

Benefits of technology

It improves the accuracy and efficiency of contact retrieval, reduces false detection of duplicate names due to similar appearances, narrows the search scope, and ensures the uniqueness and efficiency of the search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115809350B_ABST
    Figure CN115809350B_ABST
Patent Text Reader

Abstract

The present invention relates to data retrieval technology and discloses a contact retrieval method, comprising: segmenting a user image to be retrieved to obtain a user image containing a face region; performing gender identification on the user image using a gender recognition model to obtain an identification result; extracting the contact image and contact gender of each contact in a contact database, and filtering all contact images using the identification result and the contact gender to obtain an initial contact image; obtaining a contact feature vector for the initial contact image, extracting the median value of the model when the gender recognition model is used to identify the gender of the user image, and obtaining a user feature vector; filtering all initial contact images based on the contact feature vector and the user feature vector, and searching all contact data based on the screening result to obtain a retrieval result. The present invention also provides a contact retrieval device, equipment, and medium. The present invention can improve the accuracy and efficiency of contact retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to data retrieval technology, and in particular to a contact retrieval method, device, electronic device and storage medium. Background Art

[0002] Contact information is one of the most important pieces of information in modern society. People can use contact storage to record contact-related information, such as phone numbers, emails, IM (Instant Messaging), addresses, websites, names, titles, etc. This information is the most important record in daily communication.

[0003] Existing contact information retrieval methods mainly search based on contact names or titles, such as "Zhang San" and "Mr. Li". Using this contact information retrieval method, when encountering duplicate names, the corresponding contact cannot be accurately retrieved. For example, if the address book contains two people named "Mr. Li", the contact retrieval accuracy and efficiency are low. Summary of the Invention

[0004] The present invention provides a contact retrieval method, device, electronic device and storage medium, the main purpose of which is to improve the accuracy and efficiency of contact retrieval.

[0005] When receiving the user image to be retrieved, segmenting the user image to be retrieved to obtain the user image containing the face area;

[0006] Using a pre-built gender recognition model to perform gender recognition on the user image to obtain a gender recognition result;

[0007] Extracting the contact picture and contact gender of each contact in the preset contact database, and performing gender screening on all contact pictures using the gender recognition result and the contact gender to obtain an initial contact picture;

[0008] Extracting the output value of the fully connected layer in the model when the gender recognition model performs gender recognition on the user image to obtain a user feature vector, and obtaining the contact feature vector of the initial contact image from the contact database;

[0009] All initial contact pictures are screened for picture similarity based on the contact feature vector and the user feature vector, and contact data in the contact database is retrieved based on the screening result to obtain target contact data.

[0010] Optionally, performing gender recognition on the user image using a pre-built gender recognition model to obtain a gender recognition result includes:

[0011] Converting the user image into a matrix form to obtain a user image matrix;

[0012] Performing convolution pooling on the user image matrix using the feature extraction network in the gender recognition model to obtain a convolution pooling matrix;

[0013] Using the attention network constructed based on the attention mechanism in the gender recognition model to perform attention weighting on the convolution pooling matrix to obtain a weighted feature matrix;

[0014] Utilizing the feature compression layer in the gender recognition model to perform dimension compression on the weighted feature matrix to obtain gender feature values ​​of different genders;

[0015] Normalizing the gender feature values ​​of each gender based on all the gender feature values ​​and a preset classification function to obtain a gender recognition probability of the corresponding gender;

[0016] The gender recognition result is determined according to the gender recognition probability and a preset recognition threshold.

[0017] Optionally, determining the gender recognition result according to the gender recognition probability and a preset recognition threshold includes:

[0018] Determining whether there is a gender recognition probability greater than the recognition threshold;

[0019] When there is a gender recognition probability greater than the recognition threshold, the gender corresponding to the maximum gender recognition probability is determined as the gender recognition result;

[0020] When there is no gender recognition probability greater than the recognition threshold, all the genders are aggregated into a gender recognition result.

[0021] Optionally, the step of performing gender screening on all contact pictures using the gender recognition result and the contact gender to obtain an initial contact picture includes:

[0022] Determine the gender of the contact in the gender recognition result as the gender of the target contact;

[0023] The contact picture of the contact of the target contact's gender is determined as the initial contact picture.

[0024] Optionally, extracting the output value of the fully connected layer in the model when the gender recognition model performs gender recognition on the user image to obtain the user feature vector includes:

[0025] Extracting output values ​​of all nodes in the penultimate fully connected layer of the gender model when the gender recognition model performs gender recognition on the user image to obtain an output value set;

[0026] According to the order of all nodes in the penultimate fully connected layer, all output values ​​in the output value set are combined to obtain the user feature vector.

[0027] Optionally, the performing picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector, and searching the contact data in the contact database based on the screening result to obtain target contact data, includes:

[0028] Performing picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector to obtain a target contact picture;

[0029] The contact data in the contact database is searched based on the target contact picture to obtain the target contact data.

[0030] Optionally, segmenting the user image to be retrieved to obtain the user image containing the face area includes:

[0031] Binarizing the user image to be retrieved to obtain a binary image;

[0032] Performing filtering on the binarized image to obtain a filtered image;

[0033] Performing edge detection on the filtered image using a pre-built edge detection operator to determine the coordinates of pixel points at the edge of the face region in the filtered image, thereby obtaining the edge pixel coordinates;

[0034] The area enclosed by the pixels corresponding to the coordinates of all edge pixels in the user image to be retrieved is segmented to obtain the user image.

[0035] In order to solve the above problem, the present invention further provides a contact retrieval device, the device comprising:

[0036] The image screening module is configured to, upon receiving a user image to be retrieved, segment the user image to be retrieved to obtain a user image containing a face region; perform gender identification on the user image using a pre-built gender identification model to obtain a gender identification result; extract the contact image and contact gender of each contact in a preset contact database, and perform gender screening on all contact images using the gender identification result and the contact gender to obtain an initial contact image;

[0037] a feature extraction module, configured to extract the output value of the fully connected layer in the gender recognition model when the gender recognition model performs gender recognition on the user image to obtain a user feature vector, and to obtain a contact feature vector of the initial contact image from the contact database;

[0038] The data retrieval module is used to perform picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector, and to retrieve the contact data in the contact database based on the screening result to obtain target contact data.

[0039] In order to solve the above problem, the present invention further provides an electronic device, comprising:

[0040] a memory storing at least one computer program; and

[0041] The processor executes the computer program stored in the memory to implement the contact retrieval method described above.

[0042] In order to solve the above problem, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer program, and the at least one computer program is executed by a processor in an electronic device to implement the above contact retrieval method.

[0043] The embodiment of the present invention extracts the contact picture and contact gender of each contact in a preset contact database, and uses the gender recognition result and the contact gender to perform gender screening on all contact pictures to obtain an initial contact picture; screening the contact pictures based on gender narrows the scope of contact retrieval. Furthermore, retrieval and matching based on face pictures are unique. Compared with the situation where duplicate names appear when querying using names or titles, the probability of having the same appearance is lower, and the corresponding contact data can be retrieved more accurately, and the retrieval efficiency is higher. Therefore, the contact retrieval method, device, electronic device and readable storage medium proposed in the embodiment of the present invention improve the accuracy and efficiency of contact retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A schematic diagram of a flow chart of a contact retrieval method provided by one embodiment of the present invention;

[0045] Figure 2 A schematic diagram of the modules of a contact retrieval device provided by an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing a contact retrieval method according to an embodiment of the present invention;

[0047] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0049] An embodiment of the present invention provides a contact retrieval method. The execution subject of the contact retrieval method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the contact retrieval method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server or 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, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0050] Reference Figure 1 FIG. 1 is a flow chart of a contact retrieval method provided by an embodiment of the present invention. In this embodiment of the present invention, the contact retrieval method includes:

[0051] S1. When receiving a user image to be retrieved, segment the user image to be retrieved to obtain a user image containing a face area;

[0052] In the embodiment of the present invention, the user pictures to be retrieved include facial images of contacts to be retrieved.

[0053] Furthermore, in order to improve the efficiency of image retrieval, in the embodiment of the present invention, the influence of irrelevant background in the user image to be retrieved is removed, and the face area in the user image is segmented to obtain the user image.

[0054] In detail, in an embodiment of the present invention, segmenting the user image to be retrieved to obtain the user image containing the face area includes:

[0055] Binarizing the user image to be retrieved to obtain a binary image;

[0056] Performing filtering on the binarized image to obtain a filtered image;

[0057] Performing edge detection on the filtered image using a pre-built edge detection operator to determine the coordinates of pixel points at the edge of the face region in the filtered image, thereby obtaining the edge pixel coordinates;

[0058] The area enclosed by the pixels corresponding to the coordinates of all edge pixels in the user image to be retrieved is segmented to obtain the user image.

[0059] Specifically, in one embodiment of the present invention, the edge detection operator may be a Sobel operator.

[0060] S2. Using a pre-built gender recognition model to perform gender recognition on the user image to obtain a gender recognition result;

[0061] The gender recognition model described in the embodiment of the present invention is a deep learning model composed of a feature extraction layer, an attention network, and a feature compression layer connected in series, which can identify the gender of the person in the picture.

[0062] In the embodiment of the present invention, the feature extraction layer includes multiple layers of convolutional layers and pooling layers, and the layers are connected in series. There is no restriction on the type and connection order of the convolutional layers and pooling layers. The attention network is an attention network constructed based on the self-attention mechanism. The feature compression layer is obtained by connecting multiple layers of fully connected layers in series, and the classification function can be a softmax function.

[0063] Specifically, in the embodiment of the present invention, the gender of the user image is identified using a pre-built gender identification model to obtain a gender identification result, including:

[0064] Converting the user image into a matrix form to obtain a user image matrix;

[0065] Performing convolution pooling on the user image matrix using the feature extraction network in the gender recognition model to obtain a convolution pooling matrix;

[0066] Using the attention network constructed based on the attention mechanism in the gender recognition model to perform attention weighting on the convolution pooling matrix to obtain a weighted feature matrix;

[0067] Utilizing the feature compression layer in the gender recognition model to perform dimension compression on the weighted feature matrix to obtain gender feature values ​​of different genders;

[0068] Normalizing the gender feature values ​​of each gender based on all the gender feature values ​​and a preset classification function to obtain a gender recognition probability of the corresponding gender;

[0069] The gender recognition result is determined according to the gender recognition probability and a preset recognition threshold.

[0070] Specifically, in the embodiment of the present invention, the user image is converted into a matrix form to obtain a user image matrix, including:

[0071] Step I: Obtain the feature value of each pixel in the user image in each RGB channel to obtain the channel feature value of the pixel in the corresponding channel;

[0072] For example, if the RGB values ​​of a pixel in the user image are r:30, g:35, and b:25, then the channel eigenvalue of the r channel of the pixel is 30, the channel eigenvalue of the g channel is 35, and the channel eigenvalue of the b channel is 25. Linearly connect the channel eigenvalues ​​of the same channel of all pixels in the user image to obtain the channel eigenvector of each channel;

[0073] Step II: Connect the channel feature values ​​of the same channel of all pixels in the user image according to a preset pixel order to obtain a channel vector for each channel;

[0074] For example, there are two rows and two columns of pixels in a user image. The order of the pixels is the first row, first column, first row, second column, second row, first column, and second row, second column. The channel eigenvalue of the r channel of the first row, first column pixel is 3, the channel eigenvalue of the r channel of the first row, second column pixel is 1, the channel eigenvalue of the r channel of the second row, first column pixel is 5, and the channel eigenvalue of the r channel of the second row, second column pixel is 4. Then the channel eigenvector of the r channel of the user image is

[0075]

[0076] Step III: Connect all the channel feature vectors according to a preset channel order to obtain the user picture matrix.

[0077] In the embodiment of the present invention, there is no restriction on the channel order. For example, the channel feature vector of the r channel is The channel eigenvector of the g channel is The channel feature vector of channel b is When the channel order is r channel, g channel, b channel, then the user picture vector is

[0078] Specifically, in an embodiment of the present invention, determining the gender recognition result according to the gender recognition probability and a preset recognition threshold includes:

[0079] Determining whether there is a gender recognition probability greater than the recognition threshold;

[0080] When there is a gender recognition probability greater than the recognition threshold, the gender corresponding to the maximum gender recognition probability is determined as the gender recognition result;

[0081] When there is no gender recognition probability greater than the recognition threshold, all the genders are aggregated into a gender recognition result.

[0082] S3. Extract the contact picture and contact gender of each contact in the preset contact database, and perform gender screening on all contact pictures using the gender recognition result and the contact gender to obtain an initial contact picture;

[0083] In order to narrow the search scope of similar contacts in the embodiment of the present invention, the gender recognition result is used to perform gender screening on all the contact pictures to obtain initial contact pictures.

[0084] Specifically, in the embodiment of the present invention, the method of using the gender recognition result and the gender of the contact to perform gender screening on all contact pictures to obtain an initial contact picture includes:

[0085] Determine the gender of the contact in the gender recognition result as the gender of the target contact;

[0086] The contact picture of the contact of the target contact's gender is determined as the initial contact picture.

[0087] For example, if the gender recognition result is male, then male is determined as the gender of the target contact, and the contact picture of the contact whose gender is male is determined as the initial contact picture.

[0088] S4. Extracting the output value of the fully connected layer in the model when the gender recognition model performs gender recognition on the user image to obtain a user feature vector, and obtaining a contact feature vector of the initial contact image from the contact database;

[0089] In order to better characterize the image features of the initial contact picture in the embodiment of the present invention, a contact feature vector of the initial contact picture is obtained. The contact feature vector is obtained by extracting features from the initial contact picture using the gender recognition model.

[0090] Furthermore, in order to obtain the features of the user image and facilitate comparison of different images in the embodiment of the present invention, the output value of the fully connected layer in the model when the gender recognition model performs gender recognition on the user image is extracted to obtain a user feature vector to characterize the user image features.

[0091] Specifically, in the embodiment of the present invention, extracting the output value of the fully connected layer in the model when the gender recognition model performs gender recognition on the user image to obtain the user feature vector includes:

[0092] Step A: extracting the output values ​​of all nodes in the penultimate fully connected layer of the gender recognition model when the gender recognition model performs gender recognition on the user image, to obtain an output value set;

[0093] The gender recognition model described in this embodiment of the present invention maps the extracted features in the user image matrix into identification feature values ​​of different genders through the last fully connected layer. In order to obtain the features extracted by the gender recognition model in the user image matrix, the input value of the last fully connected layer in the gender recognition model, that is, the output value of the second-to-last fully connected layer, is obtained. Therefore, when the user image matrix is ​​input into the gender recognition model to perform gender recognition of the user image, the output values ​​of all nodes in the second-to-last fully connected layer in the gender recognition model are the feature values ​​of the user image, which are used to identify the features of the user image.

[0094] For example, the penultimate fully connected layer of the gender recognition model has a total of 100 nodes. The user image matrix is ​​input into the gender recognition model, and the output values ​​of the 100 nodes of the penultimate fully connected layer are obtained to obtain an output value set, where each output value represents a portion of the features of the initial user image.

[0095] Step B: According to the order of all nodes in the penultimate fully connected layer, all output values ​​in the output value set are combined to obtain the user feature vector.

[0096] In detail, in the embodiment of the present invention, before obtaining the contact feature vector of the initial contact picture from the contact database, the method further includes:

[0097] Converting the initial contact picture into a matrix form to obtain a contact picture matrix;

[0098] Inputting the contact image matrix into the gender recognition model, and obtaining the output values ​​of all nodes in the penultimate fully connected layer in the gender recognition model to obtain a contact output value set;

[0099] According to the order of all nodes in the penultimate fully connected layer, all output values ​​in the contact output value set are combined to obtain a contact feature vector of the initial contact picture.

[0100] S5. Performing picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector, and searching the contact data in the contact database based on the screening result to obtain target contact data.

[0101] In order to filter the contact data of the contacts whose initial contact pictures are similar to the user picture, S5 in the embodiment of the present invention includes:

[0102] Performing picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector to obtain a target contact picture;

[0103] The contact data in the contact database is searched based on the target contact picture to obtain the target contact data.

[0104] Specifically, in the embodiment of the present invention, the process of performing picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector to obtain a target contact picture includes:

[0105] Calculating the vector similarity between the user feature vector and each of the contact feature vectors;

[0106] Screening all the contact feature vectors according to a preset vector similarity threshold and the vector similarity to obtain a target contact feature vector;

[0107] The initial contact picture corresponding to the target contact feature vector is determined as the target contact picture.

[0108] Furthermore, in an embodiment of the present invention, all the contact feature vectors are screened according to a preset vector similarity threshold and the vector similarity to obtain a target contact feature vector, including:

[0109] Determining a vector similarity greater than the similarity threshold as an initial vector similarity;

[0110] Filtering the maximum value among all the initial vector similarities to obtain the target vector similarity;

[0111] Furthermore, in the embodiment of the present invention, the contact data of the contact to which the target contact picture belongs is retrieved from the contact database to obtain the target contact data.

[0112] In an embodiment of the present invention, after the contact data in the contact database is retrieved based on the target contact picture and the target contact data is obtained, the target contact data can also be sent to the terminal device that sent the contact request and / or the preset terminal device, wherein the terminal device is an intelligent terminal device that can receive data and parse and display contact data, including but not limited to: mobile phones, computers, tablets, etc.

[0113] like Figure 2 FIG. 1 is a functional module diagram of the contact search device of the present invention.

[0114] The contact retrieval device 100 of the present invention can be installed in an electronic device. Depending on the functionality implemented, the contact retrieval device may include an image screening module 101, a feature extraction module 102, and a data retrieval module 103. A module, also referred to as a unit, is a series of computer program segments that can be executed by a processor of an electronic device and perform a fixed function, and is stored in the memory of the electronic device.

[0115] In this embodiment, the functions of each module / unit are as follows:

[0116] The image screening module 101 is configured to, upon receiving a user image to be retrieved, segment the user image to be retrieved to obtain a user image containing a face region; perform gender identification on the user image using a pre-built gender identification model to obtain a gender identification result; extract a contact image and contact gender of each contact in a preset contact database, and perform gender screening on all contact images using the gender identification result and the contact gender to obtain an initial contact image;

[0117] The feature extraction module 102 is used to extract the output value of the fully connected layer in the model when the gender recognition model performs gender recognition on the user image to obtain a user feature vector, and obtain the contact feature vector of the initial contact image from the contact database;

[0118] The data retrieval module 103 is configured to perform image similarity screening on all initial contact images based on the contact feature vector and the user feature vector, and to retrieve contact data in the contact database based on the screening result to obtain target contact data.

[0119] In detail, each module in the contact search device 100 according to the embodiment of the present invention adopts the same method as above when in use. Figure 1 The contact retrieval method described in the present invention is the same as the technical means and can produce the same technical effects, so it will not be repeated here.

[0120] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing the contact retrieval method of the present invention.

[0121] The electronic device may include a processor 10 , a memory 11 , a communication bus 12 , and a communication interface 13 , and may further include a computer program stored in the memory 11 and executable on the processor 10 , such as a contact retrieval program.

[0122] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Furthermore, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can be used not only to store application software and various types of data installed in the electronic device, such as the code of a contact retrieval program, but also to temporarily store data that has been output or is to be output.

[0123] In some embodiments, the processor 10 may be comprised of an integrated circuit, such as a single packaged integrated circuit or a plurality of packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (control unit) of the electronic device, connecting the various components of the entire electronic device using various interfaces and circuits. It executes programs or modules stored in the memory 11 (such as a contact search program) and accesses data stored in the memory 11 to perform various functions of the electronic device and process data.

[0124] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Such a bus may be classified as an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to enable communication between the memory 11 and at least one processor 10. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0125] Figure 3 Only the electronic device with components is shown, and it can be understood by those skilled in the art that Figure 3The structure shown does not limit the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0126] For example, although not shown, the electronic device may further include a power source (such as a battery) for powering various components. Preferably, the power source may be logically connected to the at least one processor 10 via a power management device, thereby implementing functions such as charging management, discharging management, and power consumption management through the power management device. The power source may further include any components such as one or more DC or AC power sources, a recharging device, a power failure classification circuit, a power converter or inverter, a power status indicator, etc. The electronic device may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0127] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.

[0128] Optionally, the communication interface 13 may further include a user interface, which may be a display or an input unit (such as a keyboard). Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0129] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0130] The contact retrieval program stored in the memory 11 of the electronic device is a combination of multiple computer programs. When running in the processor 10, it can achieve the following:

[0131] When receiving the user image to be retrieved, segmenting the user image to be retrieved to obtain the user image containing the face area;

[0132] Using a pre-built gender recognition model to perform gender recognition on the user image to obtain a gender recognition result;

[0133] Extracting the contact picture and contact gender of each contact in the preset contact database, and performing gender screening on all contact pictures using the gender recognition result and the contact gender to obtain an initial contact picture;

[0134] Extracting the output value of the fully connected layer in the model when the gender recognition model performs gender recognition on the user image to obtain a user feature vector, and obtaining the contact feature vector of the initial contact image from the contact database;

[0135] All initial contact pictures are screened for picture similarity based on the contact feature vector and the user feature vector, and contact data in the contact database is retrieved based on the screening result to obtain target contact data.

[0136] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0137] Furthermore, if the module / unit integrated into the electronic device is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, or read-only memory (ROM).

[0138] An embodiment of the present invention may further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor of an electronic device, the computer program may implement:

[0139] When receiving the user image to be retrieved, segmenting the user image to be retrieved to obtain the user image containing the face area;

[0140] Using a pre-built gender recognition model to perform gender recognition on the user image to obtain a gender recognition result;

[0141] Extracting the contact picture and contact gender of each contact in the preset contact database, and performing gender screening on all contact pictures using the gender recognition result and the contact gender to obtain an initial contact picture;

[0142] Extracting the output value of the fully connected layer in the model when the gender recognition model performs gender recognition on the user image to obtain a user feature vector, and obtaining the contact feature vector of the initial contact image from the contact database;

[0143] All initial contact pictures are screened for picture similarity based on the contact feature vector and the user feature vector, and contact data in the contact database is retrieved based on the screening result to obtain target contact data.

[0144] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0145] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical function division, and other division methods may be used in actual implementation.

[0146] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.

[0147] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) 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 achieve optimal results.

[0148] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.

[0149] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0150] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.

[0151] Blockchain, as used in this article, refers to a novel application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each block contains information about a batch of online transactions, used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0152] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. Second-order terms are used to indicate names and do not imply any particular order.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A contact retrieval method, characterized in that: The method comprises: When receiving the user image to be retrieved, segmenting the user image to be retrieved to obtain the user image containing the face area; Converting the user image into a matrix form to obtain a user image matrix, performing convolution pooling on the user image matrix using a feature extraction network in a pre-built gender recognition model to obtain a convolution pooling matrix, performing attention weighting on the convolution pooling matrix using an attention network in the gender recognition model to obtain a weighted feature matrix, performing dimension compression on the weighted feature matrix using a feature compression layer in the gender recognition model to obtain gender feature values ​​of different genders, normalizing the gender feature value of each gender based on all the gender feature values ​​and a preset classification function to obtain a gender recognition probability of the corresponding gender, and determining a gender recognition result based on the gender recognition probability and a preset recognition threshold; Extracting the contact picture and contact gender of each contact in the preset contact database, and performing gender screening on all contact pictures using the gender recognition result and the contact gender to obtain an initial contact picture; extracting output values ​​of all nodes in the penultimate fully connected layer of the gender model when the gender recognition model performs gender recognition on the user image to obtain an output value set; combining all output values ​​in the output value set according to the order of all nodes in the penultimate fully connected layer to obtain a user feature vector; converting the initial contact image into a matrix form to obtain a contact image matrix; and extracting a contact feature vector from the contact image matrix using the gender recognition model; All initial contact pictures are screened for picture similarity based on the contact feature vector and the user feature vector, and contact data in the contact database is retrieved based on the screening result to obtain target contact data.

2. The contact retrieval method according to claim 1, wherein: The determining the gender recognition result according to the gender recognition probability and a preset recognition threshold includes: Determining whether there is a gender recognition probability greater than the recognition threshold; When there is a gender recognition probability greater than the recognition threshold, the gender corresponding to the maximum gender recognition probability is determined as the gender recognition result; When there is no gender recognition probability greater than the recognition threshold, all the genders are aggregated into a gender recognition result.

3. The contact search method according to claim 1, wherein: The step of performing gender screening on all contact pictures using the gender recognition result and the contact gender to obtain an initial contact picture includes: Determine the gender of the contact in the gender recognition result as the gender of the target contact; The contact picture of the contact of the target contact's gender is determined as the initial contact picture.

4. The contact search method according to claim 1, wherein: The performing picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector, and searching the contact data in the contact database based on the screening result to obtain target contact data, includes: Performing picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector to obtain a target contact picture; The contact data in the contact database is searched based on the target contact picture to obtain the target contact data.

5. The contact search method according to any one of claims 1 to 4, characterized in that: The step of segmenting the user image to be retrieved to obtain a user image containing a face area includes: Binarizing the user image to be retrieved to obtain a binary image; Performing filtering on the binarized image to obtain a filtered image; Performing edge detection on the filtered image using a pre-built edge detection operator to determine the coordinates of pixel points at the edge of the face region in the filtered image, thereby obtaining the edge pixel coordinates; The area enclosed by the pixels corresponding to the coordinates of all edge pixels in the user image to be retrieved is segmented to obtain the user image.

6. A contact search device, characterized in that: include: The image screening module is used to, upon receiving a user image to be retrieved, segment the user image to be retrieved to obtain a user image containing a face area; convert the user image into a matrix form to obtain a user image matrix; use the feature extraction network in the pre-built gender recognition model to perform convolution pooling on the user image matrix to obtain a convolution pooling matrix; use the attention network in the gender recognition model to perform attention weighting on the convolution pooling matrix to obtain a weighted feature matrix; use the feature compression layer in the gender recognition model to perform dimension compression on the weighted feature matrix to obtain gender feature values ​​of different genders; normalize the gender feature value of each gender based on all the gender feature values ​​and a preset classification function to obtain a gender recognition probability of the corresponding gender; and determine the gender recognition result according to the gender recognition probability and a preset recognition threshold; Extracting the contact picture and contact gender of each contact in the preset contact database, and performing gender screening on all contact pictures using the gender recognition result and the contact gender to obtain an initial contact picture; a feature extraction module configured to extract the output values ​​of all nodes in the penultimate fully connected layer of the gender model when the gender recognition model performs gender recognition on the user image, obtaining an output value set; combining all output values ​​in the output value set according to the order of all nodes in the penultimate fully connected layer to obtain a user feature vector; converting the initial contact image into a matrix form to obtain a contact image matrix; and extracting a contact feature vector from the contact image matrix using the gender recognition model; The data retrieval module is used to perform picture similarity screening on all initial contact pictures based on the contact feature vector and the user feature vector, and to retrieve the contact data in the contact database based on the screening result to obtain target contact data.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the contact retrieval method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the contact retrieval method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Face recognition method and device, computer equipment and storage medium

    CN112949468A

  • Face gender and age recognition method and device, electronic equipment and storage medium

    CN114038044A