Convolutional neural network deployment method and device for Internet of Things

By deploying a CNN model with less learning parameters on IoT devices, using seed convolution kernels and hyperparameter generation rules to reduce the amount of parameters, and introducing group normalization technology, the contradiction between resource consumption and robustness when deploying convolutional neural networks is solved, and efficient data feature capture and robustness improvement are achieved.

CN119806547APending Publication Date: 2025-04-11HENAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411808132.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When deploying convolutional neural networks on IoT devices, prior art is difficult to improve the model's data feature diversity capture capability and robustness while reducing resource consumption.

Method used

By modifying the initial CNN model to a less-learning parameter CNN model, the convolution kernel is randomly selected as the seed convolution kernel, and a diverse generation convolution kernel is generated through mononomial functions of different hyperparameters, reducing the amount of learnable parameters and introducing group normalization technology.

Benefits of technology

It realizes the ability and robustness of model capturing data characteristics while reducing resource consumption, and solves the contradiction between model robustness and resource consumption in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806547A_ABST
    Figure CN119806547A_ABST
Patent Text Reader

Abstract

The invention provides a convolutional neural network deployment method and device for the Internet of Things, and relates to the technical field of the Internet of Things, and the method comprises the steps: modifying an initial CNN model into a few-learning-parameter CNN model; wherein a convolution kernel is randomly selected from each convolution layer of the initial CNN model to serve as a seed convolution kernel, the seed convolution kernels are grouped, and monomial functions of different hyper-parameters are adopted for each group of convolution kernels to serve as a generation rule to obtain a generated convolution kernel; training data is adopted to complete training of the few-learning-parameter CNN model, and the trained few-learning-parameter CNN model is deployed on the Internet of Things equipment, so that data acquired by the Internet of Things equipment is processed, and a prediction result is generated. According to the method, the learnable parameter quantity is reduced, the complexity of the convolution kernel generation rule is increased, and the group normalization technology is introduced, so that the resource consumption is reduced, and meanwhile, the capability and robustness of capturing data feature diversity by the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and more specifically, to a method and device for deploying a convolutional neural network for the Internet of Things. Background Art

[0002] With the widespread application of IoT devices, how to efficiently deploy strong and robust convolutional neural networks (CNNs) on resource-constrained devices has become an important challenge. Among them, the standard convolutional neural network (CNN) model contains three major network structures: convolution layer, pooling layer and fully connected layer. The popular convolutional neural network is actually a deep convolutional neural network, which is obtained by stacking the above three network structures. However, while the CNN model continues to improve its performance with the increasing number of layers, the resources required to complete the training of the model are also increasing, which limits the possibility of deploying convolutional neural networks on IoT devices to provide users with higher quality services. In order to reduce the resource consumption of the model, many lightweight CNN models have been proposed, such as the binary convolutional neural network (LBCNN), in which the parameters in the convolution kernel are fixed to binary (-1 or 1) instead of traditional floating-point numbers. The binary convolution kernel parameters will not be updated during the training process, thus reducing the number of parameters in the model and reducing resource consumption. Although this technology reduces resource consumption, it often weakens the model's ability to capture the diversity of data features and has low robustness. Summary of the invention

[0003] In view of this, the purpose of this application is to provide a convolutional neural network deployment method and device for the Internet of Things, which can reduce resource consumption while improving the model's ability to capture the diversity of data features and robustness.

[0004] In a first aspect, an embodiment of the present application provides a convolutional neural network deployment method for the Internet of Things, the method comprising the following steps:

[0005] The initial CNN model is modified into a CNN model with fewer learning parameters; wherein, a convolution kernel is randomly selected from each convolution layer of the initial CNN model as a seed convolution kernel, and the seed convolution kernels are grouped, and a monomial function with different hyperparameters is used as a generation rule for each group of convolution kernels to obtain a generated convolution kernel;

[0006] The training data is used to complete the training of the CNN model with few learning parameters, and the trained CNN model with few learning parameters is deployed on the IoT device to process the data collected by the IoT device to generate a prediction result.

[0007] In some embodiments, the training of the CNN model with few learning parameters using training data comprises the following steps:

[0008] Initialize the CNN model with few learning parameters and read the training data in batches;

[0009] In the forward propagation phase, for each batch of training data, the error between the predicted data and the true label is calculated using the cross entropy loss function; and in the back propagation phase, the gradient value of the learnable parameters is calculated and updated using the optimizer;

[0010] The training is terminated based on the preset number of iterations or the accuracy on the validation set to obtain a trained CNN model with good learning parameters.

[0011] In some embodiments, during the back-propagation phase, the generated convolution kernel does not participate in parameter updating.

[0012] In some embodiments, the method of using training data to complete the training of the CNN model with few learning parameters further includes the following steps:

[0013] After the training data passes through each convolution layer, the channels of the feature map obtained after convolution are divided into a preset number of groups;

[0014] For each group of divided channels, the mean and variance of the group are calculated, and the feature map data of the group are normalized using the calculated mean and variance.

[0015] In some embodiments, the step of deploying the trained CNN model with few learning parameters on an IoT device comprises the following steps:

[0016] Get the learnable parameters of the trained CNN model with few learning parameters and send them to the IoT device;

[0017] A CNN model with few learning parameters is reconstructed on the IoT device based on the learnable parameters.

[0018] In some embodiments, the method further comprises the following steps:

[0019] Evaluate the performance indicators of the CNN model with few learning parameters deployed on IoT devices according to the set period;

[0020] If the performance indicator does not meet the set threshold, the CNN model with few learning parameters deployed on the IoT device is fine-tuned or retrained.

[0021] In some embodiments, the performance indicators include one or more of accuracy, recall, and F1 value.

[0022] In a second aspect, an embodiment of the present application provides a convolutional neural network deployment device for the Internet of Things, the device comprising:

[0023] A modification module, used to modify the initial CNN model into a CNN model with fewer learning parameters; wherein, a convolution kernel is randomly selected from each convolution layer of the initial CNN model as a seed convolution kernel, and the seed convolution kernels are grouped, and a monomial function with different hyperparameters is used as a generation rule for each group of convolution kernels to obtain a generated convolution kernel;

[0024] The deployment module is used to complete the training of the CNN model with few learning parameters using the training data, and deploy the trained CNN model with few learning parameters on the IoT device to process the data collected by the IoT device and generate a prediction result.

[0025] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the convolutional neural network deployment method for the Internet of Things as described in any one of the first aspects are performed.

[0026] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the convolutional neural network deployment method for the Internet of Things as described in any one of the first aspects above are executed.

[0027] The present application discloses a method and device for deploying a convolutional neural network for the Internet of Things, which modifies the initial CNN model into a CNN model with few learning parameters; wherein, a convolution kernel is randomly selected from each convolution layer of the initial CNN model as a seed convolution kernel, and the seed convolution kernel is grouped, and a monomial function with different hyperparameters is used as a generation rule for each group of convolution kernels to obtain a generated convolution kernel; the training data is used to complete the training of the CNN model with few learning parameters, and the trained CNN model with few learning parameters is deployed on an Internet of Things device to process the data collected by the Internet of Things device and generate a prediction result. By reducing the amount of learnable parameters, increasing the complexity of the convolution kernel generation rules, and introducing group normalization technology, the ability and robustness of the model to capture the diversity of data features is improved while reducing resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 A flowchart of a convolutional neural network deployment method for the Internet of Things described in an embodiment of the present application is shown;

[0030] Figure 2 A schematic diagram of the convolutional layer design of the CNN model with few learning parameters described in an embodiment of the present application is shown;

[0031] Figure 3 A schematic diagram showing the training of the CNN model with few learning parameters according to an embodiment of the present application is shown;

[0032] Figure 4 A schematic diagram showing group normalization of output feature maps according to an embodiment of the present application is shown;

[0033] Figure 5 A schematic diagram of the structure of a convolutional neural network deployment device for the Internet of Things described in an embodiment of the present application is shown;

[0034] Figure 6 A structural block diagram of an electronic device described in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0035] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0036] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0037] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0038] In view of the technical problems raised by the background technology, the present application provides a convolutional neural network deployment method and device for the Internet of Things, which reduces resource consumption while improving the model's ability to capture the diversity of data features and robustness by reducing the amount of learnable parameters, increasing the complexity of convolution kernel generation rules and introducing group normalization technology.

[0039] See the instruction manual Figure 1 , a convolutional neural network deployment method for the Internet of Things provided in an embodiment of the present application includes the following steps:

[0040] S1. Modify the initial CNN model into a CNN model with fewer learning parameters; wherein, randomly select a convolution kernel from each convolution layer of the initial CNN model as a seed convolution kernel, group the seed convolution kernels, and use a monomial function with different hyperparameters as a generation rule for each group of convolution kernels to obtain a generated convolution kernel;

[0041] S2. Use the training data to complete the training of the CNN model with few learning parameters, and deploy the trained CNN model with few learning parameters on the IoT device to process the data collected by the IoT device to generate a prediction result.

[0042] Specifically, in step S1, some convolution kernels are randomly reserved as seed convolution kernels in each convolution layer of the initial CNN model, and the seed convolution kernels are transformed by a monomial function to obtain a generated convolution kernel. In the present application, the parameters of the generated convolution kernel do not need to be learned, nor do they participate in the process of back-propagation to update the parameters. In order to enhance the nonlinear diversity of the convolution kernel and thus improve the model's ability to capture the diversity of data features, the proposed CNN model groups the seed convolution kernels and applies monomial functions with different hyperparameters as generation rules to generate diverse generated convolution kernels.

[0043] Among them, the fixed pattern or limitations that may exist in the traditional convolution kernel setting are broken by random selection. This randomness lays the foundation for the subsequent generation of diversified convolution kernels, so that the model has multiple possibilities at the starting point of feature extraction, avoiding the feature extraction bias problem that may be caused by fixed initialization methods. By using monomial functions with different hyperparameters, the various properties of the generated convolution kernel can be adjusted to a certain extent. Different hyperparameter values ​​will cause the generated convolution kernel to present different characteristics in shape, frequency, amplitude, etc., thereby realizing the diversity of the convolution kernel. For example, when the hyperparameter takes a larger value, the generated convolution kernel may perform better in high-frequency feature extraction; when it takes a smaller value, it may focus more on low-frequency feature extraction.

[0044] In one embodiment, see the attached specification Figure 2, assuming that in a certain convolution layer, four convolution kernels are randomly retained as seed convolution kernels, and then the seed convolution kernels are divided into two groups, each group having two seed convolution kernels. For each group of seed convolution kernels, a monomial function with different hyperparameters is used as a generation rule to obtain a generated convolution kernel. In this embodiment, functions f1(x) and f2(x) represent multiple monomial functions with different hyperparameters as convolution kernel generation rules, and β1 and β2 represent different hyperparameter values. With different hyperparameters, the parameters of the generated convolution kernels are also different, thereby increasing the diversity of the convolution kernels. Different convolution kernel parameters extract different data features, and diverse convolution kernels extract diverse features, thereby improving the ability of the CNN model modified in this application to capture data diversity.

[0045] In terms of resource friendliness, assuming that in a certain convolution layer of the initial CNN model (traditional CNN model), the input channel and output channel are p and q respectively, n convolution kernels are required, and the convolution kernel size is k·k. For the traditional CNN model, the number of learnable parameters is p·k·k·n. For the CNN model with few learning parameters proposed in this application, m convolution kernels are randomly reserved as seed convolution kernels in each convolution layer of the traditional CNN model, so the learnable parameters of the CNN model with few learning parameters are p·k·k·m. Assuming that the input channel is equal to the output channel, the parameter saving rate is Among them, #param.in traditional CNN model represents the amount of learnable parameters of the traditional CNN model, and #param.in CNN model with fewer learning parameters represents the amount of parameters of the CNN model with fewer learning parameters. but That is, the parameter saving rate is 50%. It should be noted that, when calculating the parameter amount, unless it is specifically stated that the calculation result includes the number of unlearned parameters, the default parameter amount only refers to the number of learnable parameters.

[0046] See the instruction manual Figure 3 , in step S2, it is necessary to train the CNN model with few learning parameters. Specifically, first, initialize the CNN model with few learning parameters and read the training data in batches to perform data preprocessing. Secondly, in the forward propagation stage of the model, for each batch of training data, the output prediction value is calculated by forward propagation of the model, and the error between the predicted data of the model and the true label is calculated using the cross entropy loss function. Then, in the back propagation stage, only the learnable parameters are back propagated, their gradient values ​​are calculated, and the learnable parameters are updated using the optimizer. Among them, the parameters for generating the convolution kernel remain unchanged and do not participate in the process of back propagation updating parameters. Finally, the above process is repeated continuously until the accuracy of the model on the verification set reaches the set standard or the training reaches a preset number of iterations, and the training is terminated.

[0047] Among them, in the forward propagation stage of the model, for each batch of data, forward calculations are performed in sequence through each layer of the model to finally obtain the output prediction value; and after obtaining the output prediction value, the cross entropy loss function is used to calculate the error between the model's predicted data and the true label, which should be a technical means well known to those skilled in the art and will not be elaborated here. This application emphasizes that in the back-propagation stage, only the learnable parameters are back-propagated. This is because in the CNN model with few learning parameters, the parameters of the generated convolution kernel remain unchanged and do not participate in the back-propagation process of updating parameters to reduce resource consumption.

[0048] It should be noted that in the present application, group normalization technology is adopted, which is to enhance the robustness of the CNN model with few learning parameters. In order to accelerate the model training process in the traditional CNN model, batch normalization technology is usually used to normalize the data of each batch to ensure that the distribution of the input data in each layer of the network is more stable. However, in the batch normalization process, the normalized mean and variance used in the actual application stage are based on the global cumulative value of the training data. When there are significant differences in the distribution of the data collected by the training data and the actual application, the above mean and variance cannot represent the actual data, which will cause the CNN model accuracy to be greatly reduced. However, in a complex real environment, affected by various environmental noises, there are usually large differences in the distribution of the data collected by the training data and the actual application. Therefore, the accuracy of the traditional CNN model will be significantly reduced in practical applications, that is, the robustness of the model is poor. The present application introduces group normalization technology to replace batch normalization technology.

[0049] See the instruction manual Figure 4, the group normalization is to divide the data (output feature map) into several groups in the channel dimension, and then perform normalization processing in each group. It does not operate based on batch data like batch normalization, but focuses on grouping and normalizing the data in the channel dimension. This method can show better performance in some cases, such as small batches of data or when the data distribution of training data and test / inference data changes greatly. It can stabilize the model training process and improve the robustness of the model. However, when only group normalization is used instead of batch normalization, the model lacks the regularization effect brought by random batch sampling of batch normalization. This is because the operation of group normalization is based on the feature map of a single sample, divides its channels into multiple groups, and performs mean and variance in the group. Since the statistic depends only on the feature distribution of a single sample, the operation is more fixed and cannot introduce uncertainty caused by random batch adoption in batch normalization. Therefore, the model lacks the function of suppressing overfitting and improving generalization ability by adapting to this uncertainty during the training process, making the model more prone to overfitting. However, the CNN model with few learning parameters adopted in this application actually introduces an additional regularization effect by using a plurality of monomial functions with different hyperparameters as the convolution kernel generation rule. This is because the existence of the generation rule makes the learnable parameters of the model not only affected by the training data but also affected by the generation rule during training, which plays a regularization role on the model. Therefore, the existence of the generation rule makes up for the lack of group normalization in regularization, so that the performance of the model has strong stability in many cases, and improves the robustness of the model. Therefore, this application combines the group normalization technology with the CNN model with few learning parameters, which complements each other, and improves the ability and robustness of the model to capture the diversity of data features while reducing resource consumption.

[0050] After the training of the CNN model with few learning parameters is completed, the learnable parameters of the trained CNN model with few learning parameters are obtained, and these learnable parameters carry the important information such as the knowledge and feature extraction ability learned by the CNN model with few learning parameters during the training process. Through suitable storage formats (such as common binary formats or formats supported by specific deep learning frameworks), it can be ensured that these parameters can be accurately saved so that they can be used on other devices later. In this application, the saved learnable parameters are sent to the Internet of Things device, and after the Internet of Things device receives the parameters of the model, these learnable parameters are used to reproduce the CNN model with few learning parameters. For example, the network structure of the model is rebuilt on the Internet of Things device, and the received parameters are filled into the corresponding layers and nodes one by one. After reproducing the model, the CNN model with few learning parameters is deployed so that it can run normally and play a role on the Internet of Things device. This requires that the input and output of the CNN model with few learning parameters be adapted according to the specific application scenarios and requirements of the Internet of Things device. For example, if it is an IoT device used for image recognition, the image data collected by the camera needs to be properly preprocessed to meet the input requirements of the model, and then the output results of the CNN model with few learning parameters (such as the identified object categories, etc.) need to be further processed and displayed so that users can intuitively obtain relevant information.

[0051] After deploying the low-parameter CNN model on the IoT device, the collected real data is loaded, the inference task is performed, the prediction results are generated and fed back to the user or the system for further processing.

[0052] Furthermore, in this application, the performance index of the CNN model with few learning parameters deployed on the IoT device is regularly evaluated. For example, one or more of accuracy, recall rate, and F1 value. If the performance index does not meet the set threshold, the CNN model with few learning parameters deployed on the IoT device is fine-tuned or retrained.

[0053] This is because, as time goes by and business develops, new data may be continuously collected on the IoT device side. These new data may contain information patterns or features that were not previously covered, and there is a difference with the data distribution on which the low-learning parameter CNN model was initially trained. For example, in an IoT application for environmental monitoring, the environmental data when the low-learning parameter CNN model was initially trained may only cover the conditions of a certain season or a specific area, and as the device continues to run, environmental data from other seasons or different areas is subsequently collected. If the low-learning parameter CNN model is not updated to adapt to these new data, it may not be able to accurately analyze and predict the new environmental conditions. When it is judged that the performance indicators have degraded, the low-learning parameter CNN model deployed on the IoT device needs to be updated, and the update method includes fine-tuning or retraining.

[0054] The retraining is to reinitialize all learnable parameters of the CNN model with few learning parameters, and perform a complete training process based on all newly collected data (including the original training data and the newly generated data). The advantage of this method is that it allows the CNN model with few learning parameters to fully learn all the features and information of the new data, so that it is possible to achieve better performance improvement. However, it also has some disadvantages, such as taking a lot of time and computing resources.

[0055] The fine-tuning is to make small adjustments to some key learnable parameters while keeping most of the original structure and parameters of the CNN model with few learning parameters unchanged. Usually, the last few layers (such as the classifier part) of the CNN model with few learning parameters are fine-tuned based on new data. This method is relatively more time-saving and computationally resource-saving, but the effect may not be as significant as retraining, depending on the characteristics of the new data and the state of the original model.

[0056] It can be seen that compared with the prior art, the convolutional neural network deployment method for the Internet of Things provided in this application reduces resource consumption after the model is lightweight, while improving the model's ability to capture the diversity of data features and robustness.

[0057] As the instruction manual Figure 5 As shown, the present application also provides a convolutional neural network deployment device for the Internet of Things, the device comprising:

[0058] A modification module 501 is used to modify the initial CNN model into a CNN model with fewer learning parameters; wherein, a convolution kernel is randomly selected from each convolution layer of the initial CNN model as a seed convolution kernel, and the seed convolution kernels are grouped, and a monomial function with different hyperparameters is used as a generation rule for each group of convolution kernels to obtain a generated convolution kernel;

[0059] The deployment module 502 is used to complete the training of the CNN model with few learning parameters using the training data, and deploy the trained CNN model with few learning parameters on the IoT device to process the data collected by the IoT device and generate a prediction result.

[0060] In some embodiments, the deployment module 502 uses training data to complete the training of the CNN model with few learning parameters, including: initializing the CNN model with few learning parameters and reading the training data in batches; in the forward propagation stage, for each batch of training data, using the cross entropy loss function to calculate the error between the predicted data and the true label; and in the back propagation stage, calculating the gradient value of the learnable parameter and updating it using the optimizer; ending the training based on a preset number of iterations or the accuracy on the validation set to obtain a trained CNN model with learning parameters. In the back propagation stage, the generated convolution kernel does not participate in parameter update.

[0061] In some embodiments, the deployment module 502 deploys the trained CNN model with few learning parameters on the IoT device, including obtaining the learnable parameters of the trained CNN model with few learning parameters and sending them to the IoT device; and reconstructing the CNN model with few learning parameters on the IoT device based on the learnable parameters.

[0062] In some embodiments, the apparatus further comprises:

[0063] The update module is used to evaluate the performance indicators of the CNN model with few learning parameters deployed on the IoT device according to the set period; the performance indicators include one or more of accuracy, recall rate, and F1 value; if the performance indicators do not meet the set threshold, the CNN model with few learning parameters deployed on the IoT device is fine-tuned or retrained.

[0064] The present application provides a convolutional neural network deployment device for the Internet of Things, which modifies the initial CNN model into a CNN model with few learning parameters through a modification module; wherein, a convolution kernel is randomly selected from each convolution layer of the initial CNN model as a seed convolution kernel, and the seed convolution kernel is grouped, and a monomial function with different hyperparameters is used as a generation rule for each group of convolution kernels to obtain a generated convolution kernel; the training data is used to complete the training of the CNN model with few learning parameters through the deployment module, and the trained CNN model with few learning parameters is deployed on an Internet of Things device to process the data collected by the Internet of Things device and generate a prediction result. By reducing the amount of learnable parameters, increasing the complexity of the convolution kernel generation rules and introducing group normalization technology, the ability and robustness of the model to capture the diversity of data features is improved while reducing resource consumption.

[0065] Based on the same concept of the present invention, the specification is attached Figure 6 As shown, the structure of an electronic device 600 provided in an embodiment of the present application includes: at least one processor 601, at least one network interface 604 or other user interface 603, a memory 605, and at least one communication bus 602. The communication bus 602 is used to realize the connection and communication between these components. The electronic device 600 optionally includes a user interface 603, including a display (for example, a touch screen, LCD, CRT, holographic imaging (Holographic) or projection (Projector), etc.), a keyboard or a pointing device (for example, a mouse, a trackball (trackball), a touch pad or a touch screen, etc.).

[0066] The memory 605 may include a read-only memory and a random access memory, and provides instructions and data to the processor 601. A portion of the memory 605 may also include a non-volatile random access memory (NVRAM).

[0067] In some embodiments, the memory 605 stores the following elements, which may be protected modules or data structures, or a subset thereof, or an extended set thereof:

[0068] Operating system 6051, including various system programs for implementing various basic services and processing hardware-based tasks;

[0069] The application module 6052 includes various application programs, such as a launcher, a media player, a browser, etc., which are used to implement various application services.

[0070] In an embodiment of the present application, by calling the program or instructions stored in the memory 605, the processor 601 is used to execute steps in a convolutional neural network deployment method for the Internet of Things, which can reduce resource consumption while improving the model's ability to capture the diversity of data features and robustness.

[0071] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the convolutional neural network deployment method for the Internet of Things are executed.

[0072] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the above-mentioned convolutional neural network deployment method for the Internet of Things can be executed.

[0073] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

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

[0075] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0076] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0077] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A convolutional neural network deployment method for the Internet of Things, characterized in that: The method comprises the following steps: The initial CNN model is modified into a CNN model with fewer learning parameters; wherein, a convolution kernel is randomly selected from each convolution layer of the initial CNN model as a seed convolution kernel, and the seed convolution kernels are grouped, and a monomial function with different hyperparameters is used as a generation rule for each group of convolution kernels to obtain a generated convolution kernel; The training data is used to complete the training of the CNN model with few learning parameters, and the trained CNN model with few learning parameters is deployed on the IoT device to process the data collected by the IoT device to generate a prediction result.

2. According to claim 1, a convolutional neural network deployment method for the Internet of Things is characterized in that: The training of the CNN model with few learning parameters using training data includes the following steps: Initialize the CNN model with few learning parameters and read the training data in batches; In the forward propagation phase, for each batch of training data, the error between the predicted data and the true label is calculated using the cross entropy loss function; and in the back propagation phase, the gradient value of the learnable parameters is calculated and updated using the optimizer; The training is terminated based on the preset number of iterations or the accuracy on the validation set to obtain a trained CNN model with good learning parameters.

3. The method for deploying a convolutional neural network for the Internet of Things according to claim 2, characterized in that: in, In the back-propagation phase, the generated convolution kernel does not participate in parameter updating.

4. The method for deploying a convolutional neural network for the Internet of Things according to claim 3, characterized in that: The method of using training data to complete the training of the CNN model with few learning parameters also includes the following steps: After the training data passes through each convolution layer, the channels of the feature map obtained after convolution are divided into a preset number of groups; For each group of divided channels, the mean and variance of the group are calculated, and the feature map data of the group are normalized using the calculated mean and variance.

5. The method for deploying a convolutional neural network for the Internet of Things according to claim 4, characterized in that: The method of deploying the trained CNN model with few learning parameters on the IoT device includes the following steps: Get the learnable parameters of the trained CNN model with few learning parameters and send them to the IoT device; A CNN model with few learning parameters is reconstructed on the IoT device based on the learnable parameters.

6. The method for deploying a convolutional neural network for the Internet of Things according to claim 5, characterized in that: The method further comprises the following steps: Evaluate the performance indicators of the CNN model with few learning parameters deployed on IoT devices according to the set period; If the performance indicator does not meet the set threshold, the CNN model with few learning parameters deployed on the IoT device is fine-tuned or retrained.

7. The method for deploying a convolutional neural network for the Internet of Things according to claim 6, characterized in that: The performance indicators include one or more of accuracy, recall rate, and F1 value.

8. A convolutional neural network deployment device for the Internet of Things, characterized in that: The device comprises: A modification module, used to modify the initial CNN model into a CNN model with fewer learning parameters; wherein, a convolution kernel is randomly selected from each convolution layer of the initial CNN model as a seed convolution kernel, and the seed convolution kernels are grouped, and a monomial function with different hyperparameters is used as a generation rule for each group of convolution kernels to obtain a generated convolution kernel; The deployment module is used to complete the training of the CNN model with few learning parameters using the training data, and deploy the trained CNN model with few learning parameters on the IoT device to process the data collected by the IoT device and generate a prediction result.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the convolutional neural network deployment method for the Internet of Things as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the convolutional neural network deployment method for the Internet of Things as described in any one of claims 1 to 7.