Age identification method and system for router, gateway, IPC and ONU
By building a lightweight MobileNetV3 and EfficientNet-Lite age recognition model on edge computing devices, combining feature fusion and real-time image processing, it solves the computing delay and storage limitation problems of age recognition on edge computing devices, achieving efficient and accurate age recognition, and improving power consumption and the security of identification logs.
Patent Information
- Application Number
- CN202510269183.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-07-22
AI Technical Summary
The existing age recognition methods are difficult to deploy on edge computing devices, with high computing latency, severe storage limitations, insufficient energy efficiency, and insufficient generalization capabilities when facing new age distributions or scenarios, which affect real-time and accuracy.
The age recognition model is constructed using lightweight MobileNetV3 and EfficientNet-Lite, combining feature fusion modules and prediction output modules, model compression is performed through knowledge distillation technology and dynamic pruning technology, and face poses are recognized through the YOLO-Face model for real-time image processing, combining light compensation, dynamic noise reduction and image preprocessing, and finally the recognition results are encrypted and uploaded to the server.
It effectively reduces the parameters and volume of the age recognition model, improves real-time and accuracy, reduces power consumption, and improves the security and traceability of the identification log.
Smart Images

Figure CN120356248A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of edge computing, and particularly to an age recognition method and system for routers, gateways, IP cameras (IPCs), and optical network units (ONUs). Background Art
[0002] With the rapid development of edge computing and Internet of Things technologies, there is a need to perform age recognition on resource-constrained edge computing devices (such as routers, gateways, IPCs (network cameras), and ONUs), and many application scenarios require real-time age recognition.
[0003] However, traditional age recognition methods usually use complex deep learning models, which require a large number of parameters and high computing resources, resulting in difficulties in deployment on edge computing devices, and insufficient generalization ability when facing new age distributions or scenarios, thus affecting the real-time performance and accuracy of age recognition. Moreover, complex deep learning models will undoubtedly increase the power consumption during calculation and cannot meet the requirements of certain application scenarios.
[0004] For example, traditionally, deep learning models such as ResNet and VGG are mostly used, and their parameter quantities generally exceed 50MB (for example, VGG16 reaches 528MB). When deploying on edge computing devices, they face three core problems: 1. Computational latency: The single inference of the model requires more than 200ms, making it difficult to meet the real-time requirements of scenarios such as security and retail; 2. Storage limitations: The model size exceeds the memory capacity of most edge computing devices (such as typical Internet of Things devices only equipped with 256MB RAM); 3. Insufficient energy efficiency: The complex model causes the power consumption of edge computing devices to increase by 30%-50%, affecting the battery life of edge computing devices. Although there are also lightweight age recognition models traditionally, such as MobileNetV2 which compresses the size to 6MB, the accuracy drops significantly when recognizing across age groups (the recognition error for those over 45 years old reaches ±8 years in the public test set).
[0005] Therefore, how to provide an age recognition method and system for routers, gateways, IPCs, and ONUs to improve the real-time performance and accuracy of age recognition and reduce the power consumption of age recognition has become an urgent technical problem to be solved. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide an age recognition method and system for routers, gateways, IPCs, and ONUs to improve the real-time performance and accuracy of age recognition and reduce the power consumption of age recognition.
[0007] In a first aspect, the present invention provides an age recognition method for routers, gateways, IPCs, and ONUs, including the following steps:
[0008] Step S1: Obtain a large number of historical face images, preprocess and annotate each of the historical face images, and then construct a dataset.
[0009] Step S2: Create an age recognition model based on MobileNetV3, EfficientNet-Lite, a feature fusion module, and a prediction output module, and set the loss function of the age recognition model.
[0010] Step S3: Train the age recognition model using the dataset and the loss function, and deploy the trained age recognition model to an edge computing device with a device type of router, gateway, IPC, or ONU.
[0011] Step S4: The edge computing device collects face videos in real time through a camera, uses a pre-trained YOLO-Face model to recognize the face pose of the face video, and extracts real-time face images from the face video based on the face pose.
[0012] Step S5: The edge computing device preprocesses the real-time face image, including at least light compensation, dynamic noise reduction, ROI optimization and cropping, grayscale conversion, and normalization, to obtain an optimized face image.
[0013] Step S6: The edge computing device inputs the optimized face image into the age recognition model to obtain an age recognition result, and superimposes the age recognition result on the face video.
[0014] Step S7: Real-time record the recognition log including at least the optimized face image, age recognition result, and recognition time, encrypt the recognition log into an encrypted log, upload the encrypted log to the server for storage, and delete the encrypted log locally.
[0015] Further, the specific content of Step S1 is as follows:
[0016] Obtain a large number of historical face images, preprocess each of the historical face images, including at least noise reduction, cropping, size unification, grayscale conversion, and normalization, annotate the age of each preprocessed historical face image, and then construct a dataset.
[0017] In Step S2, both MobileNetV3 and EfficientNet-Lite are used to extract face features from face images; the feature fusion module is used to fuse the face features extracted by MobileNetV3 and EfficientNet-Lite to obtain 128-dimensional fused features; the prediction output module is used to perform a rough classification of age groups based on the fused features, and then perform fine regression based on the rough classification result to output an age recognition result; the rough classification result is child, adult, or elderly.
[0018] The MobileNetV3 is constructed based on depthwise separable convolution and SENet units, and the number of network layers is 12; the compound scaling factor of the EfficientNet-Lite takes a value of 0.75, and the compound scaling factor is used to adjust the network width; the loss function is constructed based on the mean square error function, the mean absolute error function, and the classification loss function.
[0019] Further, step S3 is specifically as follows:
[0020] Based on a preset splitting ratio, the dataset is divided into a training set, a validation set, and a test set. The age recognition model is trained using the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, the age recognition model is compressed using knowledge distillation technology and dynamic pruning technology; the trained age recognition model is verified using the validation set to determine whether the recognition accuracy is greater than a preset accuracy threshold. If not, the verification fails, and the training set is expanded for further training. If so, the verification is successful; the age recognition model that has passed the verification is tested using the test set to determine whether the confidence level is greater than a preset confidence level threshold. If not, the test fails, and the training set is expanded for further training. If so, the test is successful, and the training ends;
[0021] The trained age recognition model is deployed to an edge computing device with a device type of router, gateway, IPC, or ONU.
[0022] Further, in step S4, the confidence level threshold of the YOLO-Face model is set to 0.7;
[0023] In step S5, the light compensation is specifically as follows: The contrast of the low-light region in the real-time face image is enhanced using the CLAHE algorithm for light compensation;
[0024] The dynamic noise reduction is specifically as follows: The real-time face image is dynamically denoised through the cooperation of the Kalman filtering algorithm and the bilateral filtering algorithm.
[0025] Further, step S7 is specifically as follows:
[0026] The real-time record includes at least the recognition log of the optimized face image, age recognition result, and recognition time, obtains the device serial number of the edge computing device itself, extracts image data and text data from the recognition log, separates the EXIF information and pixel data in the image data, and performs hash calculation on the EXIF information and device serial number through the SHA3-256 algorithm to obtain the first data fingerprint, and performs hash calculation on the text data and device serial number through the SHA3-256 algorithm to obtain the second data fingerprint;
[0027] Set a row-column permutation rule, perform row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypt the EXIF information, encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data;
[0028] Set a cyclic shift rule, perform character shift on the text data based on the cyclic shift rule to obtain encrypted text data, and encrypt the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data;
[0029] Encrypt the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, upload the encrypted log to the server for storage in real time through the HTTPS protocol, and clear the encrypted log locally.
[0030] In a second aspect, the present invention provides an age recognition system for routers, gateways, IP cameras, and ONUs, including the following steps:
[0031] A dataset construction module, which is used to obtain a large number of historical face images, preprocess and annotate each of the historical face images, and construct a dataset;
[0032] An age recognition model creation module, which is used to create an age recognition model based on MobileNetV3, EfficientNet-Lite, a feature fusion module, and a prediction output module, and set the loss function of the age recognition model;
[0033] An age recognition model deployment module, which is used to train the age recognition model through the dataset and the loss function, and deploy the trained age recognition model to an edge computing device with a device type of router, gateway, IP camera, or ONU;
[0034] A real-time face image extraction module, which is used for the edge computing device to collect face videos in real time through a camera, recognize the face pose of the face video through a pre-trained YOLO-Face model, and extract real-time face images from the face video based on the face pose;
[0035] A real-time face image preprocessing module is used for an edge computing device to preprocess the real-time face image, including at least illumination compensation, dynamic noise reduction, ROI optimization and cropping, grayscaling, and normalization, to obtain an optimized face image;
[0036] An age recognition module is used for an edge computing device to input the optimized face image into an age recognition model, obtain an age recognition result, and superimpose and display the age recognition result on the face video;
[0037] A recognition log management module is used to record in real time a recognition log including at least the optimized face image, the age recognition result, and the recognition time, encrypt the recognition log into an encrypted log, upload the encrypted log to a server for storage, and delete the encrypted log locally.
[0038] Further, the dataset construction module is specifically used for:
[0039] Obtain a large number of historical face images, preprocess each of the historical face images, including at least noise reduction, cropping, size unification, grayscaling, and normalization, and construct a dataset after annotating the age of each preprocessed historical face image;
[0040] In the age recognition model creation module, both MobileNetV3 and EfficientNet-Lite are used to extract face features from a face image; the feature fusion module is used to fuse the face features extracted by MobileNetV3 and EfficientNet-Lite to obtain a 128-dimensional fused feature; the prediction output module is used to perform a coarse classification of age groups based on the fused feature, and then perform a fine regression based on the coarse classification result to output an age recognition result; the coarse classification result is child, adult, or elderly;
[0041] MobileNetV3 is constructed based on depthwise separable convolution and SENet units, and the number of network layers is 12; the compound scaling factor of EfficientNet-Lite takes a value of 0.75, and the compound scaling factor is used to adjust the network width; the loss function is constructed based on the mean square error function, the mean absolute error function, and the classification loss function.
[0042] Further, the age recognition model deployment module is specifically used for:
[0043] Divide the dataset into a training set, a validation set, and a test set based on a preset splitting ratio. Train the age recognition model using the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, compress the age recognition model using knowledge distillation technology and dynamic pruning technology. Verify the trained age recognition model using the validation set to determine whether the recognition accuracy is greater than a preset accuracy threshold. If not, the verification fails, and the training set is expanded and training continues. If so, the verification succeeds. Test the age recognition model that has passed the verification using the test set to determine whether the confidence level is greater than a preset confidence level threshold. If not, the test fails, and the training set is expanded and training continues. If so, the test succeeds, and training ends.
[0044] Deploy the trained age recognition model to an edge computing device with a device type of router, gateway, IPC, or ONU.
[0045] Further, in the real-time face image extraction module, the confidence threshold of the YOLO-Face model is set to 0.7.
[0046] In the real-time face image preprocessing module, the light compensation is specifically as follows: Enhance the contrast of the low-light regions in the real-time face image through the CLAHE algorithm for light compensation.
[0047] The dynamic noise reduction is specifically as follows: Dynamically reduce the noise of the real-time face image through the cooperation of the Kalman filter algorithm and the bilateral filter algorithm.
[0048] Further, the recognition log management module is specifically used for:
[0049] Real-time record the recognition log including at least the optimized face image, age recognition result, and recognition time. Obtain the device serial number of the edge computing device itself. Extract image data and text data from the recognition log. Separate the EXIF information and pixel data in the image data. Calculate the first data fingerprint by hashing the EXIF information and the device serial number through the SHA3-256 algorithm. Calculate the second data fingerprint by hashing the text data and the device serial number through the SHA3-256 algorithm.
[0050] Set a row-column permutation rule. Perform a row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data. Encrypt the EXIF information, encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data.
[0051] Set a cyclic displacement rule, displace the characters of the text data based on the cyclic displacement rule to obtain encrypted text data, and encrypt the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain second encrypted data;
[0052] Encrypt the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, upload the encrypted log to the server for storage in real time through the HTTPS protocol, and delete the encrypted log locally.
[0053] The advantages of the present invention are as follows:
[0054] 1. A dataset is constructed by obtaining a large number of historical face images, preprocessing them, and annotating them. Then, an age recognition model is created based on MobileNetV3, EfficientNet-Lite, a feature fusion module, and a prediction output module, and the loss function of the age recognition model is set. Next, the age recognition model is trained using the dataset and the loss function, and the trained age recognition model is deployed to an edge computing device with a device type of router, gateway, IPC, or ONU. The edge computing device captures face videos in real time through a camera, identifies the face poses in the face videos using a pre-trained YOLO-Face model, extracts real-time face images from the face videos based on the face poses, performs preprocessing on the real-time face images including at least illumination compensation, dynamic noise reduction, ROI optimization and cropping, grayscale conversion, and normalization to obtain optimized face images, inputs the optimized face images into the age recognition model to obtain age recognition results, superimposes the age recognition results on the face videos, and records in real time an identification log including at least the optimized face images, age recognition results, and recognition time. The identification log is encrypted into an encrypted log and uploaded to a server for storage, and the local encrypted log is deleted. Since the age recognition model is built based on lightweight MobileNetV3 and EfficientNet-Lite, the number of network layers of MobileNetV3 is reduced to 12 layers, the composite scaling factor of EfficientNet-Lite is set to 0.75 to reduce the network width, and the age recognition model is compressed during the training process using knowledge distillation technology and dynamic pruning technology, effectively reducing the number of parameters (complexity) and volume of the age recognition model. And locally deleting the uploaded encrypted log in real time reduces the storage overhead, effectively reducing the computing overhead of the edge computing device. Through cross-recognition (fusion recognition) using the dual channels of MobileNetV3 and EfficientNet-Lite, progressive age recognition (coarse classification first and then fine classification), screening eligible real-time face images from face videos based on face poses, image preprocessing, and an improved loss function, the generalization ability and recognition performance of age recognition are effectively improved, ultimately greatly improving the real-time performance and accuracy of age recognition and greatly reducing the power consumption of age recognition.
[0055] 2. By recording in real time an identification log including at least the optimized face images, age recognition results, and recognition time, the identification log is encrypted into an encrypted log and uploaded to a server for storage, which is convenient for later traceability.
[0056] 3. Construct a loss function by using the mean squared error function, mean absolute error function, and classification loss function, that is, perform a weighted sum of the mean squared error function, mean absolute error function, and classification loss function to obtain the loss function. The mean squared error function is the most commonly used loss function in regression tasks and is applicable to the case where age is regarded as a continuous value in the age recognition task. The mean absolute error function is another regression loss function, applicable to the age recognition task, insensitive to outliers, and the model training is more stable. The classification loss function regards the age recognition task as a multi-classification problem (for example, dividing age into multiple intervals), uses cross-entropy loss, is suitable for dealing with the order of age, and can reduce the boundary effect through soft classification targets. That is, let the loss function combine the advantages of the mean squared error function, mean absolute error function, and classification loss function, thereby greatly improving the training effect of the age recognition model and further greatly improving the accuracy of age recognition.
[0057] 4. Train the age recognition model with the training set until the loss value of the loss function is less than the preset loss threshold. During the training process, compress the age recognition model through knowledge distillation technology and dynamic pruning technology, then calculate the accuracy through the validation set to verify the trained age recognition model, and calculate the confidence through the test set to test the age recognition model that has passed the validation. That is, during the training process of the age recognition model, continuous compression, verification, and testing are carried out to effectively balance the model volume and recognition accuracy of the age recognition model.
[0058] 5. Through preprocessing the real-time face image, including at least illumination compensation, dynamic noise reduction, ROI optimization and cropping, grayscale conversion, and normalization, effectively reduce the noise data carried in the real-time face image, thereby greatly improving the accuracy of age recognition.
[0059] 6. By obtaining the device serial number of the edge computing device itself, extract the image data and text data from the recognition log, separate the EXIF information and pixel data in the image data, perform hash calculation on the EXIF information and the device serial number through the SHA3-256 algorithm to obtain the first data fingerprint, and perform hash calculation on the text data and the device serial number through the SHA3-256 algorithm to obtain the second data fingerprint; perform row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypt the EXIF information, the encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data; perform character displacement on the text data based on the cyclic shift rule to obtain encrypted text data, and encrypt the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data; encrypt the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, and upload the encrypted log to the server for storage in real time through the HTTPS protocol; that is, encrypt the recognition log differently based on the data types (image data and text data), and finally merge the encryption. Moreover, the image data and the text data respectively combine different encryption algorithms and data transformation rules, and the HTTPS protocol is a secure transmission protocol. At least nine security measures are taken before and after (device serial number, first data fingerprint, second data fingerprint, row-column permutation rule, AES-256 algorithm, cyclic shift rule, SM9 algorithm, 3DES algorithm, HTTPS protocol) to prevent the recognition log from being stolen and tampered with in plaintext, thereby greatly improving the security of the transmission and storage of the recognition log and effectively enhancing the reliability of traceability. Brief Description of the Drawings
[0060] The present invention will be further described below with reference to the accompanying drawings in conjunction with embodiments.
[0061] Figure 1 It is a flowchart of an age recognition method for routers, gateways, IP cameras, and ONUs according to the present invention.
[0062] Figure 2 It is a schematic structural diagram of an age recognition system for routers, gateways, IP cameras, and ONUs according to the present invention. Detailed Embodiments
[0063] The overall idea of the technical solution in the embodiment of this application is as follows: An age recognition model based on MobileNetV3 and EfficientNet-Lite is used for age recognition. The number of network layers of MobileNetV3 is reduced to 12 layers, and the compound scaling factor of EfficientNet-Lite is set to 0.75 to reduce the network width. During the training process of the age recognition model, compression is performed through knowledge distillation technology and dynamic pruning technology, effectively reducing the complexity of the age recognition model. Encrypted logs that have been uploaded are deleted locally in real time to reduce storage overhead and effectively reduce computational overhead. Through cross-recognition using the dual channels of MobileNetV3 and EfficientNet-Lite, progressive age recognition, screening of eligible real-time face images from face videos based on face pose, image preprocessing, and an improved loss function, the generalization ability and recognition performance of age recognition are effectively improved, thereby enhancing the real-time performance and accuracy of age recognition and reducing the power consumption of age recognition.
[0064] Please refer to Figures 1 to 2 As shown, a preferred embodiment of an age recognition method for routers, gateways, IP cameras, and ONUs according to the present invention includes the following steps:
[0065] Step S1: Obtain a large number of historical face images, preprocess and annotate each of the historical face images, and then construct a dataset;
[0066] Step S2: Create an age recognition model based on MobileNetV3, EfficientNet-Lite, a feature fusion module, and a prediction output module, and set the loss function of the age recognition model;
[0067] Step S3: Train the age recognition model using the dataset and the loss function, and deploy the trained age recognition model to an edge computing device with a device type of router, gateway, IP camera, or ONU;
[0068] Step S4: The edge computing device uses a camera to collect face videos in real time, identifies the face pose of the face videos through a pre-trained YOLO-Face model, and extracts real-time face images from the face videos based on the face pose; that is, the face pose needs to meet a preset angle range (for example, the face is in the frontal position) to ensure subsequent recognition accuracy;
[0069] Step S5: The edge computing device performs preprocessing on the real-time face images, including at least light compensation, dynamic noise reduction, ROI optimization and cropping, grayscale conversion, and normalization, to obtain optimized face images;
[0070] By performing preprocessing on real-time face images that includes at least illumination compensation, dynamic noise reduction, ROI optimized cropping, grayscaling, and normalization, the noise data carried in the real-time face images is effectively reduced, thereby greatly improving the accuracy of age recognition.
[0071] Step S6: The edge computing device inputs the optimized face image into the age recognition model to obtain an age recognition result, and superimposes and displays the age recognition result on the face video.
[0072] Step S7: Real-time record the recognition log that includes at least the optimized face image, age recognition result, and recognition time, encrypt the recognition log into an encrypted log, upload the encrypted log to the server for storage, and delete the encrypted log locally.
[0073] By real-time recording the recognition log that includes at least the optimized face image, age recognition result, and recognition time, encrypting the recognition log into an encrypted log and uploading it to the server for storage, it is convenient for later traceability.
[0074] The volume of the age recognition model of the present invention is 3.2MB (46.7% smaller than MobileNetV2), verified using a self-built test set (including 100,000 cross-age faces), the inference speed is: 38ms / frame (Raspberry Pi 4B platform); the recognition accuracy is: MAE = 1.2 years old (29% improvement compared to a single model); power consumption control: peak power consumption < 2.1W, suitable for 7×24-hour operation.
[0075] The specific content of step S1 is as follows:
[0076] Obtain a large number of historical face images, perform preprocessing on each of the historical face images that includes at least noise reduction, cropping, size unification, grayscaling, and normalization, and construct a dataset after annotating the age of each preprocessed historical face image.
[0077] In step S2, both MobileNetV3 and EfficientNet-Lite are used to extract face features from the face image; the feature fusion module is used to fuse the face features extracted by MobileNetV3 and EfficientNet-Lite to obtain 128-dimensional fused features; the prediction output module is used to perform a rough classification of age groups based on the fused features, and then perform fine regression based on the rough classification result to output an age recognition result; the rough classification result is children, adults, or the elderly.
[0078] The MobileNetV3 is constructed based on depthwise separable convolutions and SENet units, and has 12 layers; the MobileNetV3 is a lightweight neural network architecture designed for mobile devices and embedded systems, aiming to improve efficiency and performance; the compound scaling factor of the EfficientNet-Lite takes a value of 0.75, and the compound scaling factor is used to adjust the network width; the EfficientNet-Lite is a lightweight version of the EfficientNet series, optimized for mobile and edge devices, with advantages such as efficient computational performance, low power consumption, fast inference, and easy deployment; the loss function is constructed based on the mean squared error function, the mean absolute error function, and the classification loss function.
[0079] The loss function is constructed by the mean squared error function, the mean absolute error function, and the classification loss function, that is, the loss function is obtained by weighted summation of the mean squared error function, the mean absolute error function, and the classification loss function; the mean squared error function is the most commonly used loss function in regression tasks and is applicable to the case where age is regarded as a continuous value in the age recognition task; the mean absolute error function is another regression loss function, applicable to the age recognition task, insensitive to outliers, and the model training is more stable; the classification loss function regards the age recognition task as a multi-classification problem (for example, dividing age into multiple intervals), uses cross-entropy loss, is suitable for dealing with the orderliness of age, and can reduce boundary effects through soft classification targets; that is, making the loss function combine the advantages of the mean squared error function, the mean absolute error function, and the classification loss function, thus greatly improving the training effect of the age recognition model, and further greatly improving the accuracy of age recognition.
[0080] The specific steps of step S3 are as follows:
[0081] Based on a preset splitting ratio, the dataset is divided into a training set, a validation set, and a test set. The age recognition model is trained using the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, the age recognition model is compressed using knowledge distillation technology and dynamic pruning technology; the trained age recognition model is validated using the validation set to determine whether the recognition accuracy is greater than a preset accuracy threshold. If not, the validation fails, and the training set is expanded and training continues. If so, the validation is successful; the age recognition model that has passed the validation is tested using the test set to determine whether the confidence level is greater than a preset confidence level threshold. If not, the test fails, and the training set is expanded and training continues. If so, the test is successful, and the training ends;
[0082] The trained age recognition model is deployed to edge computing devices of device types such as routers, gateways, IP cameras, or ONUs.
[0083] The age recognition model is trained using a training set until the loss value of the loss function is less than a preset loss threshold. During the training process, the age recognition model is compressed using knowledge distillation technology and dynamic pruning technology. Then, the accuracy is calculated using a validation set to verify the trained age recognition model. The confidence level is calculated using a test set to test the age recognition model that has passed the verification. That is, during the training process of the age recognition model, compression, verification, and testing are continuously performed to effectively balance the model size and recognition accuracy of the age recognition model.
[0084] Knowledge distillation technology is a machine learning model compression method aimed at transferring the knowledge of a large model to a small model to improve model performance and generalization ability. The core idea of knowledge distillation is to transform the knowledge of a complex model into a more concise and effective representation, reducing computational complexity and resource requirements while maintaining high performance. Dynamic pruning technology aims to remove parts of a neural network that have little impact on model performance (such as accuracy), such as neurons, connections (weights), etc., thereby reducing model complexity and computational resource requirements.
[0085] In step S4, the confidence threshold of the YOLO-Face model is set to 0.7;
[0086] In step S5, the light compensation is specifically as follows: The contrast of the low-light region in the real-time face image is enhanced through the CLAHE algorithm for light compensation;
[0087] The dynamic noise reduction is specifically as follows: The real-time face image is dynamically denoised through the cooperation of the Kalman filtering algorithm and the bilateral filtering algorithm.
[0088] The ROI optimization and cropping are achieved through a mask image, an image segmentation algorithm (such as GrabCut), segmentation based on GraphCut, or ROI selection based on Bayesian optimization.
[0089] Step S7 is specifically as follows:
[0090] The recognition log including at least the optimized face image, age recognition result, and recognition time is recorded in real time. The device serial number of the edge computing device itself is obtained. The image data and text data are extracted from the recognition log. The EXIF information and pixel data in the image data are separated. The first data fingerprint is obtained by performing a hash calculation on the EXIF information and the device serial number through the SHA3-256 algorithm. The second data fingerprint is obtained by performing a hash calculation on the text data and the device serial number through the SHA3-256 algorithm;
[0091] Set a row-column permutation rule, perform a row-column permutation operation on pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypt the EXIF information, encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data;
[0092] Set a cyclic shift rule, perform a shift on the characters of text data based on the cyclic shift rule to obtain encrypted text data, and encrypt the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data;
[0093] Encrypt the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, upload the encrypted log to the server for storage in real time through the HTTPS protocol, and delete the encrypted log locally.
[0094] By obtaining the device serial number of the edge computing device itself, extract image data and text data from the recognition log, separate the EXIF information and pixel data in the image data, perform a hash calculation on the EXIF information and the device serial number through the SHA3-256 algorithm to obtain the first data fingerprint, and perform a hash calculation on the text data and the device serial number through the SHA3-256 algorithm to obtain the second data fingerprint; perform a row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypt the EXIF information, encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data; perform a shift on the characters of the text data based on the cyclic shift rule to obtain encrypted text data, and encrypt the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data; encrypt the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, and upload the encrypted log to the server for storage in real time through the HTTPS protocol; that is, encrypt the recognition log differently based on the data types (image data and text data), and then merge the encryption. Moreover, the image data and text data respectively combine different encryption algorithms and data transformation rules, and the HTTPS protocol is a secure transmission protocol, taking at least nine security measures before and after (device serial number, first data fingerprint, second data fingerprint, row-column permutation rule, AES-256 algorithm, cyclic shift rule, SM9 algorithm, 3DES algorithm, HTTPS protocol), avoiding the recognition log from being stolen and tampered with in plaintext, thereby greatly improving the security of the recognition log transmission and storage, and effectively improving the reliability of traceability.
[0095] A preferred embodiment of an age recognition system for routers, gateways, IP cameras, and ONUs according to the present invention includes the following steps:
[0096] A dataset construction module for obtaining a large number of historical face images, preprocessing and annotating each of the historical face images, and constructing a dataset;
[0097] An age recognition model creation module for creating an age recognition model based on MobileNetV3, EfficientNet-Lite, a feature fusion module, and a prediction output module, and setting a loss function for the age recognition model;
[0098] An age recognition model deployment module for training the age recognition model with the dataset and the loss function, and deploying the trained age recognition model to an edge computing device of which the device type is a router, a gateway, an IPC, or an ONU;
[0099] A real-time face image extraction module for the edge computing device to collect a face video in real time through a camera, identify the face pose of the face video through a pre-trained YOLO-Face model, and extract a real-time face image from the face video based on the face pose; that is, the face pose needs to conform to a preset angle range (for example, the face is in the front) to ensure subsequent recognition accuracy;
[0100] A real-time face image preprocessing module for the edge computing device to preprocess the real-time face image including at least light compensation, dynamic noise reduction, ROI optimized cropping, grayscale conversion, and normalization to obtain an optimized face image;
[0101] By preprocessing the real-time face image including at least light compensation, dynamic noise reduction, ROI optimized cropping, grayscale conversion, and normalization, the noise data carried in the real-time face image is effectively reduced, and thus the accuracy of age recognition is greatly improved.
[0102] An age recognition module for the edge computing device to input the optimized face image into the age recognition model, obtain an age recognition result, and superimpose and display the age recognition result on the face video;
[0103] A recognition log management module for recording in real time a recognition log including at least the optimized face image, the age recognition result, and the recognition time, encrypting the recognition log into an encrypted log, uploading the encrypted log to a server for storage, and clearing the encrypted log locally.
[0104] By recording in real time a recognition log including at least the optimized face image, the age recognition result, and the recognition time, encrypting the recognition log into an encrypted log and uploading it to a server for storage, it is convenient for later traceability.
[0105] The volume of the age recognition model of the present invention is 3.2 MB (46.7% reduction compared to MobileNetV2), verified using a self-built test set (including 100,000 cross-age faces). The inference speed is: 38 ms / frame (Raspberry Pi 4B platform); the recognition accuracy is: MAE = 1.2 years old (29% improvement compared to a single model); power consumption control: peak power consumption < 2.1 W, suitable for 7×24-hour operation.
[0106] The dataset construction module is specifically used for:
[0107] Obtain a large number of historical face images, perform preprocessing on each of the historical face images including at least noise reduction, cropping, size unification, grayscale conversion, and normalization, and construct a dataset after annotating the age of each preprocessed historical face image;
[0108] In the age recognition model creation module, both MobileNetV3 and EfficientNet-Lite are used to extract face features from face images; the feature fusion module is used to fuse the face features extracted by MobileNetV3 and EfficientNet-Lite to obtain 128-dimensional fused features; the prediction output module is used to perform a rough classification of age groups based on the fused features, and then perform fine regression based on the rough classification result to output an age recognition result; the rough classification result is children, adults, or the elderly;
[0109] MobileNetV3 is constructed based on depthwise separable convolution and SENet units, and the number of network layers is 12; MobileNetV3 is a lightweight neural network architecture designed for mobile devices and embedded systems, aiming to improve efficiency and performance; the compound scaling coefficient of EfficientNet-Lite takes a value of 0.75, and the compound scaling coefficient is used to adjust the network width; EfficientNet-Lite is a lightweight version of the EfficientNet series, optimized for mobile and edge devices, with advantages such as high computational performance, low power consumption, fast inference, and easy deployment; the loss function is constructed based on the mean square error function, the mean absolute error function, and the classification loss function.
[0110] Construct a loss function using the mean squared error function, mean absolute error function, and classification loss function, that is, perform a weighted sum of the mean squared error function, mean absolute error function, and classification loss function to obtain the loss function; the mean squared error function is the most commonly used loss function in regression tasks and is applicable to the case where age is regarded as a continuous value in the age recognition task; the mean absolute error function is another regression loss function, applicable to the age recognition task, insensitive to outliers, and the model training is more stable; the classification loss function regards the age recognition task as a multi-classification problem (for example, dividing age into multiple intervals), uses cross-entropy loss, is suitable for dealing with the order of age, and can reduce boundary effects through soft classification targets; that is, let the loss function combine the advantages of the mean squared error function, mean absolute error function, and classification loss function, thereby greatly improving the training effect of the age recognition model and thus greatly improving the accuracy of age recognition.
[0111] The age recognition model deployment module is specifically used for:
[0112] Divide the dataset into a training set, a validation set, and a test set based on a preset splitting ratio, train the age recognition model through the training set until the loss value of the loss function is less than a preset loss threshold, and compress the age recognition model through knowledge distillation technology and dynamic pruning technology during the training process; verify the trained age recognition model through the validation set, and judge whether the recognition accuracy rate is greater than a preset accuracy threshold. If not, the verification fails, and the training set is expanded and training continues. If so, the verification is successful; test the age recognition model that has passed the verification through the test set, and judge whether the confidence level is greater than a preset confidence level threshold. If not, the test fails, and the training set is expanded and training continues. If so, the test is successful and the training ends;
[0113] Deploy the trained age recognition model to edge computing devices of device types such as routers, gateways, IP cameras, or ONUs.
[0114] Train the age recognition model through the training set until the loss value of the loss function is less than a preset loss threshold, compress the age recognition model through knowledge distillation technology and dynamic pruning technology during the training process, then calculate the accuracy rate through the validation set to verify the trained age recognition model, and calculate the confidence level through the test set to test the age recognition model that has passed the verification, that is, continuously perform compression, verification, and testing during the training process of the age recognition model to effectively balance the model volume and recognition accuracy of the age recognition model.
[0115] Knowledge distillation technology is a machine learning model compression method aimed at transferring the knowledge of large models to small models to improve model performance and generalization ability. The core idea of knowledge distillation is to transform the knowledge of complex models into more concise and effective representations, enabling them to maintain high performance while reducing computational complexity and resource requirements. Dynamic pruning technology aims to remove parts of the neural network that have little impact on model performance (such as accuracy), such as neurons, connections (weights), etc., thereby reducing model complexity and computational resource requirements.
[0116] In the real-time face image extraction module, the confidence threshold of the YOLO-Face model is set to 0.7;
[0117] In the real-time face image preprocessing module, the specific light compensation method is as follows: Enhance the contrast of low-light regions in the real-time face image through the CLAHE algorithm for light compensation;
[0118] The specific dynamic noise reduction method is as follows: Dynamically reduce the noise of the real-time face image through the cooperation of the Kalman filter algorithm and the bilateral filter algorithm.
[0119] The ROI optimization and cropping is achieved through a mask image, an image segmentation algorithm (such as GrabCut), segmentation based on Graph Cut, or ROI selection based on Bayesian optimization.
[0120] The recognition log management module is specifically used for:
[0121] Real-time record the recognition log including at least the optimized face image, age recognition result, and recognition time, obtain the device serial number of the edge computing device itself, extract image data and text data from the recognition log, separate the EXIF information and pixel data in the image data, calculate the first data fingerprint by hashing the EXIF information and the device serial number through the SHA3-256 algorithm, and calculate the second data fingerprint by hashing the text data and the device serial number through the SHA3-256 algorithm;
[0122] Set a row-column permutation rule, perform a row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypt the EXIF information, encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data;
[0123] Set a cyclic shift rule, shift the characters of the text data based on the cyclic shift rule to obtain encrypted text data, and encrypt the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data;
[0124] Encrypt the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, upload the encrypted log to the server for storage in real time through the HTTPS protocol, and delete the encrypted log locally.
[0125] By obtaining the device serial number of the edge computing device itself, extract image data and text data from the recognition log, separate the EXIF information and pixel data in the image data, perform a hashing calculation on the EXIF information and the device serial number through the SHA3-256 algorithm to obtain the first data fingerprint, and perform a hashing calculation on the text data and the device serial number through the SHA3-256 algorithm to obtain the second data fingerprint; perform a row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypt the EXIF information, the encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data; perform a displacement on the characters of the text data based on the cyclic shift rule to obtain encrypted text data, and encrypt the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data; encrypt the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, and upload the encrypted log to the server for storage in real time through the HTTPS protocol; that is, different encryptions are performed on the recognition log based on the data types (image data and text data), and then combined for encryption at the end. Moreover, the image data and the text data respectively combine different encryption algorithms and data transformation rules, and the HTTPS protocol is a secure transmission protocol. At least nine security measures are taken before and after (device serial number, first data fingerprint, second data fingerprint, row-column permutation rule, AES-256 algorithm, cyclic shift rule, SM9 algorithm, 3DES algorithm, HTTPS protocol) to prevent the recognition log from being stolen and tampered with in plaintext, thereby greatly improving the security of the transmission and storage of the recognition log and effectively enhancing the reliability of traceability.
[0126] In summary, the advantages of the present invention are as follows:
[0127] 1. A dataset is constructed by obtaining a large number of historical face images, preprocessing them, and annotating them. Then, an age recognition model is created based on MobileNetV3, EfficientNet-Lite, a feature fusion module, and a prediction output module, and the loss function of the age recognition model is set. Next, the age recognition model is trained using the dataset and the loss function, and the trained age recognition model is deployed to an edge computing device of the device type of router, gateway, IPC, or ONU. The edge computing device captures a face video in real time through a camera, identifies the face pose of the face video through a pre-trained YOLO-Face model, extracts real-time face images from the face video based on the face pose, performs preprocessing on the real-time face images including at least illumination compensation, dynamic noise reduction, ROI optimization and cropping, grayscale conversion, and normalization to obtain optimized face images, inputs the optimized face images into the age recognition model to obtain age recognition results, superimposes the age recognition results on the face video, and records in real time an identification log including at least the optimized face images, age recognition results, and recognition time. The identification log is encrypted into an encrypted log and uploaded to a server for storage, and the local encrypted log is cleared. Since the age recognition model is constructed based on lightweight MobileNetV3 and EfficientNet-Lite, the number of network layers of MobileNetV3 is reduced to 12 layers, the compound scaling factor of EfficientNet-Lite is set to 0.75 to reduce the network width, and the age recognition model is compressed through knowledge distillation technology and dynamic pruning technology during the training process, effectively reducing the number of parameters (complexity) and volume of the age recognition model. And the local real-time deletion of the uploaded encrypted log reduces the storage overhead, effectively reducing the computing overhead of the edge computing device. Through cross recognition (fusion recognition) in the dual channels of MobileNetV3 and EfficientNet-Lite, progressive age recognition (coarse classification first and then fine classification), screening of eligible real-time face images from the face video based on the face pose, image preprocessing, and an improved loss function, the generalization ability and recognition performance of age recognition are effectively improved, ultimately greatly improving the real-time performance and accuracy of age recognition and greatly reducing the power consumption of age recognition.
[0128] 2. By recording in real time an identification log including at least the optimized face images, age recognition results, and recognition time, the identification log is encrypted into an encrypted log and uploaded to a server for storage, which is convenient for later traceability.
[0129] 3. Construct a loss function by using the mean squared error function, mean absolute error function, and classification loss function, that is, perform a weighted sum of the mean squared error function, mean absolute error function, and classification loss function to obtain the loss function. The mean squared error function is the most commonly used loss function in regression tasks and is applicable to the case where age is regarded as a continuous value in the age recognition task. The mean absolute error function is another regression loss function, which is applicable to the age recognition task, is insensitive to outliers, and the model training is more stable. The classification loss function regards the age recognition task as a multi-classification problem (for example, dividing age into multiple intervals), uses cross-entropy loss, is suitable for dealing with the order of age, and can reduce boundary effects through soft classification targets. That is, let the loss function combine the advantages of the mean squared error function, mean absolute error function, and classification loss function, thereby greatly improving the training effect of the age recognition model and further greatly improving the accuracy of age recognition.
[0130] 4. Train the age recognition model with the training set until the loss value of the loss function is less than the preset loss threshold. During the training process, compress the age recognition model through knowledge distillation technology and dynamic pruning technology, then calculate the accuracy through the validation set to verify the trained age recognition model, and calculate the confidence through the test set to test the age recognition model that has passed the verification. That is, continuously compress, verify, and test during the training process of the age recognition model to effectively balance the model volume and recognition accuracy of the age recognition model.
[0131] 5. Through preprocessing the real-time face image, including at least light compensation, dynamic noise reduction, ROI optimized cropping, grayscale conversion, and normalization, effectively reduce the noise data carried in the real-time face image, thereby greatly improving the accuracy of age recognition.
[0132] 6. By obtaining the device serial number of the edge computing device itself, extracting image data and text data from the recognition log, separating the EXIF information and pixel data in the image data, performing hash calculation on the EXIF information and the device serial number through the SHA3-256 algorithm to obtain the first data fingerprint, and performing hash calculation on the text data and the device serial number through the SHA3-256 algorithm to obtain the second data fingerprint; performing row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypting the EXIF information, the encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data; performing displacement on the characters of the text data based on the cyclic shift rule to obtain encrypted text data, and encrypting the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data; encrypting the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, and uploading the encrypted log to the server for storage in real time through the HTTPS protocol; that is, encrypting the recognition log differently based on the data types (image data and text data), and finally merging the encryption, and the image data and the text data respectively combine different encryption algorithms and data transformation rules, and the HTTPS protocol is a secure transmission protocol, taking at least nine security measures before and after (device serial number, first data fingerprint, second data fingerprint, row-column permutation rule, AES-256 algorithm, cyclic shift rule, SM9 algorithm, 3DES algorithm, HTTPS protocol), avoiding the recognition log from being stolen and tampered with in plain text, thereby greatly improving the security of the transmission and storage of the recognition log and effectively improving the reliability of traceability.
[0133] Although the specific embodiments of the present invention have been described above, those skilled in the art of this technology should understand that the specific embodiments we described are illustrative rather than used to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be covered by the scope of the claims of the present invention.
Claims
1. An age recognition method for routers, gateways, IP cameras, and ONUs, characterized in that: It includes the following steps: Step S1: Obtain a large number of historical face images, preprocess and annotate each of the historical face images, and then construct a dataset; Step S2: Create an age recognition model based on MobileNetV3, EfficientNet-Lite, a feature fusion module, and a prediction output module, and set the loss function of the age recognition model; Step S3: Train the age recognition model with the dataset and the loss function, and deploy the trained age recognition model to an edge computing device of which the device type is a router, a gateway, an IPC, or an ONU; Step S4: The edge computing device collects face videos in real time through a camera, recognizes the face pose of the face video through a pre-trained YOLO-Face model, and extracts real-time face images from the face video based on the face pose; Step S5: The edge computing device preprocesses the real-time face images, including at least light compensation, dynamic noise reduction, ROI optimization and cropping, grayscale conversion, and normalization, to obtain optimized face images; Step S6: The edge computing device inputs the optimized face images into the age recognition model to obtain age recognition results, and superimposes and displays the age recognition results on the face videos; Step S7: Record the recognition logs including at least the optimized face images, age recognition results, and recognition time in real time, encrypt the recognition logs into encrypted logs, upload the encrypted logs to a server for storage, and delete the encrypted logs locally.
2. The age recognition method for a router, gateway, IPC, and ONU according to claim 1, characterized in that: The specific content of step S1 is as follows: Obtain a large number of historical face images, preprocess each of the historical face images, including at least noise reduction, cropping, size unification, grayscale conversion, and normalization, annotate the age of each of the preprocessed historical face images, and then construct a dataset; In step S2, both MobileNetV3 and EfficientNet-Lite are used to extract face features from face images; the feature fusion module is used to fuse the face features extracted by MobileNetV3 and EfficientNet-Lite to obtain 128-dimensional fused features; the prediction output module is used to perform rough classification of age groups based on the fused features, and then perform fine regression based on the rough classification results to output age recognition results; the rough classification results are children, adults, or the elderly; MobileNetV3 is constructed based on depthwise separable convolution and SENet units, and the number of network layers is 12; the compound scaling factor of EfficientNet-Lite takes a value of 0.75, and the compound scaling factor is used to adjust the network width; the loss function is constructed based on the mean square error function, the mean absolute error function, and the classification loss function.
3. The age recognition method for a router, gateway, IPC, and ONU according to claim 1, characterized in that: The specific content of step S3 is as follows: Divide the dataset into a training set, a validation set, and a test set based on a preset splitting ratio. Train the age recognition model using the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, compress the age recognition model using knowledge distillation technology and dynamic pruning technology. Validate the trained age recognition model using the validation set to determine whether the recognition accuracy is greater than a preset accuracy threshold. If not, the validation fails, and the training set is expanded and training continues. If so, the validation succeeds. Test the age recognition model that has passed the validation using the test set to determine whether the confidence level is greater than a preset confidence threshold. If not, the test fails, and the training set is expanded and training continues. If so, the test succeeds, and training ends. Deploy the trained age recognition model to an edge computing device with a device type of router, gateway, IPC, or ONU.
4. The age recognition method for a router, gateway, IPC, and ONU according to claim 1, characterized in that: In step S4, the confidence threshold of the YOLO-Face model is set to 0.
7. In step S5, the light compensation is specifically as follows: Enhance the contrast of the low-light regions in the real-time face image through the CLAHE algorithm to perform light compensation. The dynamic noise reduction is specifically as follows: Perform dynamic noise reduction on the real-time face image through the cooperation of the Kalman filtering algorithm and the bilateral filtering algorithm.
5. A method for age recognition for routers, gateways, IP cameras, and ONUs according to claim 1, characterized in that: Step S7 is specifically as follows: Real-time record the recognition log including at least the optimized face image, age recognition result, and recognition time. Obtain the device serial number of the edge computing device itself. Extract the image data and text data from the recognition log. Separate the EXIF information and pixel data in the image data. Calculate the first data fingerprint by hashing the EXIF information and the device serial number through the SHA3-256 algorithm. Calculate the second data fingerprint by hashing the text data and the device serial number through the SHA3-256 algorithm. Set a row-column permutation rule, perform a row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypt the EXIF information, encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data. Set a cyclic shift rule, shift the characters of the text data based on the cyclic shift rule to obtain encrypted text data, and encrypt the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data. Encrypt the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, upload the encrypted log to the server for storage in real time through the HTTPS protocol, and delete the encrypted log locally.
6. An age recognition system for routers, gateways, IP cameras, and ONUs, characterized in that: Include the following steps: A dataset construction module for obtaining a large number of historical face images, preprocessing and annotating each historical face image, and constructing a dataset. An age recognition model creation module, which is used to create an age recognition model based on MobileNetV3, EfficientNet-Lite, a feature fusion module, and a prediction output module, and set the loss function of the age recognition model; An age recognition model deployment module, which is used to train the age recognition model through the data set and the loss function, and deploy the trained age recognition model to an edge computing device with a device type of router, gateway, IPC, or ONU; A real-time face image extraction module, which is used for the edge computing device to collect face videos in real time through a camera, identify the face pose of the face video through a pre-trained YOLO-Face model, and extract real-time face images from the face video based on the face pose; A real-time face image preprocessing module, which is used for the edge computing device to preprocess the real-time face image, including at least illumination compensation, dynamic noise reduction, ROI optimization and cropping, grayscale conversion, and normalization, to obtain an optimized face image; An age recognition module, which is used for the edge computing device to input the optimized face image into the age recognition model to obtain an age recognition result, and superimpose the age recognition result on the face video; An identification log management module, which is used to record in real time the identification log including at least the optimized face image, the age recognition result, and the recognition time, encrypt the identification log into an encrypted log, upload the encrypted log to the server for storage, and delete the encrypted log locally.
7. The age recognition system for routers, gateways, IP cameras, and ONUs according to claim 6, characterized in that: The data set construction module is specifically used for: Obtaining a large number of historical face images, preprocessing each of the historical face images, including at least noise reduction, cropping, size unification, grayscale conversion, and normalization, and constructing a data set after annotating the ages of the preprocessed historical face images; In the age recognition model creation module, both MobileNetV3 and EfficientNet-Lite are used to extract face features from face images; the feature fusion module is used to fuse the face features extracted by MobileNetV3 and EfficientNet-Lite to obtain 128-dimensional fused features; the prediction output module is used to perform a rough classification of age groups based on the fused features, and then perform fine regression based on the rough classification result to output an age recognition result; the rough classification result is children, adults, or the elderly; MobileNetV3 is based on depthwise separable convolution and SENet units, and the number of network layers is 12; the compound scaling factor of EfficientNet-Lite takes a value of 0.75, and the compound scaling factor is used to adjust the network width; the loss function is constructed based on the mean square error function, the mean absolute error function, and the classification loss function.
8. An age recognition system for routers, gateways, IP cameras, and ONUs according to claim 6, characterized in that: The age recognition model deployment module is specifically used for: The data set is divided into a training set, a validation set, and a test set based on a preset splitting ratio. The age recognition model is trained using the training set until the loss value of the loss function is less than a preset loss threshold. During the training process, the age recognition model is compressed using knowledge distillation technology and dynamic pruning technology; the trained age recognition model is validated using the validation set to determine whether the recognition accuracy rate is greater than a preset accuracy threshold. If not, the validation fails, and the training set is expanded and training continues. If so, the validation is successful; the age recognition model with successful validation is tested using the test set to determine whether the confidence level is greater than a preset confidence threshold. If not, the test fails, and the training set is expanded and training continues. If so, the test is successful, and training ends; The trained age recognition model is deployed to an edge computing device with a device type of router, gateway, IPC, or ONU.
9. The age recognition system for routers, gateways, IP cameras, and ONUs according to claim 6, characterized in that: In the real-time face image extraction module, the confidence threshold of the YOLO-Face model is set to 0.7; In the real-time face image preprocessing module, the light compensation is specifically: enhancing the contrast of the low-light area in the real-time face image through the CLAHE algorithm for light compensation; The dynamic noise reduction is specifically: dynamically reducing the noise of the real-time face image through the cooperation of the Kalman filtering algorithm and the bilateral filtering algorithm.
10. An age recognition system for routers, gateways, IP cameras, and ONUs according to claim 6, characterized in that: The recognition log management module is specifically used for: Real-time recording of recognition logs including at least the optimized face image, age recognition result, and recognition time, obtaining the device serial number of the edge computing device itself, extracting image data and text data from the recognition logs, separating the EXIF information and pixel data in the image data, calculating the first data fingerprint by hashing the EXIF information and the device serial number through the SHA3-256 algorithm, and calculating the second data fingerprint by hashing the text data and the device serial number through the SHA3-256 algorithm; Setting a row-column permutation rule, performing a row-column permutation operation on the pixel data based on the row-column permutation rule to obtain encrypted pixel data, and encrypting the EXIF information, encrypted pixel data, and the first data fingerprint through the AES-256 algorithm to obtain the first encrypted data; Setting a cyclic shift rule, shifting the characters of the text data based on the cyclic shift rule to obtain encrypted text data, and encrypting the encrypted text data and the second data fingerprint through the SM9 algorithm to obtain the second encrypted data; Encrypting the first encrypted data and the second encrypted data into an encrypted log through the 3DES algorithm, uploading the encrypted log to the server for storage in real time through the HTTPS protocol, and clearing the encrypted log locally.