CN115658641A - Data processing method, data processing device, computer readable storage medium and computer equipment - Google Patents

Data processing method, data processing device, computer readable storage medium and computer equipment Download PDF

Info

Publication number
CN115658641A
CN115658641A CN202110767293.6A CN202110767293A CN115658641A CN 115658641 A CN115658641 A CN 115658641A CN 202110767293 A CN202110767293 A CN 202110767293A CN 115658641 A CN115658641 A CN 115658641A
Authority
CN
China
Prior art keywords
face
target
data
storage
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110767293.6A
Other languages
Chinese (zh)
Inventor
王少鸣
郭润增
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110767293.6A priority Critical patent/CN115658641A/en
Publication of CN115658641A publication Critical patent/CN115658641A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Collating Specific Patterns (AREA)

Abstract

The embodiment of the application discloses a data processing method, a data processing device, a computer readable storage medium and computer equipment; obtaining state information of target equipment; adjusting the storage quantity of the face data in the face database of the target equipment according to the state information; receiving the human face features to be recognized through the adjusted target equipment, and determining associated equipment for establishing network connection with the adjusted target equipment; and carrying out face recognition on the face features to be recognized according to the adjusted face databases of the target equipment and the associated equipment. Therefore, by acquiring the state information of the target device and adjusting the storage quantity of the face data in the face database of the target device according to the state information, the storage space occupied by the face database can be flexibly adjusted, the waste of the storage space is avoided, and the storage efficiency of the face database of the target device is improved.

Description

Data processing method, data processing device, computer readable storage medium and computer equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a data processing method, an apparatus, a computer-readable storage medium, and a computer device.
Background
Face recognition is a biometric technology for identity recognition based on facial feature information of a person. With the continuous development of internet technology, the face recognition technology is widely applied to various devices gradually, and is convenient for the daily life of users.
However, as time is accumulated, the face database at the device end is continuously increased along with the use times of the user, so that the storage space of the device is insufficient, and the normal operation of the device is affected. The storage efficiency of the face database is low.
Disclosure of Invention
The embodiment of the application provides a data processing method and device, a computer readable storage medium and computer equipment, which can improve the storage efficiency of a face database of target equipment.
An embodiment of the present application provides a data processing method, including:
acquiring state information of target equipment;
adjusting the storage quantity of the face data in the face database of the target equipment according to the state information;
receiving the human face features to be recognized through the adjusted target equipment, and determining associated equipment which establishes network connection with the adjusted target equipment;
and carrying out face recognition on the face features to be recognized according to the adjusted target equipment and the face database of the associated equipment.
Correspondingly, an embodiment of the present application provides a data processing apparatus, including:
an acquisition unit configured to acquire status information of a target device;
the adjusting unit is used for adjusting the storage quantity of the face data in the face database of the target equipment according to the state information;
the receiving unit is used for receiving the human face features to be recognized through the adjusted target equipment and determining associated equipment which establishes network connection with the adjusted target equipment;
and the recognition unit is used for carrying out face recognition on the face features to be recognized according to the adjusted target equipment and the face database of the associated equipment.
In one embodiment, the adjusting unit includes:
the first determining subunit is used for determining a target storage proportion of a face database of the target equipment according to the state information;
the calculating subunit is used for calculating target storage space data of the face database of the target equipment according to the target storage proportion;
and the adjusting subunit is used for adjusting the storage quantity of the face data in the face database of the target device based on the target storage space data.
In one embodiment, the first determining subunit includes:
the first determining module is used for determining a first storage proportion of a face database of the target equipment according to the network state data;
the second determining module is used for determining a second storage proportion of the face database of the target equipment according to the storage space data;
and the calculation module is used for obtaining the target storage proportion of the face database of the target equipment based on the first storage proportion and the second storage proportion.
In an embodiment, the first determining module is configured to:
when the packet sending delay rate is larger than a first preset threshold value, determining a first ratio to be adjusted according to the packet sending delay rate;
when the packet loss rate is greater than a second preset threshold value, determining a second ratio to be adjusted according to the packet loss rate;
and obtaining a first storage proportion of the face database of the target equipment according to the first proportion to be adjusted and the second proportion to be adjusted.
In an embodiment, the adjusting subunit is configured to:
acquiring the storage time of each face data in the face database of the target equipment;
and sequentially deleting the face data in the face database of the target equipment according to the sequence of the storage time from first to last until the current storage space of the face database of the target equipment meets the target storage space data.
In one embodiment, the identification unit includes:
the first searching subunit is used for searching a target face feature matched with the face feature to be recognized in the adjusted face database of the target device;
a second searching subunit, configured to search, when a target face feature matching the face feature to be recognized is not found in the face database of the adjusted target device, a target face feature matching the face feature to be recognized in the face database of the associated device;
and the first feedback subunit is configured to, when a target face feature matching the face feature to be recognized is found in the face database of the associated device, feed back a face recognition result corresponding to the target face feature to the adjusted target device.
In an embodiment, the data processing apparatus further includes:
the first identification unit is used for carrying out face identification on the face features to be identified at the cloud end when the target face features matched with the face features to be identified are not found in the face database of the associated equipment;
and the second feedback unit is used for feeding back the face recognition result of the cloud to the adjusted target equipment.
In an embodiment, the data processing apparatus further includes:
the comparison unit is used for comparing the face data in the face databases of the target equipment and the associated equipment;
and the removing unit is used for removing the repeated face data according to the comparison result.
In one embodiment, the removing unit includes:
the second determining subunit is used for determining repeated face data according to the comparison result;
a third determining subunit, configured to determine, according to the storage space data of the target device and the associated device, a target adjustment device with a smaller storage space;
and the removing subunit is used for searching the repeated face data in the target adjusting device and removing the repeated face data.
In addition, a computer-readable storage medium is provided, where the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform the steps in any one of the data processing methods provided in the embodiments of the present application.
In addition, the embodiment of the present application further provides a computer device, which includes a processor and a memory, where the memory stores an application program, and the processor is configured to run the application program in the memory to implement the data processing method provided in the embodiment of the present application.
Embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a storage medium. The processor of the computer device reads the computer instructions from the storage medium, and executes the computer instructions, so that the computer device executes the steps in the data processing method provided by the embodiment of the application.
The method comprises the steps of acquiring state information of target equipment; adjusting the storage quantity of the face data in the face database of the target equipment according to the state information; receiving the human face features to be recognized through the adjusted target equipment, and determining associated equipment for establishing network connection with the adjusted target equipment; and carrying out face recognition on the face features to be recognized according to the adjusted face databases of the target equipment and the associated equipment. Therefore, the storage quantity of the face data in the face database of the target device is adjusted according to the state information by acquiring the state information of the target device, so that the storage space of the face database of the target device is flexibly adjusted, the waste of the storage space is avoided, meanwhile, the face characteristics to be recognized are subjected to face recognition through the adjusted face database of the target device and the face database of the associated device, the occupation of the storage resources of the face database by the target device can be further reduced under the condition of ensuring the normal operation of the face recognition, and the storage efficiency of the face database of the target device is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an implementation scenario of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application;
fig. 3 is another schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a data processing method, a data processing device, a computer readable storage medium and computer equipment. The data processing apparatus may be integrated into a computer device, and the computer device may be a server or a terminal.
For a better understanding of the embodiments of the present application, reference is made to the following terms:
computer Vision technology (Computer Vision, CV): computer vision is a science for researching how to make a machine "see", and further, it means that a camera and a computer are used to replace human eyes to perform machine vision such as identification, tracking and measurement on a target, and further image processing is performed, so that the computer processing becomes an image more suitable for human eyes to observe or transmitted to an instrument to detect. As a scientific discipline, computer vision research-related theories and techniques attempt to build artificial intelligence systems that can capture information from images or multidimensional data. The computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content/behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning and map construction, automatic driving, intelligent transportation and other technologies, and also includes common biometric identification technologies such as face recognition and fingerprint recognition.
Face recognition: is a biological identification technology for identifying the identity based on the face characteristic information of a person. A series of related technologies, also called face recognition and face recognition, are used to capture an image or video stream containing a human face by a camera or a video camera, automatically detect and track the human face in the image, and further perform face recognition on the detected human face.
Referring to fig. 1, taking an example that a data processing apparatus is integrated in a computer device, fig. 1 is a schematic view of an implementation scenario of a data processing method provided in an embodiment of the present application, and includes a server a and a terminal B, where the server a may be an independent physical server, may also be a server cluster or a distributed system formed by multiple physical servers, and may also be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Network acceleration service (CDN), and a big data and artificial intelligence platform. The server A can acquire the state information of the target equipment; adjusting the storage quantity of the face data in the face database of the target equipment according to the state information; receiving the facial features to be recognized through the adjusted target equipment, and determining associated equipment which establishes network connection with the adjusted target equipment; and carrying out face recognition on the face features to be recognized according to the adjusted face databases of the target equipment and the associated equipment.
The terminal B may be various computer devices capable of performing network connection, such as a smart phone, a tablet computer, a notebook computer, a face payment terminal, a face payment device, and a desktop computer, but is not limited thereto. The terminal B and the server a may be directly or indirectly connected through a wired or wireless communication manner, and the server a may obtain data uploaded by the terminal B to perform a corresponding data processing operation, which is not limited herein.
It should be noted that the schematic diagram of the implementation environment scenario of the data processing method shown in fig. 1 is only an example, and the implementation environment scenario of the data processing method described in the embodiment of the present application is for more clearly explaining the technical solution of the embodiment of the present application, and does not constitute a limitation to the technical solution provided by the embodiment of the present application. As will be appreciated by those skilled in the art, with the evolution of data processing and the emergence of new business scenarios, the technical solutions provided in the present application are equally applicable to similar technical problems.
The scheme provided by the embodiment of the application relates to the technologies of artificial intelligence, such as face recognition, and the like, and is specifically explained by the following embodiment. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The present embodiment will be described from the perspective of a data processing apparatus, which may be specifically integrated in a computer device, which may be a server, and the present application is not limited herein.
Referring to fig. 2, fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure. The data processing method comprises the following steps:
in step 101, status information of the target device is acquired.
With the continuous development of internet technology, the face recognition technology is widely applied to various devices, such as face payment devices, and brings convenience to the daily life of users. The face payment equipment acquires a face image of a user, performs feature extraction on the face image to obtain a face feature to be recognized, and further performs face feature comparison through a face database to find out a certain feature with the highest similarity to the input face feature to be recognized. And comparing the highest similarity value with a preset threshold value, if the highest similarity value is greater than the threshold value, returning the identity information corresponding to the features and paying to finish the processes of face recognition and face payment. However, as time is accumulated, data such as face images stored in a face database of the face payment device continuously increases with the increase of the number of times of use of a user, which causes insufficient storage space of the face payment device and affects normal operation of the face payment device.
In order to solve the problem of low storage efficiency of the face database, an embodiment of the present application provides a data processing method, which is described in detail below.
First, status information of the target device may be acquired. The target device can be a face payment device, a face database can be arranged in the target device and used for storing face data, the face data can comprise face features and corresponding identity information, specifically, the face image of a user can be collected through the target device and subjected to feature extraction to obtain the face features of the user, and then the identity information corresponding to the face features of the user can be obtained in the face database through feature comparison.
In an embodiment, a client may be installed on the target device, and the target device completes a face payment process through the client, specifically, the client may invoke an image acquisition device to acquire a face image, or perform face recognition on the acquired face image through the client, and further store the face data in a face database of the target device.
The state information is information characterizing the condition of the target device, and may include network state data and storage space data of the target device. The network state data may include a packet sending delay rate and a packet loss rate, where the packet sending delay rate may be a ratio of a data packet with a delay to the total number of transmitted data packets, or a ratio of a data packet with a delay time greater than a preset threshold to the total number of transmitted data packets, and the like. The packet loss rate is a ratio of a packet loss part to a total number of transmitted packets, and the network state of the target device can be evaluated through the packet sending delay rate and the packet loss rate, and meanwhile, the network state data may further include a network type to which the target device is connected, such as WiFi, a 4G network, a 5G network, and the like.
The storage space data may be capacity data of a face database of the target device, where the storage space data may include total capacity of the face data that the target device may store, that is, may be total capacity of the face database of the target device.
In an embodiment, the state information of the target device may be obtained at regular time by setting a timing task, or the state information of the target device may be collected at regular time by the target device, or the state information of the target device may be monitored in real time, and when the state information satisfies a preset condition, the state information of the target device may be obtained, for example, when the packet loss rate is greater than a preset threshold, or when the packet sending delay rate is greater than a preset threshold, the state information of the target device may be obtained, or when the packet loss rate and the packet sending delay rate satisfy the preset condition, the state information of the target device may be obtained.
In step 102, the storage amount of the face data in the face database of the target device is adjusted according to the state information.
The face data stored in the face database of the target device can be continuously increased along with the accumulation of time and the increase of the use times of a user, a large amount of storage space of the face database of the target device is occupied, the available storage space of the face database of the target device is less and less, the operation of the target device is blocked, and the subsequent normal use is influenced. Therefore, if the storage policy of the face database is determined only according to the storage condition of the target device, a waste of storage resources may be caused under certain conditions, for example, under a condition that the network of the target device is good, the speed of performing face recognition through the cloud is close to the speed of performing face recognition through the local target device, and at this time, it is more appropriate to perform face recognition through the face database of the cloud.
Therefore, in order to improve the storage efficiency of the face database, the storage of the face database can be adjusted by combining the storage condition and the network state of the target device, that is, the storage quantity of the face data in the face database of the target device can be optimized and adjusted according to the state information of the target device, so that the storage space of the face database of the target device can be reasonably utilized, the storage space of the face database of the target device is reduced and unnecessarily occupied on the basis of ensuring the face recognition efficiency of a user through the target device, and the storage efficiency of the face database is improved.
In an embodiment, the adjusting the storage amount of the face data in the face database of the target device according to the state information may include:
(1) Determining a target storage proportion of a face database of the target equipment according to the state information;
(2) Calculating target storage space data of a face database of the target equipment according to the target storage proportion;
(3) And adjusting the storage quantity of the face data in the face database of the target equipment based on the target storage space data.
The target storage proportion is a proportion value calculated according to the state information of the target device, and the proportion value may be a ratio of a storage space occupied by face data that the face database of the target device should store to a total storage space of the face database in the current state of the target device, for example, if the storage space occupied by the face data that the face database of the target device should store in the current state is 3 Gigabytes (GB), and the total storage space of the face database is 16GB, the target storage proportion may be 3/16=0.1875, that is, 18.75%. When the target equipment is in a state based on the state information, and the ratio of the storage space occupied by the face data stored in the face database of the target equipment to the total storage space is the target storage proportion, the face payment efficiency can be ensured, and unnecessary occupation of the storage space of the face database is reduced.
The target storage space data is the maximum storage space occupied by the face data which can be stored in the face database of the target equipment and is calculated according to the target storage proportion. For example, assuming that the total storage space of the face database of the target device is 32GB, and the target storage proportion of the face database of the target device is determined to be 10% according to the state information of the target device, the face data stored in the face database of the target device should be adjusted at this time, so that the storage space occupied by the face data stored in the face database is not more than 3.2GB.
Furthermore, the storage quantity of the face data in the face database of the target device can be adjusted according to the target storage space data, when the storage space occupied by the face data stored in the face database of the target device is smaller than the storage space of the target storage space data, the storage quantity of the face data stored in the face database of the target device can be not adjusted, and when the storage space occupied by the face data stored in the face database of the target device is larger than the storage space of the target storage space data, the storage quantity of the face data in the face database of the target device can be adjusted according to the target storage space data.
In an embodiment, the storage time of each face data in the face database of the target device may be obtained; and sequentially deleting the face data in the face database of the target equipment according to the sequence of the storage time from first to last until the current storage space of the face database of the target equipment meets the data of the target storage space. For example, assuming that the face database of the target device sequentially stores A, B, C, D four face data, when the target storage space data determines that only two face data can be stored in the face database of the target device, the face data in the face database of the target device can be sequentially deleted according to the storage time sequence, that is, a and B are deleted first until the current storage space of the face database of the target device satisfies the target storage space data.
In an embodiment, the status information may include network status data and storage space data, and the step of determining a target storage ratio of the face database of the target device according to the status information may include:
(1.1) determining a first storage proportion of a face database of the target equipment according to the network state data;
(1.2) determining a second storage proportion of the face database of the target equipment according to the storage space data;
and (1.3) obtaining a target storage proportion of the face database of the target equipment based on the first storage proportion and the second storage proportion.
The first storage proportion is a proportion value calculated according to the network state data of the target device, and the proportion value may be a ratio of a storage space occupied by face data that the face database of the target device should store to a total storage space of the face database, which is determined based on the network state data of the target device, for example, if the storage space occupied by the face data that the face database of the target device should store is determined based on the network state data of the target device is 3GB, and the total storage space of the face database is 16GB, the first storage proportion may be 3/16=0.1875, that is, 18.75%. When the ratio of the storage space occupied by the face data stored in the face database of the target device to the total storage space is the first storage ratio in the network state based on the network state data, the face payment efficiency can be ensured, and unnecessary occupation of the storage space of the face database is reduced.
The second storage proportion is a proportion value calculated according to the storage space data of the target device, and the proportion value may be a ratio of a storage space occupied by the face data that the face database of the target device should store to a total storage space of the face database, which is determined based on the storage space data of the target device, for example, if the storage space occupied by the face data that the face database of the target device should store, which is determined based on the storage space data of the target device, is 3GB, and the total storage space of the face database is 16GB, the second storage proportion may be 3/16=0.1875, that is, 18.75%. Under the storage condition based on the storage space data, when the ratio of the storage space occupied by the face data stored in the face database of the target device to the total storage space is the second storage proportion, the face payment efficiency can be ensured, unnecessary occupation of the storage space of the face database is reduced, and the problem that face recognition cannot be normally carried out due to insufficient storage space of the face database of the target device is avoided.
Specifically, when the storage space of the target device is small, the face data can be stored in the cloud, face recognition is performed through the face database of the cloud, when the storage space of the target device is large, the face data can be stored in the target device, and face recognition is performed through the face database of the target device.
In an embodiment, the total storage space of the target device may be determined according to the storage space data, and the second storage proportion of the face database of the target device may be determined according to the size of the total storage space, for example, when the size of the total storage space satisfies a preset interval, the second storage proportion of the target device in the preset interval may be determined according to the preset interval, for example, when the size of the total storage space is between 8GB and 16GB, the second storage proportion of the target device in the preset interval of the total storage space may be determined as 20%, when the size of the total storage space is between 64GB and 128GB, the second storage proportion of the target device in the preset interval of the total storage space may be determined as 40%, when the size of the total storage space is between 128GB and 256GB, the second storage proportion of the target device in the preset interval of the total storage space may be determined as 50%, and the specific preset interval and the second storage proportion may be set according to actual applications, which is not limited herein.
In an embodiment, the storage occupancy rate of the storage space of the face database of the target device may be determined according to the storage space data, and the second storage proportion of the face database of the target device is determined according to the size of the storage occupancy rate, for example, when the storage occupancy rate is greater than a preset threshold, the second storage proportion of the face database of the target device is determined, for example, when the storage occupancy rate is greater than 80%, the second storage proportion of the face database of the target device may be determined to be 50%, and the specific preset threshold and the second storage proportion may be set according to an actual application, which is not limited herein.
The target storage proportion of the face database of the target device can be obtained according to a first storage proportion determined by the network state data and a second storage proportion determined by the storage space data.
In an embodiment, the first storage proportion and the second storage proportion may be weighted according to a preset weight, so as to obtain a target storage proportion of the face database of the target device. For example, the preset weight may be 0.5, and further the first storage proportion and the second storage proportion may be multiplied by the preset weight 0.5, and the weighted results are accumulated to obtain the target storage proportion of the face database of the target device, or the first storage proportion may be multiplied by the weight 0.6, the second storage proportion is multiplied by the weight 0.6, and the weighted results are accumulated to obtain the target storage proportion of the face database of the target device, and the specific weight may be set according to an actual situation, which is not limited herein.
In an embodiment, the network status data may include a packet loss rate and a packet transmission delay rate, and the step of determining the first storage ratio of the face database of the target device according to the network status data may include:
(1.1.1) when the packet transmission delay rate is greater than a first preset threshold, determining a first ratio to be adjusted according to the packet transmission delay rate;
(1.1.2) when the packet loss rate is greater than a second preset threshold, determining a second ratio to be adjusted according to the packet loss rate;
(1.1.3) obtaining a first storage proportion of the face database of the target device according to the first proportion to be adjusted and the second proportion to be adjusted.
Wherein, the first preset threshold is a preset critical value which is more than or equal to 0, when the delay rate of the packet is more than the critical value, the first proportion to be adjusted can be determined according to the delay rate of the packet, when the delay rate of the packet is smaller, namely, the network is better, the speed of the face recognition through the cloud end is close to the speed of the face recognition through the target device, therefore, in order to reduce the occupation of the face data to the storage space of the face database of the target device, the face recognition can be carried out through the cloud end, at the moment, the face data can not be stored in the face database of the target device, when the delay rate of the packet is larger, namely, the network is worse, the speed of the face recognition through the cloud end is slower, in order to ensure the efficiency of face recognition, face recognition may be performed through a face database of the target device, at this time, all or most of face data may be stored in the face database of the target device, specifically, for example, when the packet sending delay rate is equal to 0, it may be determined that the first ratio to be adjusted is 0%, when the packet sending delay rate is greater than 0 and less than 1%, it may be determined that the first ratio to be adjusted is 50%, when the packet sending delay rate is greater than 5%, it may be determined that the first ratio to be adjusted is 80%, and when the packet sending delay rate is greater than 10%, it may be determined that the first ratio to be adjusted is 100%, where the first preset threshold and the first ratio to be adjusted may be set according to an actual situation, and are not limited herein.
The second preset threshold is a preset critical value which is greater than or equal to 0, when the packet loss rate is greater than the critical value, the second to-be-adjusted ratio can be determined according to the packet loss rate, when the packet loss rate is smaller, namely, when the network is better, the face recognition can be performed through the cloud, at the moment, the face data can not be stored in the face database of the target device, when the packet loss rate is higher, namely, when the network is worse, the face recognition speed is slower through the cloud at the moment, the face recognition can be performed through the face database of the target device, at the moment, all or most of face data can be stored in the face database of the target device, and therefore, the normal operation of the face recognition is ensured. For example, when the packet loss rate is equal to 0, it may be determined that the second ratio to be adjusted is relatively 0%, when the packet loss rate is greater than 0 and less than 1%, it may be determined that the second ratio to be adjusted is relatively 80%, and when the packet loss rate is greater than 5%, it may be determined that the second ratio to be adjusted is relatively 100%, where the second preset threshold and the second ratio to be adjusted may be set according to an actual situation, and are not limited herein.
The first storage proportion of the face database of the target device can be obtained according to the first proportion to be adjusted determined by the packet sending delay rate and the second proportion to be adjusted determined by the packet loss rate.
In an embodiment, the first ratio to be adjusted and the second ratio to be adjusted may be weighted according to a preset weight, so as to obtain a first storage ratio of the face database of the target device. For example, the preset weight may be 0.5, and further the first to-be-adjusted ratio and the second to-be-adjusted ratio may be multiplied by the preset weight 0.5, and the weighted results are accumulated to obtain the first storage ratio of the face database of the target device, or the first to-be-adjusted ratio may be multiplied by the weight 0.4, the second to-be-adjusted ratio is multiplied by the weight 0.6, and the weighted results are accumulated to obtain the first storage ratio of the face database of the target device, and the like, and the specific weight may be set according to an actual situation, which is not limited herein.
In step 103, the adjusted target device receives the facial features to be recognized, and determines the associated device that establishes network connection with the adjusted target device.
The face features to be recognized may be face information which is acquired by an image acquisition device of the target device and has not been subjected to face recognition, the face information may be a face image acquired by the image acquisition device, or may be face features obtained by extracting features of the face image, and the face features may be feature string information which uniquely identifies a certain user and is obtained by converting the face image information.
The association device may be at least one device that establishes a network connection with the target device, the association device and the target device are devices that are also used for face recognition, specifically, the association device and the target device may be devices used for face payment in the same store, and may perform association through a network connection such as bluetooth, and information sharing may be performed between the target device and the association device through the network connection. That is, the data processing method provided in the embodiment of the present application may be applied to both the target device and the associated device, that is, the data processing method provided in the embodiment of the present application may process a plurality of devices connected to the same network at the same time.
And receiving the human face features to be recognized through the adjusted associated equipment, and determining equipment for establishing network connection with the adjusted associated equipment.
In step 104, face recognition is performed on the face features to be recognized according to the adjusted face databases of the target device and the associated device.
In order to further reduce the occupation of storage resources, the face data can be stored in a plurality of face payment devices in one store in a distributed manner to reduce the repeated storage of the face data and reduce the occupation of the storage resources, that is, the face data can be stored in the target device and the associated device in a distributed manner, and then the face features to be recognized can be subjected to face recognition by combining the target device and the associated device, wherein whether the face data matched with the face features to be recognized exists in a face database of the target device can be searched first, and then the face data matched with the face features to be recognized can be searched in a face database of the associated device.
Specifically, the target face feature matched with the face feature to be recognized can be searched in the face database of the target device adjusted according to the target storage space data, and when the target face feature matched with the face feature to be recognized is found in the face database of the adjusted target device, that is, when the face recognition is successful, the recognition result can be displayed in the adjusted target device, for example, the identity information corresponding to the target face feature can be displayed in the adjusted target device, the information successfully recognized can be displayed in the adjusted target device, the face payment operation can be directly performed, and the payment result can be returned to the target device.
When the target face features matched with the face features to be recognized are not found in the face database of the adjusted target equipment, the target face features matched with the face features to be recognized can be found in the face database of at least one associated equipment at the same time; when the target face features matched with the face features to be recognized are found in the face database of the associated device, the face recognition results corresponding to the target face features are fed back to the adjusted target device, and the face recognition results can be identity information corresponding to the target face features and can also be information prompting the user of successful face recognition. When the target face features matched with the face features to be recognized are found in the face databases of the multiple associated devices, the finding result of the associated device which finds the target face features matched with the face features to be recognized at the fastest speed can be preferentially used, and the face recognition result is returned to the adjusted target device according to the finding result.
In an embodiment, when a target face feature matching with the face feature to be recognized is not found in the face database of the associated device, face recognition may be performed on the face feature to be recognized at the cloud, where the face database of the cloud may store face data of all users, specifically, the face data may be found in the face database of the cloud, when the target face feature matching with the face feature to be recognized is found, the face recognition result of the cloud is fed back to the adjusted target device, and the face data corresponding to the target face feature may also be stored in the target device for the next use, or the face data corresponding to the target face feature may also be stored in the associated device, and the specific storage may be determined according to an actual situation, and is not limited herein; when the target face features matched with the face features to be recognized are not found, the face recognition results are fed back to the adjusted target equipment, for example, non-existing information is returned to the adjusted target equipment.
In an embodiment, in order to further reduce unnecessary occupation of a storage space of the face database of the target device, repeated face data between the target device and the associated devices may be removed through cross-end alignment, so as to further improve the storage efficiency of the face database of the target device, specifically, the face data in the face database of the target device and the face data in the associated devices may be compared, for example, the face features of all the face data stored in the face database of the target device may be sent to each associated device for comparison, and the face data corresponding to the repeated face features may be removed according to the comparison result.
In an embodiment, in order to reasonably store the storage spaces of the target device and the associated device, the repeated face data may be deleted in the device with a smaller storage space, and specifically, the repeated face data may be determined according to the comparison result; determining target adjusting equipment with smaller storage space according to the storage space data of the target equipment and the associated equipment; and searching the repeated face data in the target adjusting device and removing the repeated face data. For example, when repeated face data F is found in the face databases of the target device and the associated device E, that is, the face data F is stored in the face database of the target device, the face data F is also stored in the face database of the associated device E, and assuming that the storage space of the face database of the target device is larger than that of the face database of the associated device E, the associated device E is determined as a target adjusting device, and the face data F is removed in the associated device E.
In an embodiment, the face data stored in the face database of the target device and the associated device may be obtained at regular time and stored, and when the target device or the associated device fails, the stored face data may be sent to the target device or the associated device again.
As can be seen from the above, in the embodiment of the present application, the state information of the target device is obtained; adjusting the storage quantity of the face data in the face database of the target equipment according to the state information; receiving the human face features to be recognized through the adjusted target equipment, and determining associated equipment for establishing network connection with the adjusted target equipment; and carrying out face recognition on the face features to be recognized according to the adjusted face databases of the target equipment and the associated equipment. Therefore, the storage space of the face database of the target device is flexibly adjusted by acquiring the state information of the target device and adjusting the storage quantity of the face data in the face database of the target device according to the state information, and meanwhile, the face features to be recognized are subjected to face recognition through the adjusted face database of the target device and the face database of the associated device, so that the occupation of the storage resources of the face database by the target device can be further reduced under the condition of ensuring the normal face recognition, and the storage efficiency of the face database of the target device is improved.
The method described in the above examples is further illustrated in detail below by way of example.
In this embodiment, the data processing apparatus will be described by taking an example in which the data processing apparatus is specifically integrated in a computer device. The data processing method takes a server as an execution subject, and takes the target device and the associated device as face payment devices for specific description.
Referring to fig. 3, fig. 3 is another schematic flow chart of a data processing method according to an embodiment of the present disclosure. The specific process can be as follows:
in step 201, the server acquires status information of the target device.
The target equipment can be face payment equipment, a client for face payment can be installed on the target equipment, the target equipment can complete a face payment process through the client, specifically, an image acquisition device of the target equipment can be called through the client to acquire a face image of a user, the acquired face image can be subjected to face recognition through the client, and then face data can be stored in a face database of the target equipment.
The server acquires state information of the target device, wherein the state information is information representing the condition of the target device and may include network state data and storage space data of the target device. The network state data may include a packet sending delay rate and a packet loss rate, where the packet sending delay rate may be a ratio of a data packet with a delay to the total number of transmitted data packets, or a ratio of a data packet with a delay time greater than a preset threshold to the total number of transmitted data packets, and the like. The packet loss rate is a ratio of a packet loss part to the total number of transmitted packets, and the network state of the target device can be evaluated through the packet transmission delay rate and the packet loss rate.
The storage space data is capacity data of a face database of the target device, where the storage space data may include a total capacity of face data that can be stored by the target device, that is, the total capacity of the face database of the target device.
In an embodiment, the server may obtain the state information of the target device at regular time by setting a timing task, may also obtain the state information of the target device at regular time by the target device, and may also monitor the state information of the target device in real time, and obtain the state information of the target device when the state information satisfies a preset condition, for example, may obtain the state information of the target device when the packet loss rate is greater than a preset threshold, may obtain the state information of the target device when the packet sending delay rate is greater than a preset threshold, and may also obtain the state information of the target device when the packet loss rate and the packet sending delay rate satisfy the preset condition.
In step 202, when the packet sending delay rate is greater than a first preset threshold, the server determines a first ratio to be adjusted according to the packet sending delay rate, when the packet loss rate is greater than a second preset threshold, determines a second ratio to be adjusted according to the packet loss rate, and obtains a first storage ratio of the face database of the target device according to the first ratio to be adjusted and the second ratio to be adjusted.
Specifically, when the packet sending delay rate is greater than a first preset threshold value, the server determines a first proportion to be adjusted according to the packet sending delay rate, when the packet loss rate is greater than a second preset threshold value, the server determines a second proportion to be adjusted according to the packet loss rate, and further, the first storage proportion of the face database of the target device can be obtained according to the first proportion to be adjusted and the second proportion to be adjusted.
The first preset threshold is a preset critical value larger than or equal to 0, when the packet sending delay rate is larger than the critical value, the first ratio to be adjusted may be determined according to the packet sending delay rate, when the packet sending delay rate is smaller, that is, when the network is better, the face recognition may be performed through the cloud, at this time, the face data may not be stored in the face database of the target device, when the packet sending delay rate is larger, that is, when the network is worse, the face recognition speed is slower through the cloud, the face recognition may be performed through the face database of the target device, at this time, all or most of the face data may be stored in the face database of the target device, specifically, for example, when the packet sending delay rate is equal to 0, the first ratio to be adjusted may be determined to be larger than 0%, when the packet sending delay rate is larger than 0 and smaller than 1%, the first ratio to be adjusted may be determined to be larger than 50%, when the packet sending delay rate is larger than 5%, the first ratio to be adjusted may be determined to be larger than 80%, when the packet sending delay rate is larger than 10%, the first ratio to be adjusted may be larger than 100%, and the first ratio may be limited according to the actual condition.
The second preset threshold is a preset critical value larger than or equal to 0, when the packet loss rate is larger than the critical value, a second ratio to be adjusted may be determined according to the packet loss rate, when the packet loss rate is smaller, that is, when the network is better, the face recognition may be performed through the cloud, at this time, the face data may not be stored in the face database of the target device, when the packet loss rate is larger, that is, when the network is worse, the face recognition speed is slower through the cloud, the face recognition may be performed through the face database of the target device, at this time, all or most of the face data may be stored in the face database of the target device, specifically, for example, when the packet loss rate is equal to 0, the second ratio to be adjusted may be determined to be 0%, when the packet loss rate is larger than 0 and smaller than 1%, the second ratio to be adjusted may be 80%, when the packet loss rate is larger than 5%, the second ratio to be adjusted may be determined to be 100%, where the second preset threshold and the second ratio to be adjusted may be set according to an actual situation, and the packet loss rate is not limited herein.
The server can obtain a first storage proportion of the face database of the target device according to a first proportion to be adjusted determined by the packet sending delay rate and a second proportion to be adjusted determined by the packet loss rate.
In an embodiment, the server may perform weighting processing on the first ratio to be adjusted and the second ratio to be adjusted according to a preset weight, so as to obtain a first storage ratio of the face database of the target device. For example, the preset weight may be 0.5, and further the first to-be-adjusted ratio and the second to-be-adjusted ratio may be multiplied by the preset weight 0.5, and the weighted results are accumulated to obtain the first storage ratio of the face database of the target device, or the first to-be-adjusted ratio may be multiplied by the weight 0.4, the second to-be-adjusted ratio is multiplied by the weight 0.6, and the weighted results are accumulated to obtain the first storage ratio of the face database of the target device, and the like, and the specific weight may be set according to an actual situation, which is not limited herein.
In step 203, the server determines a second storage ratio of the face database of the target device according to the storage space data.
The second storage proportion is a proportion value calculated according to the storage space data of the target device, and the proportion value may be a ratio of a storage space occupied by the face data that the face database of the target device should store to a total storage space of the face database, for example, if the storage space occupied by the face data that the face database of the target device should store is 3GB and the total storage space of the face database is 16GB, the second storage proportion may be 3/16=0.1875, that is, 18.75%. Under the storage condition based on the storage space data, when the ratio of the storage space occupied by the face data stored in the face database of the target device to the total storage space is the second storage proportion, the face payment efficiency can be ensured, unnecessary occupation of the storage space of the face database is reduced, and the problem that face recognition cannot be normally carried out due to insufficient storage space of the face database of the target device is avoided.
Specifically, when the storage space of the target device is small, the server can store the face data in the cloud, face recognition is performed through the face database in the cloud, when the storage space of the target device is large, the face data can be stored in the target device, and face recognition is performed through the face database of the target device.
In an embodiment, the server may determine the total storage space of the target device according to the storage space data, and determine the second storage proportion of the face database of the target device according to the size of the total storage space, for example, when the size of the total storage space satisfies a preset interval, the second storage proportion of the target device in the preset interval may be determined as 20% when the size of the total storage space is between 8GB (Gigabyte, abbreviated as GB) and 16GB, the second storage proportion of the target device in the preset interval may be determined as 40% when the size of the total storage space is between 64GB and 128GB, the second storage proportion of the target device in the preset interval may be determined as 50% when the size of the total storage space is between 128GB and 256GB, and the specific preset interval and the second storage proportion may be set according to an actual application, and are not limited herein.
In an embodiment, the storage occupancy rate of the storage space of the face database of the target device may be determined according to the storage space data, and the second storage proportion of the face database of the target device is determined according to the size of the storage occupancy rate, for example, when the storage occupancy rate is greater than a preset threshold, the second storage proportion of the face database of the target device is determined, for example, when the storage occupancy rate is greater than 80%, the second storage proportion of the face database of the target device may be determined to be 50%, and the specific preset threshold and the second storage proportion may be set according to an actual application, which is not limited herein.
In step 204, the server obtains a target storage ratio of the face database of the target device based on the first storage ratio and the second storage ratio, and calculates target storage space data of the face database of the target device according to the target storage ratio.
The server can obtain a target storage proportion of the face database of the target device according to a first storage proportion determined by the network state data and a second storage proportion determined by the storage space data, and calculate target storage space data of the face database of the target device according to the target storage proportion.
In an embodiment, the first storage proportion and the second storage proportion may be weighted according to a preset weight, so as to obtain a target storage proportion of the face database of the target device. For example, the preset weight may be 0.5, and further the first storage proportion and the second storage proportion may be multiplied by the preset weight 0.5, and the weighted results are accumulated to obtain the target storage proportion of the face database of the target device, or the first storage proportion may be multiplied by the weight 0.6, the second storage proportion is multiplied by the weight 0.6, and the weighted results are accumulated to obtain the target storage proportion of the face database of the target device, and the specific weight may be set according to an actual situation, which is not limited herein.
The target storage space data is the maximum storage space occupied by the face data which can be stored in the face database of the target equipment and is calculated according to the target storage proportion. For example, assuming that the total storage space of the face database of the target device is 32GB, and the target storage proportion of the face database of the target device is determined to be 10% according to the state information of the target device, the face data stored in the face database of the target device should be adjusted at this time, so that the storage space occupied by the face data stored in the face database is not more than 3.2GB.
In step 205, the server obtains the storage time of each piece of face data in the face database of the target device, and sequentially deletes the face data in the face database of the target device according to the sequence of the storage time from the first to the last until the current storage space of the face database of the target device meets the target storage space data.
Specifically, the server may obtain a storage time of each face data in the face database of the target device; and sequentially deleting the face data in the face database of the target equipment according to the sequence of the storage time from first to last until the current storage space of the face database of the target equipment meets the data of the target storage space. For example, assuming that the face database of the target device sequentially stores A, B, C, D four pieces of face data, when the target storage space data determines that only two pieces of face data can be stored in the face database of the target device, the face data in the face database of the target device may be sequentially deleted according to the storage time sequence from the first to the last, that is, a is deleted first, and then B is deleted until the current storage space of the face database of the target device satisfies the target storage space data.
In step 206, the server receives the facial features to be recognized through the adjusted target device, and determines the associated device that establishes a network connection with the adjusted target device.
The face features to be recognized may be face information which is acquired by an image acquisition device of the target device and has not been subjected to face recognition, the face information may be a face image acquired by the image acquisition device, or may be face features obtained by extracting features of the face image, and the face features may be feature string information which uniquely identifies a certain user and is obtained by converting the face image information.
The back-end server can uniquely identify one face payment device by a machine Serial Number (SN), uniquely identify one store by a machine identification (MCH _ ID), store a plurality of face payment devices in a general store, and build an anti-identity relationship table between the MCH _ ID and the SN before the face payment device is shipped to the store, so as to manage the face payment device in the store. After the face payment device is started, a client installed on the face payment device can actively acquire the SN and the MCH _ ID of the current device, and then the Bluetooth connection between the face payment devices is established. The MCH _ ID is used for preventing face payment devices of different stores from being mistakenly connected due to the fact that stores are close to each other, after Bluetooth connection is successful, if MCH _ IDs of the two devices are different, the two devices can be disconnected, and therefore mistaken connection of devices across stores can be avoided. The association equipment and the target equipment are face payment equipment in the same store, bluetooth modules are installed on the target equipment and the association equipment, bluetooth connection can be established between the target equipment and the association equipment through the Bluetooth modules, and information sharing is carried out through the Bluetooth connection. That is, the data processing method provided in the embodiment of the present application may be applied to both the target device and the associated device, that is, the data processing method provided in the embodiment of the present application may process a plurality of devices connected to the same network at the same time.
The server also needs to acquire the state information of the associated device, which is the same as the target device; and adjusting the storage quantity of the face data in the face database of the associated equipment according to the associated information, receiving the face features to be recognized through the adjusted associated equipment, and determining equipment for establishing network connection with the adjusted associated equipment.
In step 207, the server searches for a target face feature matching the face feature to be recognized in the face database of the adjusted target device, and when the target face feature matching the face feature to be recognized is not found in the face database of the adjusted target device, searches for a target face feature matching the face feature to be recognized in the face database of the associated device.
In order to further reduce the occupation of storage resources, the face data can be stored in a plurality of face payment devices in one store in a distributed manner to reduce the repeated storage of the face data and reduce the occupation of the storage resources, that is, the face data can be stored in the target device and the associated device in a distributed manner, and then the face features to be recognized can be subjected to face recognition by combining the target device and the associated device, wherein the server can firstly search the face database of the target device for whether the face data matched with the face features to be recognized exists, and then search the face database of the associated device.
Specifically, the server may search a target face feature matched with the face feature to be recognized in a face database of the target device adjusted according to the target storage space data, and when the target face feature matched with the face feature to be recognized is found in the face database of the adjusted target device, the recognition result is displayed in the adjusted target device, for example, the identity information corresponding to the target face feature may be displayed in the adjusted target device, the information that the recognition is successful may also be displayed in the adjusted target device, the face payment operation may also be directly performed, and the payment result is displayed in the adjusted target device.
When the target face features matched with the face features to be recognized are not found in the face database of the adjusted target device, the server can simultaneously search the face database of at least one associated device for the target face features matched with the face features to be recognized.
In step 208, when the target face feature matching the face feature to be recognized is found in the face database of the associated device, the server feeds back the face recognition result corresponding to the target face feature to the adjusted target device.
When the target face features matched with the face features to be recognized are found in the face database of the associated device, the server may feed back the face recognition results corresponding to the target face features to the adjusted target device, where the face recognition results may be identity information corresponding to the target face features, information of face recognition success, and information of face payment results. When the target face features matched with the face features to be recognized are found in the face databases of the multiple associated devices, the finding result of the associated device which finds the target face features matched with the face features to be recognized at the fastest speed is preferentially used, and the face recognition result is returned to the adjusted target device according to the finding result.
In an embodiment, in order to further reduce unnecessary occupation of a storage space of the face database of the target device, the server may remove repeated face data between the target device and the associated device by cross-end alignment, so as to further improve the storage efficiency of the face database of the target device, specifically, the server may compare the face data in the face database of the target device and the face database of the associated device, for example, the face features of all the face data stored in the face database of the target device may be sent to each associated device for comparison, and the face data corresponding to the repeated face features is removed according to the comparison result.
In an embodiment, in order to reasonably store the storage spaces of the target device and the associated device, the repeated face data may be deleted in the device with a smaller storage space, and specifically, the server may determine the repeated face data according to the comparison result; determining target adjusting equipment with smaller storage space according to the storage space data of the target equipment and the associated equipment; and searching the repeated face data in the target adjusting device and removing the repeated face data. For example, when repeated face data F is found in the face databases of the target device and the associated device E, that is, the face data F is stored in the face database of the target device, and the face data F is also stored in the face database of the associated device E, assuming that the storage space of the face database of the target device is greater than that of the face database of the associated device E, the associated device E is determined as a target adjustment device, and the face data F is removed from the associated device E.
As can be seen from the above, in the embodiment of the present application, the server obtains the state information of the target device; when the packet sending delay rate is greater than a first preset threshold value, the server determines a first ratio to be adjusted according to the packet sending delay rate, when the packet loss rate is greater than a second preset threshold value, the server determines a second ratio to be adjusted according to the packet loss rate, and a first storage ratio of the face database of the target device is obtained according to the first ratio to be adjusted and the second ratio to be adjusted; the server determines a second storage proportion of the face database of the target device according to the storage space data; the server obtains a target storage proportion of the face database of the target device based on the first storage proportion and the second storage proportion, and calculates target storage space data of the face database of the target device according to the target storage proportion; the server acquires the storage time of each face data in the face database of the target equipment, and sequentially deletes the face data in the face database of the target equipment according to the sequence of the storage time from first to last until the current storage space of the face database of the target equipment meets the target storage space data; the server receives the face features to be recognized through the adjusted target equipment and determines associated equipment which establishes network connection with the adjusted target equipment; the server searches a target face feature matched with the face feature to be recognized in the adjusted face database of the target equipment, and when the target face feature matched with the face feature to be recognized is not searched in the adjusted face database of the target equipment, the server searches a target face feature matched with the face feature to be recognized in the face database of the associated equipment; when the target face features matched with the face features to be recognized are found in the face database of the associated equipment, the server feeds back the face recognition results corresponding to the target face features to the adjusted target equipment. Therefore, the storage quantity of the face data in the face database of the target device is adjusted according to the network state data and the storage space data in the state information by acquiring the state information of the target device, the storage space of the face database of the target device is flexibly adjusted by combining the network state and the storage condition of the target device, meanwhile, the face features to be recognized are subjected to face recognition through the adjusted face database of the target device and the associated device, the occupation of the storage resources of the face database by the target device can be further reduced under the condition that the face recognition is normally performed, and the storage efficiency of the face database of the target device is improved.
In order to better implement the above method, an embodiment of the present invention further provides a data processing apparatus, which may be integrated in a computer device, and the computer device may be a server.
For example, as shown in fig. 4, for a schematic structural diagram of a data processing apparatus provided in an embodiment of the present application, the data processing apparatus may include an obtaining unit 301, an adjusting unit 302, a receiving unit 303, and an identifying unit 304, as follows:
an acquisition unit 301 configured to acquire status information of a target device;
an adjusting unit 302, configured to adjust the storage amount of the face data in the face database of the target device according to the state information;
a receiving unit 303, configured to receive, through the adjusted target device, the facial feature to be recognized, and determine an associated device that establishes a network connection with the adjusted target device;
and the identifying unit 304 is configured to perform face identification on the face feature to be identified according to the adjusted face databases of the target device and the associated device.
In an embodiment, the adjusting unit 302 includes:
the first determining subunit is used for determining a target storage proportion of a face database of the target equipment according to the state information;
the computing subunit is used for computing target storage space data of the face database of the target equipment according to the target storage proportion;
and the adjusting subunit is used for adjusting the storage quantity of the face data in the face database of the target device based on the target storage space data.
In one embodiment, the first determining subunit includes:
the first determining module is used for determining a first storage proportion of a face database of the target equipment according to the network state data;
the second determining module is used for determining a second storage proportion of the face database of the target equipment according to the storage space data;
and the calculation module is used for obtaining the target storage proportion of the face database of the target equipment based on the first storage proportion and the second storage proportion.
In one embodiment, the first determining module is configured to:
when the packet sending delay rate is larger than a first preset threshold value, determining a first ratio to be adjusted according to the packet sending delay rate;
when the packet loss rate is greater than a second preset threshold value, determining a second ratio to be adjusted according to the packet loss rate;
and obtaining a first storage proportion of the face database of the target equipment according to the first proportion to be adjusted and the second proportion to be adjusted.
In an embodiment, the adjusting subunit is configured to:
acquiring the storage time of each face data in a face database of the target equipment;
and sequentially deleting the face data in the face database of the target equipment according to the sequence of the storage time from first to last until the current storage space of the face database of the target equipment meets the data of the target storage space.
In one embodiment, the identifying unit 304 includes:
the first searching subunit is used for searching a target face feature matched with the face feature to be recognized in the adjusted face database of the target device;
a second searching subunit, configured to search, when a target face feature matching the face feature to be recognized is not found in the face database of the adjusted target device, a target face feature matching the face feature to be recognized in the face database of the associated device;
and the first feedback subunit is used for feeding back a face recognition result corresponding to the target face feature to the adjusted target device when the target face feature matched with the face feature to be recognized is found in the face database of the associated device.
In one embodiment, the data processing apparatus further includes:
the first identification unit is used for carrying out face identification on the face features to be identified at the cloud end when the target face features matched with the face features to be identified are not found in the face database of the associated equipment;
and the second feedback unit is used for feeding back the face recognition result of the cloud to the adjusted target equipment.
In one embodiment, the data processing apparatus further includes:
the comparison unit is used for comparing the face data in the face database of the target equipment and the face database of the associated equipment;
and the removing unit is used for removing the repeated face data according to the comparison result.
In one embodiment, the removing unit includes:
the second determining subunit is used for determining repeated face data according to the comparison result;
a third determining subunit, configured to determine, according to the storage space data of the target device and the associated device, a target adjustment device with a smaller storage space;
and the removing subunit is used for searching the repeated face data in the target adjusting device and removing the repeated face data.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, in the embodiment of the present application, the obtaining unit 301 obtains the state information of the target device; the adjusting unit 302 adjusts the storage quantity of the face data in the face database of the target device according to the state information; the receiving unit 303 receives the facial features to be recognized through the adjusted target device, and determines the associated device establishing network connection with the adjusted target device; the recognition unit 304 performs face recognition on the face features to be recognized according to the adjusted face databases of the target device and the associated device. Therefore, the storage space of the face database of the target equipment is flexibly adjusted by acquiring the state information of the target equipment and adjusting the storage quantity of the face data in the face database of the target equipment according to the state information, and meanwhile, the face characteristics to be recognized are subjected to face recognition through the adjusted target equipment and the face database of the associated equipment, so that the occupation of the storage resources of the face database by the target equipment can be further reduced under the condition that the face recognition is normally carried out, and the storage efficiency of the face database of the target equipment is improved.
An embodiment of the present application further provides a computer device, as shown in fig. 5, which shows a schematic structural diagram of the computer device according to the embodiment of the present application, where the computer device may be a server, and specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 5 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that the functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
acquiring state information of target equipment; adjusting the storage quantity of the face data in the face database of the target equipment according to the state information; receiving the human face features to be recognized through the adjusted target equipment, and determining associated equipment for establishing network connection with the adjusted target equipment; and carrying out face recognition on the face features to be recognized according to the adjusted face databases of the target equipment and the associated equipment.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein. It should be noted that the computer device provided in the embodiment of the present application and the data processing method in the foregoing embodiment belong to the same concept, and specific implementation processes thereof are described in the foregoing method embodiment and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any data processing method provided by the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring state information of target equipment; adjusting the storage quantity of the face data in the face database of the target equipment according to the state information; receiving the human face features to be recognized through the adjusted target equipment, and determining associated equipment for establishing network connection with the adjusted target equipment; and carrying out face recognition on the face features to be recognized according to the adjusted face databases of the target equipment and the associated equipment.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any data processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data processing method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
According to one aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations provided by the embodiments described above.
The data processing method, the data processing apparatus, the computer-readable storage medium, and the computer device provided in the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principles and embodiments of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (15)

1. A data processing method, comprising:
acquiring state information of target equipment;
adjusting the storage quantity of the face data in the face database of the target equipment according to the state information;
receiving the human face features to be recognized through the adjusted target equipment, and determining associated equipment which establishes network connection with the adjusted target equipment;
and carrying out face recognition on the face features to be recognized according to the adjusted target equipment and the face database of the associated equipment.
2. The data processing method of claim 1, wherein the adjusting the storage amount of the face data in the face database of the target device according to the state information comprises:
determining a target storage proportion of a face database of the target equipment according to the state information;
calculating target storage space data of a face database of the target equipment according to the target storage proportion;
and adjusting the storage quantity of the face data in the face database of the target equipment based on the target storage space data.
3. The data processing method of claim 2, wherein the status information includes network status data and storage space data, and the determining a target storage proportion of the face database of the target device according to the status information comprises:
determining a first storage proportion of a face database of the target equipment according to the network state data;
determining a second storage proportion of a face database of the target equipment according to the storage space data;
and obtaining the target storage proportion of the face database of the target equipment based on the first storage proportion and the second storage proportion.
4. The data processing method of claim 3, wherein the network status data includes a packet loss rate and a packet transmission delay rate, and the determining the first storage ratio of the face database of the target device according to the network status data includes:
when the packet sending delay rate is larger than a first preset threshold value, determining a first ratio to be adjusted according to the packet sending delay rate;
when the packet loss rate is greater than a second preset threshold value, determining a second ratio to be adjusted according to the packet loss rate;
and obtaining a first storage proportion of the face database of the target equipment according to the first proportion to be adjusted and the second proportion to be adjusted.
5. The data processing method of any one of claims 2 to 4, wherein the adjusting of the storage amount of the face data in the face database of the target device based on the target storage space data comprises:
acquiring the storage time of each face data in the face database of the target equipment;
and sequentially deleting the face data in the face database of the target equipment according to the sequence of the storage time from first to last until the current storage space of the face database of the target equipment meets the target storage space data.
6. The data processing method of claim 1, wherein the performing face recognition on the face features to be recognized according to the adjusted face databases of the target device and the associated device comprises:
searching a target face characteristic matched with the face characteristic to be recognized in the adjusted face database of the target equipment;
when the target face features matched with the face features to be recognized are not found in the adjusted face database of the target equipment, searching the target face features matched with the face features to be recognized in the face database of the associated equipment;
and when the target face features matched with the face features to be recognized are found in the face database of the associated equipment, feeding back the face recognition results corresponding to the target face features to the adjusted target equipment.
7. The data processing method of claim 6, wherein the method further comprises:
when the target face features matched with the face features to be recognized are not found in the face database of the associated equipment, carrying out face recognition on the face features to be recognized at the cloud end;
and feeding back the face recognition result of the cloud to the adjusted target equipment.
8. The data processing method of claim 1, wherein the method further comprises:
comparing the face data in the face database of the target equipment and the face data in the face database of the associated equipment;
and removing the repeated face data according to the comparison result.
9. The data processing method of claim 8, wherein the removing of the repeated face data according to the comparison result comprises:
determining repeated face data according to the comparison result;
determining target adjusting equipment with smaller storage space according to the storage space data of the target equipment and the associated equipment;
and searching the repeated face data in the target adjusting equipment and removing the repeated face data.
10. A data processing apparatus, characterized by comprising:
an acquisition unit configured to acquire status information of a target device;
the adjusting unit is used for adjusting the storage quantity of the face data in the face database of the target device according to the state information;
the receiving unit is used for receiving the human face features to be recognized through the adjusted target equipment and determining associated equipment which establishes network connection with the adjusted target equipment;
and the recognition unit is used for carrying out face recognition on the face features to be recognized according to the adjusted target equipment and the face database of the associated equipment.
11. The apparatus of claim 10, wherein the adjusting unit comprises:
the first determining subunit is used for determining a target storage proportion of a face database of the target equipment according to the state information;
the calculating subunit is used for calculating target storage space data of the face database of the target equipment according to the target storage proportion;
and the adjusting subunit is used for adjusting the storage quantity of the face data in the face database of the target device based on the target storage space data.
12. The apparatus of claim 1, wherein the determining the sub-unit comprises:
the first determining module is used for determining a first storage proportion of a face database of the target equipment according to the network state data;
the second determining module is used for determining a second storage proportion of the face database of the target equipment according to the storage space data;
and the calculation module is used for obtaining the target storage proportion of the face database of the target equipment based on the first storage proportion and the second storage proportion.
13. A computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the data processing method according to any one of claims 1 to 9.
14. A computer device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps of the data processing method according to any one of claims 1 to 9.
15. A computer program, characterized in that it comprises computer instructions stored in a computer-readable storage medium, from which a processor of a computer device reads the computer instructions, the processor executing the computer instructions, causing the computer device to perform the data processing method of any one of claims 1 to 9.
CN202110767293.6A 2021-07-07 2021-07-07 Data processing method, data processing device, computer readable storage medium and computer equipment Pending CN115658641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110767293.6A CN115658641A (en) 2021-07-07 2021-07-07 Data processing method, data processing device, computer readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110767293.6A CN115658641A (en) 2021-07-07 2021-07-07 Data processing method, data processing device, computer readable storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN115658641A true CN115658641A (en) 2023-01-31

Family

ID=85015097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110767293.6A Pending CN115658641A (en) 2021-07-07 2021-07-07 Data processing method, data processing device, computer readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN115658641A (en)

Similar Documents

Publication Publication Date Title
CN107798354B (en) Image clustering method and device based on face image and storage equipment
CN107886079A (en) Object identifying method, apparatus and system
CN109165307B (en) Feature retrieval method, device and storage medium
WO2019210751A1 (en) Face retrieval method and apparatus, and server and storage medium
CN110321448A (en) A kind of image search method, device and storage medium
CN108228709B (en) Data storage method and system, electronic device, program, and medium
CN106202416A (en) Table data write method and device, table data read method and device
CN109800318A (en) A kind of archiving method and device
US20140365501A1 (en) Content distribution method and content distribution server
CN113569138A (en) Intelligent device control method and device, electronic device and storage medium
CN111159443B (en) Image characteristic value searching method and device and electronic equipment
CN112115281A (en) Data retrieval method, device and storage medium
CN115658641A (en) Data processing method, data processing device, computer readable storage medium and computer equipment
CN114267440B (en) Medical order information processing method and device and computer readable storage medium
CN111061916A (en) Video sharing system based on multi-target library image recognition
CN114300082B (en) Information processing method and device and computer readable storage medium
WO2021047305A1 (en) Face search method and device, apparatus, and computer-readable storage medium
CN115563160A (en) Data processing method, data processing device, computer equipment and computer readable storage medium
CN112487082B (en) Biological feature recognition method and related equipment
CN114090911A (en) Interface processing method and device, computer equipment and computer readable storage medium
CN113283410A (en) Face enhancement recognition method, device and equipment based on data association analysis
JP5923744B2 (en) Image search system, image search method, and search apparatus
CN112596903A (en) Intelligent information processing method and device based on big data
CN114547182A (en) Personnel information synchronization method, terminal device and storage medium
CN111753756A (en) Object identification-based deployment alarm method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination