Data processing method and device, computer readable storage medium and computer equipment
By acquiring the status information of the target device, adjusting the storage capacity of the face database, and combining network status and storage space, face recognition is performed using associated devices and the cloud, solving the problem of insufficient storage space on the device side and achieving efficient utilization of storage resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2021-07-07
- Publication Date
- 2026-05-22
AI Technical Summary
As the number of times the face database on the device increases, the storage space becomes insufficient, resulting in low storage efficiency and affecting the normal operation of the device.
By acquiring the status information of the target device, adjusting the storage capacity of the face database, and combining network status and storage space, the storage strategy is optimized. Face recognition is then performed using associated devices and the cloud, reducing the consumption of storage resources.
While ensuring that facial recognition functions normally, reduce the storage resources occupied by the target device on the facial database, improve storage efficiency, and avoid wasting storage space.
Smart Images

Figure CN115658641B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, specifically to a data processing method, apparatus, computer-readable storage medium, and computer device. Background Technology
[0002] Facial recognition is a biometric technology that identifies individuals based on their facial features. With the continuous development of internet technology, facial recognition technology is increasingly being used in various devices, making daily life more convenient for users.
[0003] However, over time, the face database on the device grows with each user interaction, leading to insufficient device storage space and affecting the normal operation of the device. The storage efficiency of the face database is relatively low. Summary of the Invention
[0004] This application provides a data processing method, apparatus, computer-readable storage medium, and computer device, which can improve the storage efficiency of the face database of the target device.
[0005] This application provides a data processing method, including:
[0006] Obtain the status information of the target device;
[0007] The storage quantity of face data in the face database of the target device is adjusted according to the status information;
[0008] The target device receives the facial features to be identified and determines the associated device that establishes a network connection with the target device.
[0009] Face recognition is performed on the facial features to be identified based on the adjusted face databases of the target device and the associated device.
[0010] Accordingly, embodiments of this application provide a data processing apparatus, including:
[0011] The acquisition unit is used to acquire the status information of the target device;
[0012] An adjustment unit is used to adjust the number of face data stored in the face database of the target device according to the status information;
[0013] The receiving unit is used to receive the facial features to be identified through the adjusted target device, and to determine the associated device that establishes a network connection with the adjusted target device;
[0014] The recognition unit is used to perform face recognition on the facial features to be recognized based on the adjusted face database of the target device and the associated device.
[0015] In one embodiment, the adjustment unit includes:
[0016] The first determining subunit is used to determine the target storage ratio of the face database of the target device based on the status information;
[0017] A calculation subunit is used to calculate the target storage space data of the face database of the target device according to the target storage ratio;
[0018] The adjustment subunit is used to adjust the amount of face data stored in the face database of the target device based on the target storage space data.
[0019] In one embodiment, the first determining subunit includes:
[0020] The first determining module is used to determine the first storage ratio of the face database of the target device based on the network status data;
[0021] The second determining module is used to determine the second storage ratio of the face database of the target device based on the storage space data;
[0022] The calculation module is used to obtain the target storage ratio of the face database of the target device based on the first storage ratio and the second storage ratio.
[0023] In one embodiment, the first determining module is configured to:
[0024] When the packet transmission delay rate is greater than the first preset threshold, a first adjustment ratio is determined based on the packet transmission delay rate;
[0025] When the packet loss rate is greater than the second preset threshold, a second adjustment ratio is determined based on the packet loss rate;
[0026] The first storage ratio of the face database of the target device is obtained based on the first adjustment ratio and the second adjustment ratio.
[0027] In one embodiment, the adjustment subunit is configured to:
[0028] Obtain the storage time of each face data in the face database of the target device;
[0029] The face data in the face database of the target device are deleted sequentially according to the storage time from earliest to latest, until the current storage space of the face database of the target device meets the target storage space data.
[0030] In one embodiment, the identification unit includes:
[0031] The first search subunit is used to search for a target face feature that matches the face feature to be identified in the face database of the adjusted target device;
[0032] The second search subunit is used to search for a target face feature that matches the face feature to be identified in the face database of the associated device when no target face feature matching the face feature to be identified is found in the face database of the adjusted target device.
[0033] The first feedback subunit is used to feed back the face recognition result corresponding to the target face feature to the adjusted target device when a target face feature matching the face feature to be identified is found in the face database of the associated device.
[0034] In one embodiment, the data processing apparatus further includes:
[0035] The first identification unit is used to perform face recognition on the face feature to be identified in the cloud when no target face feature matching the face feature to be identified is found in the face database of the associated device.
[0036] The second feedback unit is used to feed back the face recognition results from the cloud to the adjusted target device.
[0037] In one embodiment, the data processing apparatus further includes:
[0038] The comparison unit is used to compare the face data in the face database of the target device and the associated device;
[0039] The removal unit is used to remove duplicate face data based on the comparison results.
[0040] In one embodiment, the removal unit includes:
[0041] The second determining subunit is used to determine duplicate face data based on the comparison results;
[0042] The third determining subunit is used to determine the target adjustment device with a smaller storage space based on the storage space data of the target device and the associated device;
[0043] A removal subunit is used to locate and remove duplicate face data in the target adjustment device.
[0044] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the data processing methods provided in embodiments of this application.
[0045] Furthermore, this application also provides a computer device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the data processing method provided in this application.
[0046] This application also provides a computer program product or computer program, which includes computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium and executes the computer instructions, causing the computer device to perform the steps in the data processing method provided in this application.
[0047] This application embodiment obtains the status information of the target device; adjusts the storage quantity of face data in the target device's face database based on the status information; receives the facial features to be identified through the adjusted target device and determines the associated devices that establish a network connection with the adjusted target device; and performs face recognition based on the facial databases of the adjusted target device and the associated devices. Thus, by obtaining the status information of the target device and adjusting the storage quantity of face data in the target device's face database based on the status information, the storage space of the target device's face database can be flexibly adjusted, avoiding waste of storage space. Simultaneously, by performing face recognition on the facial features to be identified through the adjusted face databases of the target device and the associated devices, the storage resource occupation of the target device's face database can be further reduced while ensuring normal face recognition, thereby improving the storage efficiency of the target device's face database. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a schematic diagram illustrating an implementation scenario of a data processing method provided in an embodiment of this application;
[0050] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0051] Figure 3 This is another schematic flowchart of a data processing method provided in an embodiment of this application;
[0052] Figure 4This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application;
[0053] Figure 5 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] This application provides a data processing method, apparatus, computer-readable storage medium, and computer device. The data processing apparatus can be integrated into the computer device, which may be a server or a terminal, etc.
[0056] For better illustration of the embodiments of this application, please refer to the following terms:
[0057] Computer Vision (CV) is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in recognizing and measuring targets, and then performs image processing to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), autonomous driving, intelligent transportation, and other technologies, as well as common biometric recognition technologies such as facial recognition and fingerprint recognition.
[0058] Facial recognition is a biometric technology that identifies individuals based on their facial features. It involves using cameras or webcams to capture images or video streams containing faces, automatically detecting faces within the images, and then performing facial recognition on the detected faces. It is also commonly referred to as image recognition or facial identification.
[0059] Please see Figure 1 Taking the integration of data processing devices into computer equipment as an example, Figure 1This is a schematic diagram illustrating an implementation scenario of the data processing method provided in this application, including server A and terminal B. Server A can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) services, and big data and artificial intelligence platforms. Server A can obtain the status information of the target device; adjust the storage quantity of face data in the face database of the target device according to the status information; receive the face features to be identified through the adjusted target device, and determine the associated devices that establish a network connection with the adjusted target device; and perform face recognition based on the face databases of the adjusted target device and the associated devices.
[0060] Terminal B can be any network-connected computer device, such as a smartphone, tablet, laptop, facial recognition payment terminal, facial recognition payment device, or desktop computer, but is not limited to these. Terminal B and server A can be directly or indirectly connected via wired or wireless communication. Server A can obtain data uploaded by terminal B to perform corresponding data processing operations; this application does not impose any restrictions on this.
[0061] It should be noted that, Figure 1 The illustrated implementation environment scenario of the data processing method is merely an example. The implementation environment scenario of the data processing method described in this application embodiment is for the purpose of more clearly illustrating the technical solution of this application embodiment and does not constitute a limitation on the technical solution provided in this application embodiment. Those skilled in the art will understand that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided in this application is also applicable to similar technical problems.
[0062] The solutions provided in this application relate to technologies such as artificial intelligence facial recognition, and are specifically illustrated through the following embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0063] This embodiment will be described from the perspective of a data processing device, which can be integrated into a computer device, which can be a server, and this application does not limit it.
[0064] Please see Figure 2 , Figure 2 This is a flowchart illustrating the data processing method provided in an embodiment of this application. The data processing method includes:
[0065] In step 101, the status information of the target device is obtained.
[0066] With the continuous development of internet technology, facial recognition technology is increasingly being used in various devices, such as facial payment devices, facilitating users' daily lives. Facial payment devices collect a user's facial image, extract features from it to obtain the facial features to be recognized, and then compare these features with a facial database to find the feature with the highest similarity to the input facial features. This highest similarity value is compared with a preset threshold; if it exceeds the threshold, the corresponding identity information is returned and payment is processed, completing the facial recognition and payment process. However, over time, the facial data stored in the facial payment device's database grows with increased user activity, leading to insufficient storage space and affecting the device's normal operation. This demonstrates the low storage efficiency of facial databases.
[0067] To address the issue of low storage efficiency in the aforementioned face database, this application provides a data processing method, which will be described in detail below.
[0068] First, the status information of the target device can be obtained. This target device can be a facial payment device, which may contain a facial database for storing facial data. This facial data can include facial features and corresponding identity information. Specifically, the target device can capture the user's facial image and extract features to obtain the user's facial features. Then, through feature comparison, the identity information corresponding to the user's facial features can be obtained from the facial database.
[0069] In one embodiment, a client can be installed on the target device, and the target device can complete the facial payment process through the client. Specifically, the client can call an image acquisition device to acquire facial images, or the client can perform facial recognition on the acquired facial images, and then the facial data can be stored in the facial database of the target device.
[0070] This status information characterizes the target device's condition and may include network status data and storage space data. The network status data may include packet latency rate and packet loss rate. The packet latency rate can be the ratio of delayed data packets to the total number of transmitted data packets, or the ratio of delayed data packets with a latency exceeding a preset threshold to the total number of transmitted data packets, etc. The packet loss rate is the ratio of the number of lost data packets to the total number of transmitted data packets. The packet latency rate and packet loss rate can be used to assess the target device's network status. Additionally, the network status data may include the type of network the target device is connected to, such as WiFi, 4G, 5G, etc.
[0071] The storage space data can be the capacity data of the face database of the target device. The storage space data can include the total capacity of face data that the target device can store, that is, the total capacity of the face database of the target device. In one embodiment, the storage space data can also be the storage occupancy rate of the face database of the target device. The storage occupancy rate is the ratio of the storage space occupied by the face data already stored in the face database of the target device to the total storage space of the face database of the target device.
[0072] In one embodiment, the status information of the target device can be acquired periodically by setting a timed task, or the status information of the target device can be collected periodically by the target device itself, or the status information of the target device can be detected in real time. When the status information meets preset conditions, the status information of the target device can be acquired. For example, the status information of the target device can be acquired when the packet loss rate is greater than a preset threshold, or when the packet transmission delay rate is greater than a preset threshold, or when both the packet loss rate and the packet transmission delay rate meet preset conditions.
[0073] In step 102, the amount of face data stored in the face database of the target device is adjusted according to the status information.
[0074] The facial data stored in the target device's facial database grows continuously over time and with increased user activity, consuming a significant amount of storage space. This reduces the available storage space, potentially causing device lag and hindering normal operation. Therefore, under normal circumstances, excessive storage space should be avoided. When determining the storage strategy for the facial database, unnecessary space consumption should be minimized while maintaining facial recognition efficiency. However, solely basing the storage strategy on the target device's storage capacity can lead to resource waste. For instance, when the network connection is good, cloud-based facial recognition may be faster than local recognition, making cloud-based methods more suitable. However, if the target device's storage capacity is sufficient, storing facial data in its database and using it for facial recognition can unnecessarily consume its storage space.
[0075] 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 status of the target device and the network status. That is, the amount of face data stored in the face database of the target device can be optimized and adjusted according to the status information of the target device, so as to make better use of the storage space of the face database of the target device. While ensuring the efficiency of users performing face recognition through the target device, unnecessary occupation of the target device's face database storage space is reduced, thereby improving the storage efficiency of the face database.
[0076] In one embodiment, the step of adjusting the number of face data stored in the face database of the target device based on the status information may include:
[0077] (1) Determine the target storage ratio of the face database of the target device based on the status information;
[0078] (2) Calculate the target storage space data of the face database of the target device based on the target storage ratio;
[0079] (3) Adjust the number of face data stored in the face database of the target device based on the target storage space data.
[0080] The target storage ratio is a value calculated based on the target device's status information. This ratio represents the proportion of storage space occupied by the face data that the target device's face database should store in its current state, to the total storage space of the face database. For example, assuming the target device's face database should store 3 gigabytes (GB) of face data in its current state, and the total storage space of the face database is 16 GB, then the target storage ratio is 3 / 16 = 0.1875, or 18.75%. When the target device is in a state based on its status information, and the ratio of the storage space occupied by the face data in the target device's face database to the total storage space is this target storage ratio, the efficiency of face payment can be guaranteed, and unnecessary occupation of the face database's storage space can be reduced.
[0081] The target storage space data refers to the maximum storage space occupied by the face data that the target device's face database can store, calculated based on the target storage ratio. For example, assuming the total storage space of the target device's face database is 32GB, and the target storage ratio of the face database is determined to be 10% based on the target device's status information, then the face data stored in the target device's face database should be adjusted so that the storage space occupied by the face data stored in the face database does not exceed 3.2GB.
[0082] Furthermore, the number of face data stored in the face database of the target device can be adjusted based on the target storage space data. When the storage space occupied by the face data stored in the face database of the target device is less than the storage space of the target storage space data, the number of face data stored in the face database of the target device does not need to be adjusted. When the storage space occupied by the face data stored in the face database of the target device is greater than the storage space of the target storage space data, the number of face data stored in the face database of the target device can be adjusted based on the target storage space data.
[0083] In one embodiment, the storage time of each face data in the face database of the target device can be obtained. The face data in the face database of the target device are then deleted sequentially according to their storage time, until the current storage space of the face database of the target device meets the target storage space requirement. For example, assuming that the face database of the target device stores four face data A, B, C, and D sequentially, when the target storage space determines that the face database of the target device can only store two face data, the face data in the face database of the target device can be deleted sequentially according to their storage time, that is, A is deleted first, then B is deleted, until the current storage space of the face database of the target device meets the target storage space requirement.
[0084] In one embodiment, the status information may include network status data and storage space data. The step of determining the target storage ratio of the face database of the target device based on the status information may include:
[0085] (1.1) Determine the first storage ratio of the face database of the target device based on the network status data;
[0086] (1.2) Determine the second storage ratio of the face database of the target device based on the storage space data;
[0087] (1.3) Based on the first storage ratio and the second storage ratio, the target storage ratio of the face database of the target device is obtained.
[0088] The first storage ratio is a value calculated based on the network status data of the target device. This ratio is the ratio of the storage space occupied by the face data that should be stored in the face database of the target device, as determined by the network status data, to the total storage space of the face database. For example, assuming the storage space occupied by the face data that should be stored in the face database of the target device, as determined by the network status data, is 3GB, and the total storage space of the face database is 16GB, then the first storage ratio can be 3 / 16 = 0.1875, which 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 this first storage ratio under the network status based on the network status data, the efficiency of face payment can be guaranteed, and unnecessary occupation of the face database storage space can be reduced.
[0089] The second storage ratio is a value calculated based on the storage space data of the target device. This ratio is the ratio of the storage space occupied by the face data that should be stored in the face database of the target device, determined based on the target device's storage space data, to the total storage space of the face database. For example, assuming the storage space occupied by the face data that should be stored in the face database of the target device, determined based on the target device's storage space data, is 3GB, and the total storage space of the face database is 16GB, then the second storage ratio can be 3 / 16 = 0.1875, or 18.75%. When the storage ratio of the face data occupied by the face database of the target device to the total storage space is this second storage ratio, the efficiency of face payment can be guaranteed, and unnecessary occupation of the face database's storage space can be reduced, avoiding the inability of face recognition to function properly due to insufficient storage space in the target device's face database.
[0090] Specifically, when the target device has limited storage space, facial data can be stored in the cloud and facial recognition can be performed using the cloud's facial database. When the target device has limited storage space, facial data can be stored in the target device itself and facial recognition can be performed using the target device's facial database.
[0091] In one embodiment, the total storage space of the target device can be determined based on storage space data, and a second storage ratio of the face database of the target device can be determined based on the size of the total storage space. For example, when the size of the total storage space meets a preset range, the second storage ratio is determined based on the preset range. For instance, when the size of the total storage space is between 8GB and 16GB, the second storage ratio of the target device with the total storage space in the preset range can be determined as 20%; when the size of the total storage space is between 64GB and 128GB, the second storage ratio of the target device with the total storage space in the preset range can be determined as 40%; and when the size of the total storage space is between 128GB and 256GB, the second storage ratio of the target device with the total storage space in the preset range can be determined as 50%. The specific preset range and the second storage ratio can be set according to actual applications and are not limited here.
[0092] In one embodiment, the storage occupancy rate of the face database of the target device can be determined based on the storage space data. The second storage ratio of the face database of the target device can be determined based on the size of the storage occupancy rate. For example, when the storage occupancy rate is greater than a preset threshold, the second storage ratio of the face database of the target device can be determined. For example, when the storage occupancy rate is greater than 80%, the second storage ratio of the face database of the target device can be determined to be 50%. The specific preset threshold and the second storage ratio can be set according to the actual application and are not limited here.
[0093] Specifically, the target storage ratio of the face database of the target device can be obtained based on the first storage ratio determined by network status data and the second storage ratio determined by storage space data.
[0094] In one embodiment, the first storage ratio and the second storage ratio can be weighted according to preset weights to obtain the target storage ratio of the face database of the target device. For example, the preset weight can be 0.5, and then the first storage ratio and the second storage ratio can be multiplied by the preset weight of 0.5 respectively, and the weighted results can be accumulated to obtain the target storage ratio of the face database of the target device. Alternatively, the first storage ratio can be multiplied by the weight of 0.6, the second storage ratio can be multiplied by the weight of 0.6, and the weighted results can be accumulated to obtain the target storage ratio of the face database of the target device, and so on. The specific weights can be set according to the actual situation and are not limited here.
[0095] In one embodiment, the network status data may include packet latency and packet loss rate, and the step of determining the first storage ratio of the face database of the target device based on the network status data may include:
[0096] (1.1.1) When the packet transmission delay rate is greater than the first preset threshold, the first adjustment ratio can be determined based on the packet transmission delay rate;
[0097] (1.1.2) When the packet loss rate is greater than the second preset threshold, the second adjustment ratio is determined based on the packet loss rate;
[0098] (1.1.3) The first storage ratio of the face database of the target device is obtained according to the first adjustment ratio and the second adjustment ratio.
[0099] The first preset threshold is a preset critical value greater than or equal to 0. When the packet latency rate is greater than this critical value, a first adjustment ratio can be determined based on the packet latency rate. When the packet latency rate is low, i.e., when the network is good, the speed of face recognition via the cloud and face recognition via the target device is close. Therefore, in order to reduce the storage space occupied by face data in the target device's face database, face recognition can be performed via the cloud. In this case, face data does not need to be stored in the target device's face database. When the packet latency rate is high, i.e., when the network is poor, the speed of face recognition via the cloud is slower. To ensure the efficiency of facial recognition, facial recognition can be performed using the facial database of the target device. This database can store all or most of the facial data. Specifically, for example, when the packet transmission latency rate is 0%, the first threshold to be adjusted can be set to 0%; when the packet transmission latency rate is greater than 0 but less than 1%, the first threshold to be adjusted can be set to 50%; when the packet transmission latency rate is greater than 5%, the first threshold to be adjusted can be set to 80%; and when the packet transmission latency rate is greater than 10%, the first threshold to be adjusted can be set to 100%. The first preset threshold and the first adjustment ratio can be set according to the actual situation and are not limited here.
[0100] The second preset threshold is a predetermined threshold value greater than or equal to 0. When the packet loss rate exceeds this threshold, a second adjustment ratio can be determined based on the packet loss rate. When the packet loss rate is low, i.e., the network is good, face recognition can be performed via the cloud, and the target device's face database does not need to store face data. When the packet loss rate is high, i.e., the network is poor, face recognition via the cloud is slow, and face recognition can be performed via the target device's face database. In this case, the target device's face database can store all or most of the face data to ensure normal face recognition. For example, when the packet loss rate is 0%, the second adjustment ratio can be set to 0%; when the packet loss rate is greater than 0 and less than 1%, the second adjustment ratio can be set to 80%; when the packet loss rate is greater than 5%, the second adjustment ratio can be set to 100%. The second preset threshold and the second adjustment ratio can be set according to the actual situation and are not limited here.
[0101] The first storage ratio of the face database of the target device can be obtained by using the first adjustment ratio determined by the packet delay rate and the second adjustment ratio determined by the packet loss rate.
[0102] In one embodiment, the first adjustment ratio and the second adjustment ratio can be weighted according to preset weights to obtain the first storage ratio of the face database of the target device. For example, the preset weight can be 0.5, and then the first adjustment ratio and the second adjustment ratio can be multiplied by the preset weight of 0.5 respectively, and the weighted results can be accumulated to obtain the first storage ratio of the face database of the target device. Alternatively, the first adjustment ratio can be multiplied by the weight of 0.4, the second adjustment ratio can be multiplied by the weight of 0.6, and the weighted results can be accumulated to obtain the first storage ratio of the face database of the target device, and so on. The specific weights can be set according to the actual situation and are not limited here.
[0103] In step 103, the facial features to be identified are received through the adjusted target device, and the associated device that establishes a network connection with the adjusted target device is determined.
[0104] The facial features to be identified can be facial information that has not yet been recognized, which is collected by the image acquisition device of the target device. The facial information can be a facial image collected by the image acquisition device, or a facial feature obtained after feature extraction from the facial image. The facial feature can be a feature string information that uniquely identifies a user by converting facial image information.
[0105] The associated device can be at least one device that establishes a network connection with the target device. Both the associated device and the target device are devices used for facial recognition; specifically, they can be devices used for facial payment in the same store. They can be associated via network connections such as Bluetooth, and the target device and associated device can share information through the network connection. That is, the data processing method provided in this application embodiment can be applied to both the target device and the associated device, meaning that the data processing method provided in this application embodiment can process multiple devices under the same network connection simultaneously.
[0106] The system receives the facial features of the person to be identified through the adjusted associated device and determines the device that establishes a network connection with the adjusted associated device.
[0107] In step 104, face recognition is performed on the face features to be recognized based on the adjusted face databases of the target device and associated devices.
[0108] To further reduce storage resource consumption, facial data can be distributed and stored across multiple facial payment devices within a store. This reduces redundant storage of facial data and thus reduces storage resource consumption. Specifically, facial data can be distributed and stored across the target device and associated devices. Then, facial recognition can be performed by combining the target device and associated devices to identify the facial features. First, the facial database of the target device can be searched for matching facial data, and then the facial database of the associated devices can be searched.
[0109] Specifically, the system can search for a matching face feature in the face database of the target device after adjusting the target storage space data. When a matching face feature is found in the face database of the adjusted target device, i.e., the face recognition is successful, the recognition result can be displayed on the adjusted target device. For example, the identity information corresponding to the target face feature can be displayed on the adjusted target device, or the successful recognition information can be displayed on the adjusted target device. Alternatively, a face payment operation can be performed directly, and the payment result can be returned to the target device.
[0110] When no matching face feature is found in the face database of the adjusted target device, a matching face feature can be searched simultaneously in the face databases of at least one associated device. When a matching face feature is found in the face database of an associated device, the face recognition result corresponding to that face feature is fed back to the adjusted target device. This face recognition result can be the identity information corresponding to the face feature, or it can be a message indicating successful face recognition to the user. Specifically, when a matching face feature is found in the face databases of multiple associated devices, the search result from the associated device that found the matching face feature fastest can be prioritized, and the face recognition result is returned to the adjusted target device based on that search result.
[0111] In one embodiment, when no matching face feature is found in the face database of the associated device, face recognition can be performed on the face feature to be identified in the cloud. The cloud-based face database can store the face data of all users. Specifically, a search is performed in the cloud-based face database. When a matching face feature is found, the face recognition result from the cloud is fed back to the adjusted target device. Alternatively, the face data corresponding to the target face feature can be stored in the target device for future use, or it can be stored in the associated device. The specific storage method can be determined based on actual conditions and is not limited here. When no matching face feature is found, the face recognition result is fed back to the adjusted target device; for example, a "not found" message is returned to the adjusted target device.
[0112] In one embodiment, in order to further reduce the unnecessary occupation of the target device's face database storage space, cross-end alignment can be used to remove duplicate face data between the target device and associated devices, thereby further improving the storage efficiency of the target device's face database. Specifically, the face data in the face databases of the target device and associated devices can be compared. For example, the face features of all face data stored in the target device's face database can be sent to each associated device for comparison, and the face data corresponding to duplicate face features can be removed based on the comparison results.
[0113] In one embodiment, to ensure reasonable storage of the target device and associated devices, duplicate face data can be deleted from devices with smaller storage spaces. Specifically, duplicate face data can be identified based on comparison results; a target adjustment device with smaller storage space can be identified based on the storage space data of the target device and the associated device; and the duplicate face data can be located and removed from the target adjustment device. For example, if duplicate face data F is found in the face databases of both the target device and associated device E (meaning face data F is stored in both the target device's and associated device E's face databases), and assuming the storage space of the target device's face database is larger than that of the associated device E's face database, then associated device E is identified as the target adjustment device, and face data F is removed from associated device E.
[0114] In one embodiment, facial data stored in the facial database of the target device and associated devices can be acquired periodically and saved. When the target device or associated device malfunctions, the saved facial data can be sent back to the target device or associated device.
[0115] As described above, this embodiment of the application obtains the status information of the target device; adjusts the storage quantity of face data in the target device's face database based on the status information; receives the face features to be identified through the adjusted target device and determines the associated devices that establish a network connection with the adjusted target device; and performs face recognition based on the face databases of the adjusted target device and the associated devices. Therefore, by obtaining the status information of the target device and adjusting the storage quantity of face data in the target device's face database based on the status information, the storage space of the target device's face database can be flexibly adjusted. Simultaneously, by performing face recognition on the face features to be identified through the adjusted face databases of the target device and the associated devices, the storage resources occupied by the target device's face database can be further reduced while ensuring normal face recognition, thus improving the storage efficiency of the target device's face database.
[0116] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.
[0117] In this embodiment, the data processing device will be specifically integrated into a computer device as an example for explanation. The data processing method is executed by a server, and the target device and associated devices are specifically described as a facial recognition payment device.
[0118] Please see Figure 3 , Figure 3 Another flowchart illustrating the data processing method provided in this application embodiment. The specific process can be as follows:
[0119] In step 201, the server obtains the status information of the target device.
[0120] The target device can be a facial payment device. A facial payment client can be installed on the target device, and the target device can complete the facial payment process through the client. Specifically, the client can call the target device's image acquisition device to acquire the user's facial image, or the client can perform facial recognition on the acquired facial image, and then store the facial data in the target device's facial database.
[0121] The server acquires the target device's status information, which characterizes the target device's condition and may include network status data and storage space data. The network status data may include packet latency rate and packet loss rate. The packet latency rate can be the ratio of delayed data packets to the total number of transmitted data packets, or the ratio of delayed data packets with a latency exceeding a preset threshold to the total number of transmitted data packets, etc. The packet loss rate is the ratio of the number of lost data packets to the total number of transmitted data packets. The packet latency rate and packet loss rate can be used to assess the target device's network status.
[0122] The storage space data is the capacity data of the face database of the target device. The storage space data may include the total capacity of the face data that the target device can store, that is, the total capacity of the face database of the target device. In one embodiment, the storage space data may also be the storage occupancy rate of the face database of the target device. The storage occupancy rate is the ratio of the storage space occupied by the face data already stored in the face database of the target device to the total storage space of the face database of the target device.
[0123] In one embodiment, the server can periodically acquire the status information of the target device by setting a scheduled task, or periodically collect the status information of the target device by using the target device itself, or detect the status information of the target device in real time. When the status information meets preset conditions, the server can acquire the status information of the target device. For example, the server can acquire the status information of the target device when the packet loss rate is greater than a preset threshold, or when the packet transmission delay rate is greater than a preset threshold, or when both the packet loss rate and the packet transmission delay rate meet preset conditions.
[0124] In step 202, when the packet transmission delay rate is greater than the first preset threshold, the server determines the first adjustment ratio based on the packet transmission delay rate. When the packet loss rate is greater than the second preset threshold, the server determines the second adjustment ratio based on the packet loss rate. The first storage ratio of the face database of the target device is obtained based on the first adjustment ratio and the second adjustment ratio.
[0125] Specifically, the server adjusts the storage quantity of face data in the face database of the target device based on the obtained status information. Specifically, when the packet transmission latency rate is greater than a first preset threshold, the server determines a first adjustment ratio based on the packet transmission latency rate. When the packet loss rate is greater than a second preset threshold, the server determines a second adjustment ratio based on the packet loss rate. Then, the first storage ratio of the face database of the target device can be obtained based on the first adjustment ratio and the second adjustment ratio.
[0126] The first preset threshold is a preset critical value greater than or equal to 0. When the packet transmission latency rate is greater than this critical value, the first adjustment ratio can be determined based on the packet transmission latency rate. When the packet transmission latency rate is small, that is, when the network is good, face recognition can be performed through the cloud. At this time, the face database of the target device does not need to store face data. When the packet transmission latency rate is large, that is, when the network is poor, the face recognition speed through the cloud is slow. Face recognition can be performed through the face database of the target device. At this time, the face database of the target device can store all or most of the face data. Specifically, for example, when the packet transmission latency rate is equal to 0%, the first adjustment ratio can be determined to be 0%; when the packet transmission latency rate is greater than 0 and less than 1%, the first adjustment ratio can be determined to be 50%; when the packet transmission latency rate is greater than 5%, the first adjustment ratio can be determined to be 80%; when the packet transmission latency rate is greater than 10%, the first adjustment ratio can be determined to be 100%. The first preset threshold and the first adjustment ratio can be set according to the actual situation and are not limited here.
[0127] The second preset threshold is a preset critical value greater than or equal to 0. When the packet loss rate is greater than this critical value, the second adjustment ratio can be determined based on the packet loss rate. When the packet loss rate is low, that is, when the network is good, face recognition can be performed through the cloud. At this time, the face database of the target device does not need to store face data. When the packet loss rate is high, that is, when the network is poor, the face recognition speed through the cloud is slow. Face recognition can be performed through the face database of the target device. At this time, the face database of the target device can store all or most of the face data. Specifically, for example, when the packet loss rate is equal to 0%, the second adjustment ratio can be determined to be 0%; when the packet loss rate is greater than 0 and less than 1%, the second adjustment ratio can be determined to be 80%; when the packet loss rate is greater than 5%, the second adjustment ratio can be determined to be 100%. The second preset threshold and the second adjustment ratio can be set according to the actual situation and are not limited here.
[0128] The server can obtain the first storage ratio of the face database of the target device based on the first adjustment ratio determined by the packet delay rate and the second adjustment ratio determined by the packet loss rate.
[0129] In one embodiment, the server can weight the first adjustment ratio and the second adjustment ratio according to preset weights to obtain the first storage ratio of the face database of the target device. For example, the preset weight can be 0.5, and then the first adjustment ratio and the second adjustment ratio can be multiplied by the preset weight of 0.5 respectively, and the weighted results can be accumulated to obtain the first storage ratio of the face database of the target device. Alternatively, the first adjustment ratio can be multiplied by the weight of 0.4, the second adjustment ratio can be multiplied by the weight of 0.6, and the weighted results can be accumulated to obtain the first storage ratio of the face database of the target device, and so on. The specific weights can be set according to the actual situation and are not limited here.
[0130] In step 203, the server determines the second storage ratio of the face database of the target device based on the storage space data.
[0131] The second storage ratio is a value calculated based on the target device's storage space data. This ratio is the ratio of the storage space occupied by the face data that should be stored in the target device's face database to the total storage space of the face database. For example, assuming the target device's face database should occupy 3GB of storage space and the total storage space of the face database is 16GB, then the second storage ratio can be 3 / 16 = 0.1875, or 18.75%. When the ratio of the storage space occupied by the face data in the target device's face database to the total storage space is this second storage ratio, the efficiency of face payment can be guaranteed, and unnecessary occupation of the face database's storage space can be reduced, avoiding the inability of face recognition to function properly due to insufficient storage space in the target device's face database.
[0132] Specifically, when the target device has limited storage space, the server can store facial data in the cloud and perform facial recognition through the cloud's facial database. When the target device has limited storage space, the server can store facial data in the target device and perform facial recognition through the target device's facial database.
[0133] In one embodiment, the server can determine the total storage space of the target device based on storage space data, and determine the second storage ratio of the face database of the target device based on the size of the total storage space. For example, when the size of the total storage space meets a preset range, the second storage ratio is determined based on the preset range. For instance, when the size of the total storage space is between 8GB (Gigabyte, abbreviated as GB) and 16GB, the second storage ratio of the target device with the total storage space in the preset range can be determined as 20%. When the size of the total storage space is between 64GB and 128GB, the second storage ratio of the target device with the total storage space in the preset range can be determined as 40%. When the size of the total storage space is between 128GB and 256GB, the second storage ratio of the target device with the total storage space in the preset range can be determined as 50%. The specific preset range and the second storage ratio can be set according to the actual application and are not limited here.
[0134] In one embodiment, the storage occupancy rate of the face database of the target device can be determined based on the storage space data. The second storage ratio of the face database of the target device can be determined based on the size of the storage occupancy rate. For example, when the storage occupancy rate is greater than a preset threshold, the second storage ratio of the face database of the target device can be determined. For example, when the storage occupancy rate is greater than 80%, the second storage ratio of the face database of the target device can be determined to be 50%. The specific preset threshold and the second storage ratio can be set according to the actual application and are not limited here.
[0135] In step 204, the server obtains the target storage ratio of the face database of the target device based on the first storage ratio and the second storage ratio, and calculates the target storage space data of the face database of the target device based on the target storage ratio.
[0136] The server can determine the target storage ratio of the face database of the target device based on the first storage ratio determined by network status data and the second storage ratio determined by storage space data, and calculate the target storage space data of the face database of the target device based on the target storage ratio.
[0137] In one embodiment, the first storage ratio and the second storage ratio can be weighted according to preset weights to obtain the target storage ratio of the face database of the target device. For example, the preset weight can be 0.5, and then the first storage ratio and the second storage ratio can be multiplied by the preset weight of 0.5 respectively, and the weighted results can be accumulated to obtain the target storage ratio of the face database of the target device. Alternatively, the first storage ratio can be multiplied by the weight of 0.6, the second storage ratio can be multiplied by the weight of 0.6, and the weighted results can be accumulated to obtain the target storage ratio of the face database of the target device, and so on. The specific weights can be set according to the actual situation and are not limited here.
[0138] The target storage space data refers to the maximum storage space occupied by the face data that the target device's face database can store, calculated based on the target storage ratio. For example, assuming the total storage space of the target device's face database is 32GB, and the target storage ratio of the face database is determined to be 10% based on the target device's status information, then the face data stored in the target device's face database should be adjusted so that the storage space occupied by the face data stored in the face database does not exceed 3.2GB.
[0139] In step 205, the server obtains the storage time of each face data in the face database of the target device, and deletes the face data in the face database of the target device in order of storage time from earliest to latest, until the current storage space of the face database of the target device meets the target storage space data.
[0140] Specifically, the server can obtain the storage time of each face data in the target device's face database; and delete the face data in the target device's face database sequentially according to the storage time from earliest to latest, until the current storage space of the target device's face database meets the target storage space requirements. For example, assuming the target device's face database stores four face data A, B, C, and D sequentially, when the target storage space determines that the target device's face database can only store two face data, the face data in the target device's face database can be deleted sequentially according to the storage time from earliest to latest, that is, A is deleted first, then B is deleted, until the current storage space of the target device's face database meets the target storage space requirements.
[0141] In step 206, the server receives the facial features to be identified through the adjusted target device and determines the associated device that establishes a network connection with the adjusted target device.
[0142] The facial features to be identified can be facial information that has not yet been recognized, which is collected by the image acquisition device of the target device. The facial information can be a facial image collected by the image acquisition device, or a facial feature obtained after feature extraction from the facial image. The facial feature can be a feature string information that uniquely identifies a user by converting facial image information.
[0143] The backend server can uniquely identify a facial payment device using a Serial Number (SN) and a store using a Machine Identifier (MCH_ID). A store typically hosts multiple facial payment devices. Before the devices are shipped to stores, the server can establish a mapping table between MCH_ID and SN to manage the devices within the store. Upon startup, the client installed on the facial payment device actively obtains the device's SN and MCH_ID, establishing a Bluetooth connection between the devices. The MCH_ID prevents accidental connections between devices from stores located close together. If the MCH_IDs of two devices differ after a successful Bluetooth connection, the connection will be broken, preventing incorrect connections between devices across stores. The associated device and the target device must be facial payment devices within the same store. Both devices have Bluetooth modules installed, allowing them to establish a Bluetooth connection and share information. The data processing method provided in this application embodiment can be applied to both the target device and associated devices, meaning that the data processing method provided in this application embodiment can process multiple devices under the same network connection simultaneously.
[0144] Similar to the target device, the server also needs to obtain the status information of the associated devices; adjust the storage quantity of face data in the face database of the associated devices according to the association information, receive the face features to be identified through the adjusted associated devices, and determine the devices that establish network connections with the adjusted associated devices.
[0145] In step 207, the server searches for a target face feature that matches the face feature to be identified in the face database of the adjusted target device. If no target face feature matching the face feature to be identified is found in the face database of the adjusted target device, the server searches for a target face feature matching the face feature to be identified in the face database of the associated device.
[0146] To further reduce storage resource consumption, facial data can be distributed and stored across multiple facial payment devices within a store. This reduces redundant storage of facial data and minimizes storage resource consumption. In other words, facial data can be distributed and stored across the target device and associated devices. Then, facial recognition can be performed by combining the target device and associated devices to identify the facial features. Specifically, the server can first search the facial database of the target device to see if there is facial data matching the facial features to be identified, and then search the facial database of the associated devices.
[0147] Specifically, the server can search for a target facial feature that matches the facial feature to be identified in the face database of the target device after adjusting the target storage space data. When a target facial feature that matches the facial feature to be identified is found in the face database of the adjusted target device, the recognition result is displayed on the adjusted target device. For example, the identity information corresponding to the target facial feature can be displayed on the adjusted target device, the recognition success information can be displayed on the adjusted target device, or a face payment operation can be performed directly and the payment result can be displayed on the adjusted target device.
[0148] When no matching face feature is found in the face database of the adjusted target device, the server can simultaneously search for a matching face feature in the face database of at least one associated device.
[0149] In step 208, when a target face feature matching the face feature to be identified 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.
[0150] Specifically, when a target facial feature matching the desired facial feature is found in the facial database of the associated device, the server can send the facial recognition result corresponding to that target facial feature back to the adjusted target device. This facial recognition result can be the identity information corresponding to the target facial feature, information indicating successful facial recognition, or information regarding facial payment results. When a target facial feature matching the desired facial feature is found in the facial databases of multiple associated devices, the search result from the associated device that found the match fastest is prioritized, and the facial recognition result is returned to the adjusted target device based on that search result.
[0151] In one embodiment, in order to further reduce the unnecessary occupation of the target device's face database storage space, the server can remove duplicate face data between the target device and associated devices through cross-end alignment, thereby further improving the storage efficiency of the target device's face database. Specifically, the server can compare the face data in the face databases of the target device and the associated devices. For example, the server can send the face features of all face data stored in the target device's face database to each associated device for comparison, and remove the face data corresponding to duplicate face features based on the comparison results.
[0152] In one embodiment, to ensure reasonable storage of the target device and associated devices, duplicate face data can be deleted from devices with smaller storage spaces. Specifically, the server can determine duplicate face data based on comparison results; determine a target adjustment device with smaller storage space based on the storage space data of the target device and associated devices; and search for and remove the duplicate face data in the target adjustment device. For example, if duplicate face data F is found in the face databases of the target device and associated device E (meaning face data F is stored in both the target device's and associated device E's face databases), and assuming the storage space of the target device's face database is larger than that of the associated device E's face database, then associated device E is identified as the target adjustment device, and face data F is removed from associated device E.
[0153] As can be seen from the above, in this embodiment, the server obtains the status information of the target device; when the packet transmission latency rate is greater than a first preset threshold, the server determines a first adjustment ratio based on the packet transmission latency rate; when the packet loss rate is greater than a second preset threshold, the server determines a second adjustment ratio based on the packet loss rate; the server obtains a first storage ratio of the face database of the target device based on the first and second adjustment ratios; the server determines a second storage ratio of the face database of the target device based on the storage space data; the server obtains a target storage ratio of the face database of the target device based on the first and second storage ratios, and calculates the target storage space data of the face database of the target device based on the target storage ratio; the server obtains the storage time of each face data in the face database of the target device, and processes the data in descending order of storage time. The face data in the target device's face database is deleted sequentially until the current storage space of the target device's face database meets the target storage space data. The server receives the face feature to be identified through the adjusted target device and determines the associated device that establishes a network connection with the adjusted target device. The server searches for a target face feature that matches the face feature to be identified in the face database of the adjusted target device. If no target face feature matching the face feature to be identified is found in the face database of the adjusted target device, the server searches for a target face feature matching the face feature to be identified in the face database of the associated device. When a target face feature matching the face feature to be identified 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. Therefore, by acquiring the target device's status information, the storage quantity of face data in the target device's face database is adjusted based on the network status data and storage space data in the status information. This allows for flexible adjustment of the target device's face database storage space in conjunction with the target device's network status and storage conditions. Simultaneously, by performing face recognition on the face features to be identified using the adjusted face databases of the target device and associated devices, face recognition can be performed while face recognition is proceeding normally, further reducing the target device's occupation of face database storage resources and improving the storage efficiency of the target device's face database.
[0154] To better implement the above methods, embodiments of the present invention also provide a data processing apparatus that can be integrated into a computer device, which can be a server.
[0155] For example, such as Figure 4 The diagram shown is a schematic representation of the structure of a data processing device provided in an embodiment of this application. The data processing device may include an acquisition unit 301, an adjustment unit 302, a receiving unit 303, and an identification unit 304, as follows:
[0156] Acquisition unit 301 is used to acquire the status information of the target device;
[0157] The adjustment unit 302 is used to adjust the number of face data stored in the face database of the target device according to the status information;
[0158] The receiving unit 303 is used to receive the facial features to be identified through the adjusted target device and determine the associated device that establishes a network connection with the adjusted target device.
[0159] The recognition unit 304 is used to perform face recognition on the face features to be recognized based on the face database of the adjusted target device and the associated device.
[0160] In one embodiment, the adjustment unit 302 includes:
[0161] The first determining subunit is used to determine the target storage ratio of the face database of the target device based on the status information.
[0162] The calculation subunit is used to calculate the target storage space data of the face database of the target device according to the target storage ratio.
[0163] The adjustment subunit is used to adjust the amount of face data stored in the face database of the target device based on the target storage space data.
[0164] In one embodiment, the first determining subunit includes:
[0165] The first determining module is used to determine the first storage ratio of the face database of the target device based on the network status data.
[0166] The second determining module is used to determine the second storage ratio of the face database of the target device based on the storage space data.
[0167] The calculation module is used to obtain the target storage ratio of the face database of the target device based on the first storage ratio and the second storage ratio.
[0168] In one embodiment, the first determining module is configured to:
[0169] When the packet transmission delay rate is greater than the first preset threshold, the first adjustment ratio is determined based on the packet transmission delay rate.
[0170] When the packet loss rate is greater than the second preset threshold, the second adjustment ratio is determined based on the packet loss rate;
[0171] The first storage ratio of the face database of the target device is obtained based on the first adjustment ratio and the second adjustment ratio.
[0172] In one embodiment, the adjustment subunit is configured to:
[0173] Obtain the storage time of each face data in the face database of the target device;
[0174] The face data in the face database of the target device are deleted sequentially according to the storage time from earliest to latest, until the current storage space of the face database of the target device meets the target storage space data.
[0175] In one embodiment, the identification unit 304 includes:
[0176] The first search subunit is used to search for a target face feature that matches the face feature to be identified in the face database of the adjusted target device;
[0177] The second search subunit is used to search for a target face feature that matches the face feature to be identified in the face database of the associated device when no target face feature matching the face feature to be identified is found in the face database of the adjusted target device.
[0178] The first feedback subunit is used to feed back the face recognition result corresponding to the target face feature to the adjusted target device when a target face feature matching the face feature to be identified is found in the face database of the associated device.
[0179] In one embodiment, the data processing apparatus further includes:
[0180] The first identification unit is used to perform face recognition on the face feature to be identified in the cloud when no target face feature matching the face feature to be identified is found in the face database of the associated device.
[0181] The second feedback unit is used to feed back the face recognition results from the cloud to the adjusted target device.
[0182] In one embodiment, the data processing apparatus further includes:
[0183] The comparison unit is used to compare the facial data of the target device with the facial database of the associated device.
[0184] The removal unit is used to remove duplicate face data based on the comparison results.
[0185] In one embodiment, the removal unit includes:
[0186] The second determining subunit is used to determine duplicate face data based on the comparison results;
[0187] The third determining subunit is used to determine the target regulating device with a smaller storage space based on the storage space data of the target device and the associated device;
[0188] The removal subunit is used to locate and remove duplicate face data in the target adjustment device.
[0189] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0190] As described above, this embodiment of the application obtains the status information of the target device through the acquisition unit 301; the adjustment unit 302 adjusts the storage quantity of face data in the face database of the target device according to the status information; the receiving unit 303 receives the face features to be identified through the adjusted target device and determines the associated device that establishes a network connection with the adjusted target device; and the recognition unit 304 performs face recognition based on the face databases of the adjusted target device and the associated device. Thus, by obtaining the status information of the target device and adjusting the storage quantity of face data in the face database of the target device according to the status information, the storage space of the face database of the target device can be flexibly adjusted. Simultaneously, by performing face recognition on the face features to be identified through the adjusted face databases of the target device and the associated device, the storage resources occupied by the target device's face database can be further reduced while face recognition is proceeding normally, thereby improving the storage efficiency of the target device's face database.
[0191] This application also provides a computer device, such as... Figure 5 As shown, it illustrates a structural diagram of a computer device involved in an embodiment of this application. This computer device may be a server, specifically:
[0192] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 5 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0193] The processor 401 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions of the computer device and processes data, thereby performing overall detection of the computer device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0194] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running 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. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one 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 with access to the memory 402.
[0195] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0196] The computer device may also include an input unit 404, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0197] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:
[0198] Obtain the status information of the target device; adjust the storage quantity of face data in the face database of the target device according to the status information; receive the face features to be identified through the adjusted target device, and determine the associated devices that establish a network connection with the adjusted target device; perform face recognition based on the face databases of the adjusted target device and the associated devices.
[0199] The specific implementation of each of the above operations can be found in the preceding embodiments, and will not be repeated here. It should be noted that the computer device provided in this application embodiment and the data processing method in the above embodiments belong to the same concept, and its specific implementation process can be found in the above method embodiments, and will not be repeated here.
[0200] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0201] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the data processing methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0202] Obtain the status information of the target device; adjust the storage quantity of face data in the face database of the target device according to the status information; receive the face features to be identified through the adjusted target device, and determine the associated devices that establish a network connection with the adjusted target device; perform face recognition based on the face databases of the adjusted target device and the associated devices.
[0203] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0204] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the data processing methods provided in the embodiments of this application, the beneficial effects that any of the data processing methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0205] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.
[0206] The data processing method, apparatus, computer-readable storage medium, and computer device provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data processing method, characterized in that, include: Acquire the status information of the target device, the status information including network status data and storage space data; Adjusting the storage quantity of face data in the face database of the target device based on the status information includes: determining a first storage ratio of the face database of the target device based on the network status data; determining a second storage ratio of the face database of the target device based on the storage space data; obtaining a target storage ratio of the face database of the target device based on the first storage ratio and the second storage ratio; calculating the target storage space data of the face database of the target device based on the target storage ratio; and adjusting the storage quantity of face data in the face database of the target device based on the target storage space data. The target device receives the facial features to be identified and determines the associated device that establishes a network connection with the target device. Face recognition is performed on the facial features to be identified based on the adjusted face databases of the target device and the associated device.
2. The data processing method as described in claim 1, characterized in that, The network status data includes packet latency and packet loss rate. Determining the first storage ratio of the target device's face database based on the network status data includes: When the packet transmission delay rate is greater than the first preset threshold, a first adjustment ratio is determined based on the packet transmission delay rate; When the packet loss rate is greater than the second preset threshold, a second adjustment ratio is determined based on the packet loss rate; The first storage ratio of the face database of the target device is obtained based on the first adjustment ratio and the second adjustment ratio.
3. The data processing method as described in any one of claims 1 or 2, characterized in that, The adjustment of the storage quantity of face data in the face database of the target device based on the target storage space data includes: Obtain the storage time of each face data in the face database of the target device; The face data in the face database of the target device are deleted sequentially according to the storage time from earliest to latest, until the current storage space of the face database of the target device meets the target storage space data.
4. The data processing method as described in claim 1, characterized in that, The step of performing face recognition on the facial features to be identified based on the adjusted face database of the target device and the associated device includes: Search the adjusted target device's face database for target face features that match the face features to be identified; When no target face feature matching the face feature to be identified is found in the face database of the adjusted target device, a target face feature matching the face feature to be identified is searched in the face database of the associated device. When a target facial feature matching the facial feature to be identified is found in the facial database of the associated device, the facial recognition result corresponding to the target facial feature is fed back to the adjusted target device.
5. The data processing method as described in claim 4, characterized in that, The method further includes: When no target face feature matching the face feature to be identified is found in the face database of the associated device, face recognition is performed on the face feature to be identified in the cloud. The face recognition results from the cloud are fed back to the adjusted target device.
6. The data processing method as described in claim 1, characterized in that, The method further includes: The facial data in the facial databases of the target device and the associated device are compared; Duplicate facial data will be removed based on the comparison results.
7. The data processing method as described in claim 6, characterized in that, The process of removing duplicate facial data based on the comparison results includes: Duplicate facial data were identified based on the comparison results; Based on the storage space data of the target device and the associated device, a target regulating device with a smaller storage space is determined; The duplicate face data is located in the target adjustment device and removed.
8. A data processing apparatus, characterized in that, include: An acquisition unit is used to acquire the status information of the target device, the status information including network status data and storage space data; An adjustment unit is used to adjust the number of face data stored in the face database of the target device according to the status information; The receiving unit is used to receive the facial features to be identified through the adjusted target device, and to determine the associated device that establishes a network connection with the adjusted target device; The recognition unit is used to perform face recognition on the facial features to be recognized based on the face database of the adjusted target device and the associated device; The adjustment unit includes: The first determining module is used to determine the first storage ratio of the face database of the target device based on the network status data; The second determining module is used to determine the second storage ratio of the face database of the target device based on the storage space data; The calculation module is used to obtain the target storage ratio of the face database of the target device based on the first storage ratio and the second storage ratio; A calculation subunit is used to calculate the target storage space data of the face database of the target device according to the target storage ratio; The adjustment subunit is used to adjust the amount of face data stored in the face database of the target device based on the target storage space data.
9. The apparatus according to claim 8, characterized in that, The network status data includes packet transmission latency and packet loss rate. The first determining module is used for: When the packet transmission delay rate is greater than the first preset threshold, a first adjustment ratio is determined based on the packet transmission delay rate; When the packet loss rate is greater than the second preset threshold, a second adjustment ratio is determined based on the packet loss rate; The first storage ratio of the face database of the target device is obtained based on the first adjustment ratio and the second adjustment ratio.
10. The apparatus according to claim 8 or 9, characterized in that, The adjustment subunit is used for: Obtain the storage time of each face data in the face database of the target device; The face data in the face database of the target device are deleted sequentially according to the storage time from earliest to latest, until the current storage space of the face database of the target device meets the target storage space data.
11. The apparatus according to claim 8, characterized in that, The identification unit includes: The first search subunit is used to search for a target face feature that matches the face feature to be identified in the face database of the adjusted target device; The second search subunit is used to search for a target face feature that matches the face feature to be identified in the face database of the associated device when no target face feature matching the face feature to be identified is found in the face database of the adjusted target device. The first feedback subunit is used to feed back the face recognition result corresponding to the target face feature to the adjusted target device when a target face feature matching the face feature to be identified is found in the face database of the associated device.
12. The apparatus according to claim 11, characterized in that, The data processing device further includes: The first identification unit is used to perform face recognition on the face feature to be identified in the cloud when no target face feature matching the face feature to be identified is found in the face database of the associated device. The second feedback unit is used to feed back the face recognition results from the cloud to the adjusted target device.
13. The apparatus according to claim 8, characterized in that, The data processing device further includes: The comparison unit is used to compare the face data in the face database of the target device and the associated device; The removal unit is used to remove duplicate face data based on the comparison results.
14. The apparatus according to claim 13, characterized in that, The removal unit includes: The second determining subunit is used to determine duplicate face data based on the comparison results; The third determining subunit is used to determine the target adjustment device with a smaller storage space based on the storage space data of the target device and the associated device; A removal subunit is used to locate and remove duplicate face data in the target adjustment device.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the data processing method according to any one of claims 1 to 7.
16. A computer device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor is used to run the application program within the memory to perform the steps of the data processing method according to any one of claims 1 to 7.
17. A computer program product, characterized in that, The computer program product 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, causing the computer device to perform the data processing method according to any one of claims 1 to 7.