Edge computing method and device
Through edge computing methods, edge devices and cloud devices work together to share common network model parameters, solving the problems of limited computing resources and privacy protection in the Internet of Things, and achieving low latency and efficient data processing and management efficiency improvement.
Patent Information
- Application Number
- CN202011380254.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-11-30
AI Technical Summary
The existing cloud computing model is difficult to meet the real-time, reliability, privacy protection, personalization and autonomous needs of the smart Internet of Things in the Internet of Things, especially in the scenario of quickly processing data, and the computing resources and storage resources of the end-side device are 有限,导致模型更新频繁、管理复杂。
Using edge computing method, edge devices work together through edge devices and cloud devices. Edge devices use a general network model to extract feature and send feature data to the cloud. Cloud devices generate prediction results and return them. Multiple edge devices share common network model parameters and update only Cloud task network model is easy to manage, reduces data transmission and delays, and protects user privacy.
It reduces the storage and computing costs of edge devices, reduces data transmission delays, avoids frequent model updates, improves management efficiency, and improves service quality and user privacy protection.
Smart Images

Figure CN114640669B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and edge computing technologies, and in particular to an edge computing method and device. Background Art
[0002] As more and more devices are connected to the Internet and generate data, data continues to grow at a record pace. At present, the main way to implement the Internet of Things is still based on cloud computing. The end-side devices or edge-side devices are only responsible for data collection and data transmission, and all calculations (training, reasoning) are concentrated on the cloud side. However, this method cannot meet the real-time, reliability, privacy protection, personalization, autonomy and other requirements of the intelligent Internet of Things, especially in some usage scenarios that require very fast data processing. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide an edge computing method and device that can realize end-cloud collaborative task processing.
[0004] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0005] On the one hand, an edge computing method is provided, which is performed by an edge device and includes:
[0006] Get the task data;
[0007] Extracting features from data of the task using a general network model and configuration information of the task;
[0008] Sending the extracted feature data and configuration information of the task to a cloud device;
[0009] Receiving a prediction result of the data for the task returned by the cloud device;
[0010] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0011] In some embodiments, the configuration information includes:
[0012] Task number;
[0013] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0014] In some embodiments, the task data includes at least one of the following:
[0015] Images, text, video, audio, digital signals;
[0016] The task includes at least one of the following: image classification, object detection, and text prediction.
[0017] In some embodiments, before extracting features from the data of the task using the general network model and the configuration information of the task, the method further includes:
[0018] Collecting original task data, and sending the collected original task data to a cloud device;
[0019] Receive the general network model and the configuration information returned by the cloud device.
[0020] The embodiment of the present invention further provides an edge computing method, which is executed by a cloud device and includes:
[0021] Receiving characteristic data of task data and configuration information of the task sent by at least one edge device;
[0022] Determining a task network model corresponding to the task according to the configuration information of the task;
[0023] Using the task network model to generate a prediction result for the data of the task according to the feature data;
[0024] Sending the prediction result to the edge device;
[0025] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0026] In some embodiments, the configuration information includes:
[0027] Task number;
[0028] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0029] In some embodiments, the task data includes at least one of the following:
[0030] Images, text, video, audio, digital signals;
[0031] The task includes at least one of the following: image classification, object detection, and text prediction.
[0032] In some embodiments, the method further comprises:
[0033] Receiving original task data collected by the edge device, and constructing a data set using the original task data;
[0034] Using the data set to train a general network model;
[0035] Determine a model division point k of each task, use the model division point k as configuration information of the task, and construct a task network model according to the configuration information of the task;
[0036] The configuration information of the task and the general network model are sent to the edge device.
[0037] In some embodiments, determining the model partition point k of each task includes:
[0038] The training data corresponding to the task is input into the general network model, and the intermediate features are obtained layer by layer. The intermediate features obtained from each layer of the general network model are normalized, and the weighted sum of the statistical values of the partial intervals of the normalized brightness of the intermediate features is calculated layer by layer, and the calculation result is compared with the set threshold. If the calculation result is less than the threshold, the calculation is continued according to the intermediate features of the next layer; if the calculation result exceeds the threshold, the calculation is stopped and the current layer number k is recorded.
[0039] The embodiment of the present invention further provides an edge computing device, which is executed by an edge device and includes:
[0040] The acquisition module is used to obtain task data;
[0041] A feature extraction module, used to extract features from the data of the task using a general network model and the configuration information of the task;
[0042] A sending module, used to send the extracted feature data and the configuration information of the task to a cloud device;
[0043] A receiving module, used for receiving the prediction result of the data for the task returned by the cloud device;
[0044] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0045] In some embodiments, the configuration information includes:
[0046] Task number;
[0047] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0048] In some embodiments, the task data includes at least one of the following:
[0049] Images, text, video, audio, digital signals;
[0050] The task includes at least one of the following: image classification, object detection, and text prediction.
[0051] In some embodiments,
[0052] The sending module is also used to collect original task data and send the collected original task data to the cloud device;
[0053] The receiving module is also used to receive the general network model and the configuration information returned by the cloud device.
[0054] The embodiment of the present invention further provides an edge computing device, which is executed by a cloud device and includes:
[0055] A receiving module, used to receive characteristic data of task data and configuration information of the task sent by at least one edge device;
[0056] A processing module, used to determine a task network model corresponding to the task according to the configuration information of the task;
[0057] A prediction module, used to generate a prediction result for the data of the task according to the feature data using the task network model;
[0058] A sending module, used to send the prediction result to the edge device;
[0059] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0060] In some embodiments, the configuration information includes:
[0061] Task number;
[0062] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0063] In some embodiments, the task data includes at least one of the following:
[0064] Images, text, video, audio, digital signals;
[0065] The task includes at least one of the following: image classification, object detection, and text prediction.
[0066] In some embodiments,
[0067] The receiving module is also used to receive the original task data collected by the edge device, and construct a data set using the original task data;
[0068] The processing module is also used to train a general network model using the data set; determine a model division point k of each task, use the model division point k as configuration information of the task, and construct a task network model according to the configuration information of the task;
[0069] The sending module is also used to send the configuration information of the task and the general network model to the edge device.
[0070] In some embodiments, the processing module is specifically used to input the training data corresponding to the task into the general network model, obtain intermediate features layer by layer, normalize the intermediate features obtained at each layer of the general network model, calculate the weighted sum of the statistical values of the partial intervals of the normalized brightness of the intermediate features layer by layer, and compare the calculation result with the set threshold. If the calculation result is less than the threshold, continue to calculate according to the intermediate features of the next layer; if the calculation result exceeds the threshold, stop the calculation and record the current number of layers k.
[0071] An embodiment of the present invention provides an edge computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the program, the edge computing method as described above is implemented.
[0072] In some embodiments, the edge computing device is applied to an edge device, and the processor is used to obtain task data; extract features from the task data using a general network model and configuration information of the task; send the extracted feature data and the configuration information of the task to a cloud device; receive a prediction result for the task data returned by the cloud device;
[0073] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0074] In some embodiments, the configuration information includes:
[0075] Task number;
[0076] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0077] In some embodiments, the task data includes at least one of the following:
[0078] Images, text, video, audio, digital signals;
[0079] The task includes at least one of the following: image classification, object detection, and text prediction.
[0080] In some embodiments, the processor is further used to collect original task data, and send the collected original task data to a cloud device; and receive the general network model and the configuration information returned by the cloud device.
[0081] In some embodiments, the edge computing device is applied to a cloud device, and the processor is used to receive feature data of task data and configuration information of the task sent by at least one edge device; determine a task network model corresponding to the task according to the configuration information of the task; generate a prediction result for the data of the task according to the feature data using the task network model; and send the prediction result to the edge device;
[0082] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0083] In some embodiments, the processor is also used to receive the original task data collected by the edge device, and construct a data set using the original task data; use the data set to train a general network model; determine the model division point k of each task, use the model division point k as the configuration information of the task, and construct a task network model according to the configuration information of the task; and send the configuration information of the task and the general network model to the edge device.
[0084] In some embodiments, the processor is also used to input the training data corresponding to the task into the general network model, obtain intermediate features layer by layer, normalize the intermediate features obtained at each layer of the general network model, calculate the weighted sum of the statistical values of the partial intervals of the normalized brightness of the intermediate features layer by layer, and compare the calculation result with the set threshold. If the calculation result is less than the threshold, continue to calculate according to the intermediate features of the next layer; if the calculation result exceeds the threshold, stop the calculation and record the current number of layers k.
[0085] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the above method are implemented.
[0086] The embodiments of the present invention have the following beneficial effects:
[0087] In the above scheme, when there is task data, the edge device uses the general network model and the configuration information of the task to extract features from the task data, and sends the extracted feature data and the configuration information of the task to the cloud device. The cloud device generates a prediction result for the task data based on the extracted feature data, and sends the prediction result to the edge device. In this embodiment, multiple edge devices share the general network model parameters and keep the parameters fixed, so that for different tasks, only the general network model needs to be deployed once on the edge device. When the task is updated, only the task network model of the cloud device needs to be updated, which is easy to manage, and the storage and computing costs of the edge device are low; and the edge device only needs to send the feature data to the cloud device, avoiding the direct transmission of the original data of the task, reducing the amount of data transmission, reducing transmission delay, and protecting user privacy. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 A schematic diagram of a flow chart of an edge computing method performed by an edge device according to an embodiment of the present invention;
[0089] Figure 2 A schematic diagram of a flow chart of an edge computing method executed by a cloud device according to an embodiment of the present invention;
[0090] Figure 3 A schematic diagram of the layout of a network model according to an embodiment of the present invention;
[0091] Figure 4-Figure 6 Schematic diagram of the edge computing method according to an embodiment of the present invention;
[0092] Figure 7 This is a schematic diagram of the structure of an edge computing device on the edge device side of an embodiment of the present invention;
[0093] Figure 8 This is a schematic diagram of the structure of an edge computing device on the cloud device side according to an embodiment of the present invention;
[0094] Fig. 9 It is a schematic diagram of the composition of an edge computing device on the edge device side of an embodiment of the present invention;
[0095] Fig.10 Schematic diagram of the composition of the edge computing device on the cloud device side of an embodiment of the present invention. DETAILED DESCRIPTION
[0096] In order to make the technical problems, technical solutions and advantages to be solved by the embodiments of the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0097] End-to-cloud collaboration is an optional solution for the intelligent Internet of Things. In the end-to-cloud collaboration model, the end side and the cloud side each perform part of the calculation, which can make full use of the computing power of the end side. The obvious advantages are as follows: (1) Reduce network transmission delay and reduce network transmission pressure. If the collected raw data is processed on the end side to obtain some abstract features before being transmitted to the cloud side, the data volume is compressed, which greatly alleviates the pressure of network transmission. (2) Improve application efficiency. By reducing network latency, applications can run more efficiently and faster. (3) Security and privacy protection. The data collected on the end side involves personal privacy. The traditional cloud computing model requires uploading this private data to the cloud computing center, which will increase the risk of leaking user privacy data. However, uploading abstract features to the cloud computing center will minimize the risk of privacy leakage.
[0098] However, a very prominent shortcoming of the IoT end side is that computing resources and storage resources are very limited. With the trend of highly intelligent IoT devices, multiple tasks may need to be run on a smart device. For example, a camera integrated on a robot may need to perform face recognition tasks, object recognition tasks, or obstacle recognition tasks on the currently captured images at the same time.
[0099] In response to the above problem of limited computing resources, existing technical solutions mostly adopt the method of setting priorities for tasks and designing complex task scheduling algorithms to ensure the smooth operation of current tasks. In response to the above method of limited storage resources, existing technical solutions mostly adopt the method of model compression to reduce the size of the model as much as possible so that it occupies as little storage resources as possible on the end side.
[0100] In the above-mentioned scenarios of end-cloud collaboration and multi-task parallelism, there are many problems with existing technical solutions.
[0101] (1) It does not involve end-cloud collaboration. Existing solutions generally deploy the model entirely on the terminal device, without involving collaboration between the device and the cloud.
[0102] (2) The end-side model needs to be continuously updated: The existing device-side model needs to be continuously updated, which requires continuous downloading and deployment.
[0103] (3) Models are not shared between multiple tasks.
[0104] In summary, the current solution is to prepare a model for each task. If there are N tasks, there will be N models. No matter how the resource scheduling algorithm is designed, it will lead to the following problems: (1) The large number of models consumes resources; (2) The model must be downloaded and updated every time a new task is added or switched; (3) As the number of models increases, management becomes more and more complicated.
[0105] The embodiments of the present invention provide an edge computing method and device, which can realize end-cloud collaborative task processing.
[0106] An embodiment of the present invention provides an edge computing method, which is executed by an edge device, such as Figure 1 As shown, including:
[0107] Step 101: Obtain task data;
[0108] Step 102: extracting features from the task data using the general network model and the configuration information of the task;
[0109] Step 103: Sending the extracted feature data and the configuration information of the task to a cloud device;
[0110] Step 104: receiving a prediction result of the data for the task returned by the cloud device;
[0111] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0112] This embodiment proposes a method for end-cloud collaboration of deep learning, which utilizes the structural characteristics of deep networks to maintain a general network model suitable for multiple tasks on the edge device side and a task network model for each task on the cloud device. The general network model on the edge device side and the task network model on the cloud side collaborate to complete task processing.
[0113] When there is task data, the edge device uses the general network model and the configuration information of the task to extract features from the task data, and sends the extracted feature data and the configuration information of the task to the cloud device. The cloud device generates a prediction result for the task data based on the extracted feature data, and sends the prediction result to the edge device. In this embodiment, multiple edge devices share the general network model parameters and keep the parameters fixed, so that for different tasks, only the general network model needs to be deployed once on the edge device. When the task is updated, only the task network model of the cloud device needs to be updated, which is easy to manage, and the storage and computing costs of the edge device are low; and the edge device only needs to send the feature data to the cloud device, avoiding the direct transmission of the original data of the task, reducing the amount of data transmission, reducing transmission delay, and protecting user privacy.
[0114] In some embodiments, the configuration information includes:
[0115] Task number;
[0116] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0117] In some embodiments, the task data includes at least one of the following:
[0118] Images, text, video, audio, digital signals;
[0119] The task includes at least one of the following: image classification, object detection, and text prediction.
[0120] In some embodiments, before extracting features from the data of the task using the general network model and the configuration information of the task, the method further includes:
[0121] Collecting original task data, and sending the collected original task data to a cloud device;
[0122] Receive the general network model and the configuration information returned by the cloud device.
[0123] The technical solution of this embodiment can be used for OneNET (China Mobile Internet of Things Open Platform) edge IoT (Internet of Things). OneNET edge IoT supports running in edge cloud infrastructures ranging from embedded terminals to MEC (mobile edge computing), and can provide artificial intelligence, big data, IoT device management, industrial terminal protocol adaptation, video access, massive time series data storage and other functions at the edge. The security function installed on the camera realizes functions such as face recognition, pedestrian detection, and object detection. After using this technology, the models on the end side such as the camera can avoid frequent updates, which not only greatly reduces the latency and protects privacy, but also reduces the management and maintenance costs of the equipment, which is conducive to improving the mobile service quality and customer satisfaction.
[0124] like Figure 3 As shown in the figure, a general network model suitable for multiple tasks (referred to as shared layers) is maintained on the edge device side, and N task network models (task layers) are maintained on the cloud device. N tasks correspond to N task network models. When executing a task, the general network model on the edge device side and the task network model on the cloud side work together to complete the task, as shown in the figure. Figure 3 shown.
[0125] In the end-cloud collaborative reasoning stage: the general network model on the edge device side is mainly responsible for executing shared layers to extract features from the data collected by the device. The extracted feature data will be transmitted to the cloud through the network. The task network model on the cloud side is mainly responsible for receiving the feature data transmitted from the device side and executing task layers to generate prediction results, and then feeding the prediction results back to the device side. Figure 4As shown. The collaboration between the edge device and the cloud mainly relies on configuration information, which includes the task number, the number of layers that need to be executed in the general network model of the edge device, etc. After receiving the configuration information, the cloud side can directly find the cloud task network model that needs to be executed for the current task. The data collected by the edge device here may be images, text, video, audio, digital signals, etc., and the tasks performed by the task network model may be image classification, object detection, text prediction, etc.
[0126] This embodiment requires training a general network model in the cloud. For different tasks, the division point is determined based on the intermediate features generated by the data of the task in the general network model, and the task network model of the task is trained in conjunction with the general network model before the division point. After the training is completed, the general network model is deployed on the edge device side, and the task network model is deployed on the cloud. The process is as follows Figure 5 shown.
[0127] When there is a new task, the edge device will transmit the collected raw data to the cloud. After annotating a small amount of data, it will execute the general network to determine the division points, design the task network model, and train the network model of the task by combining the general network model and the task network model. After the training is completed, the task network model is deployed in the cloud, and the configuration information of the task is sent to the edge device. There is no need to update the model on the edge device. The process is as follows: Figure 6 shown.
[0128] Among them, for different tasks, the division point is determined based on the intermediate features generated by the data of the task in the general network, which means that the training data set corresponding to the task is input into the trained general network, the intermediate features are obtained layer by layer, and the intermediate features obtained in the above layers are processed. The specific processing method includes calculating statistical features such as brightness and mean, and performing normalization. Specifically, the weighted sum of the statistical values of the normalized brightness of the intermediate features is calculated layer by layer (for example, greater than 0.5), and compared with the set threshold. If it is less than the threshold, the calculation of the intermediate features of the next layer continues; if it exceeds the threshold, the operation is stopped and the current layer number k is recorded. At this time, the model division point k of the task is obtained. For multiple tasks, the above operation is repeated to obtain the model division point of each task. Since the data sets of different tasks are different, the obtained model division points may also be different.
[0129] Taking the image classification task as an example, the technical solution of this embodiment includes the following steps:
[0130] The first step is the data preparation phase on the cloud side (i.e., the cloud device side), where images from one or more databases and their corresponding labels are formatted, with each image corresponding to a label. For example, the large dataset ImageNet, the handwritten digit recognition dataset MNIST, the scene recognition dataset Places32, or other self-built datasets.
[0131] The second step is to train a general network on the cloud side. For example, a general network is trained on the large dataset ImageNet. It can be a classic network structure such as VGG, ResNet, DenseNet, or a deep network.
[0132] The third step is to select appropriate model division points for different tasks. For example, for the handwritten digit recognition dataset, the images in the dataset are input into the trained general network, and the intermediate features (Feature Map) are obtained layer by layer. The intermediate features obtained in the above layers are processed. The specific processing method includes calculating statistical features such as brightness and mean, and performing normalization. Specifically, the weighted sum of the statistical values of the normalized brightness of the intermediate features is calculated layer by layer (greater than 0.5), and compared with the set threshold. If it is less than the threshold, continue to calculate the intermediate features of the next layer; if it exceeds the threshold, stop the operation and record the current layer number k. At this point, the model division point k of the task is obtained. For multiple tasks, repeat the above operation to obtain the model division point of each task. Since the data sets of different tasks are different, the obtained model division points may also be different.
[0133] The fourth step is to train respective task network models for different tasks. For example, for the handwritten digit recognition dataset, after obtaining the model division point k, the first k layers of the general network are used as the general network model (shared layers) of the task, and a simple p-layer network is designed as the task network model (task layers) of the task, where k represents the division point of the underlying network, p represents the number of layers of the cloud task network, and p can be a value set based on experience. The output of the general network model is the input of the task network model, and the shared layers and task layers together constitute a new network. The training data is a handwritten data recognition dataset. During the training process, the parameters of the shared layers are kept fixed, and only the parameters of the task layers are updated. After a certain number of training iterations, such as 100 epochs, the network reaches stability, and a trained network for handwritten digit recognition is obtained. Similarly, similar operations can be performed for other datasets.
[0134] The fifth step is to deploy the configuration information of the general network and each task to the edge device, and the task network model of each task is deployed in the cloud. The configuration information of each task mainly includes the task number and the model division point k of each task. On the edge device side, different tasks share the parameter space of the general network model. For example, after the handwritten digit recognition dataset is input into the general network model on the edge device side, it passes through the first k1 layers of the general network model, and the output intermediate features are transmitted to the cloud. The handwritten digit recognition task network model deployed on the cloud receives the intermediate features, continues to reason, and generates the final prediction results; after the scene recognition dataset is input into the general network model on the edge device side, it passes through the first k2 layers of the general network model, and the output intermediate features are transmitted to the cloud. The scene recognition task network model deployed on the cloud receives the intermediate features, continues to reason, and generates the final prediction results. The above operations realize the collaboration between the edge device side and the cloud.
[0135] In the sixth step, especially for new tasks, the edge device transmits the collected raw data to the cloud, after a small amount of manual annotation, and then executes the third, fourth, and fifth steps.
[0136] The third step uses the absolute value of the brightness of the Feature Map of the current layer to determine the model division point, and can also be determined by the ratio of the brightness of the Feature Map of the adjacent layers, without limitation.
[0137] The above embodiment introduces the processing flow for specific applications. For other applications, the processing flow is the same. This embodiment combines the structural characteristics of deep convolutional neural networks. The underlying network extracts detailed features of the input data, and the high-level network extracts semantic features of the input data. Specifically, the general network model on the edge device side extracts the detailed features of the input data and transmits the intermediate features to the cloud. The task network model on the cloud side extracts semantic features and generates prediction results. Different tasks have different semantic features, and the task network models on the cloud side are also different. The edge device side maintains a general network model to save computing and storage resources and facilitate management.
[0138] In this embodiment, the general network model on the edge device side is mainly responsible for extracting features from the collected data and adding configuration information. The configuration information includes the task number, the number of layers that need to be executed for the task in the general network model on the edge device side, etc. The extracted features and configuration information are transmitted to the cloud through the network.
[0139] For a specific task, the cloud computes the features of each layer output by the deep model on the dataset of the task, and determines the model division layer of the specific task based on the statistical features of the brightness, mean, variance, etc. of each layer. Specifically, the model division layer can be determined by the ratio of the Feature Map statistical parameters of the previous and next layers, or the absolute difference, etc.
[0140] In this embodiment, multiple tasks share a common network model on the edge device side, reducing computing and storage resources and power consumption; the parameters of the common model remain fixed, and only the task network model on the cloud is updated when the model is updated, avoiding frequent deployment of new models to the end side and facilitating management. In addition, the method proposed in this solution to divide the model according to the statistical features of the Feature Map such as brightness, mean, and variance fully relies on the structural characteristics of the deep convolutional neural network and does not reduce the accuracy of the model. This solution is not only applicable to the image classification tasks described in the example, but also to the optimization of other image, video, text, and speech models, and has better universality.
[0141] The embodiment of the present invention also provides an edge computing method, which is executed by a cloud device, such as Figure 2 As shown, including:
[0142] Step 201: receiving characteristic data of task data and configuration information of the task sent by at least one edge device;
[0143] Step 202: determining a task network model corresponding to the task according to the configuration information of the task;
[0144] Step 203: using the task network model to generate a prediction result for the data of the task according to the feature data;
[0145] Step 204: Send the prediction result to the edge device;
[0146] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0147] When there is task data, the edge device uses the general network model and the configuration information of the task to extract features from the task data, and sends the extracted feature data and the configuration information of the task to the cloud device. The cloud device generates a prediction result for the task data based on the extracted feature data, and sends the prediction result to the edge device. In this embodiment, multiple edge devices share the general network model parameters and keep the parameters fixed, so that for different tasks, only the general network model needs to be deployed once on the edge device. When the task is updated, only the task network model of the cloud device needs to be updated, which is easy to manage, and the storage and computing costs of the edge device are low; and the edge device only needs to send the feature data to the cloud device, avoiding the direct transmission of the original data of the task, reducing the amount of data transmission, reducing transmission delay, and protecting user privacy.
[0148] In some embodiments, the configuration information includes:
[0149] Task number;
[0150] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0151] In some embodiments, the task data includes at least one of the following:
[0152] Images, text, video, audio, digital signals;
[0153] The task includes at least one of the following: image classification, object detection, and text prediction.
[0154] In some embodiments, the method further comprises:
[0155] Receiving original task data collected by the edge device, and constructing a data set using the original task data;
[0156] Using the data set to train a general network model;
[0157] Determine a model division point k of each task, use the model division point k as configuration information of the task, and construct a task network model according to the configuration information of the task;
[0158] The configuration information of the task and the general network model are sent to the edge device.
[0159] In some embodiments, determining the model partition point k of each task includes:
[0160] The training data corresponding to the task is input into the general network model, and the intermediate features are obtained layer by layer. The intermediate features obtained from each layer of the general network model are normalized, and the weighted sum of the statistical values of the partial intervals of the normalized brightness of the intermediate features is calculated layer by layer, and the calculation result is compared with the set threshold. If the calculation result is less than the threshold, the calculation is continued according to the intermediate features of the next layer; if the calculation result exceeds the threshold, the calculation is stopped and the current layer number k is recorded.
[0161] The technical solution of this embodiment can be used for OneNET (China Mobile Internet of Things Open Platform) edge IoT (Internet of Things). OneNET edge IoT supports running in edge cloud infrastructures ranging from embedded terminals to MEC (mobile edge computing), and can provide artificial intelligence, big data, IoT device management, industrial terminal protocol adaptation, video access, massive time series data storage and other functions at the edge. The security function installed on the camera realizes functions such as face recognition, pedestrian detection, and object detection. After using this technology, the models on the end side such as the camera can avoid frequent updates, which not only greatly reduces the latency and protects privacy, but also reduces the management and maintenance costs of the equipment, which is conducive to improving the mobile service quality and customer satisfaction.
[0162] The embodiment of the present invention also provides an edge computing device, which is executed by an edge device, such as Figure 7 As shown, including:
[0163] An acquisition module 31 is used to acquire task data;
[0164] A feature extraction module 32, used to extract features from the data of the task using a general network model and configuration information of the task;
[0165] A sending module 33, used to send the extracted feature data and the configuration information of the task to a cloud device;
[0166] A receiving module 34 is used to receive the prediction result of the data for the task returned by the cloud device;
[0167] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0168] In some embodiments, the configuration information includes:
[0169] Task number;
[0170] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0171] In some embodiments, the task data includes at least one of the following:
[0172] Images, text, video, audio, digital signals;
[0173] The task includes at least one of the following: image classification, object detection, and text prediction.
[0174] In some embodiments,
[0175] The sending module 33 is also used to collect original task data and send the collected original task data to the cloud device;
[0176] The receiving module 34 is further configured to receive the general network model and the configuration information returned by the cloud device.
[0177] The embodiment of the present invention also provides an edge computing device, which is executed by a cloud device, such as Figure 8 As shown, including:
[0178] A receiving module 41, configured to receive characteristic data of task data and configuration information of the task sent by at least one edge device;
[0179] A processing module 42, configured to determine a task network model corresponding to the task according to the configuration information of the task;
[0180] A prediction module 43, configured to generate a prediction result for the data of the task according to the feature data using the task network model;
[0181] A sending module 44, configured to send the prediction result to the edge device;
[0182] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0183] In some embodiments, the configuration information includes:
[0184] Task number;
[0185] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0186] In some embodiments, the task data includes at least one of the following:
[0187] Images, text, video, audio, digital signals;
[0188] The task includes at least one of the following: image classification, object detection, and text prediction.
[0189] In some embodiments,
[0190] The receiving module 41 is also used to receive the original task data collected by the edge device, and construct a data set using the original task data;
[0191] The processing module 42 is also used to train a general network model using the data set; determine a model division point k of each task, use the model division point k as configuration information of the task, and construct a task network model according to the configuration information of the task;
[0192] The sending module 44 is further configured to send the configuration information of the task and the general network model to the edge device.
[0193] In some embodiments, the processing module 42 is specifically used to input the training data corresponding to the task into the general network model, obtain intermediate features layer by layer, normalize the intermediate features obtained at each layer of the general network model, calculate the weighted sum of the statistical values of the partial intervals of the normalized brightness of the intermediate features layer by layer, and compare the calculation result with the set threshold value. If the calculation result is less than the threshold value, continue to calculate according to the intermediate features of the next layer; if the calculation result exceeds the threshold value, stop the calculation and record the current number of layers k.
[0194] An embodiment of the present invention provides an edge computing device, which is applied to edge devices, such as Fig. 9 As shown, it includes a memory 51, a processor 52, and a computer program stored in the memory 51 and executable on the processor 52; when the processor 52 executes the program, the edge computing method as described above is implemented.
[0195] In some embodiments, the processor 52 is used to obtain task data; extract features from the task data using a general network model and the task configuration information; send the extracted feature data and the task configuration information to a cloud device; receive a prediction result for the task data returned by the cloud device;
[0196] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0197] In some embodiments, the configuration information includes:
[0198] Task number;
[0199] The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
[0200] In some embodiments, the task data includes at least one of the following:
[0201] Images, text, video, audio, digital signals;
[0202] The task includes at least one of the following: image classification, object detection, and text prediction.
[0203] In some embodiments, the processor 52 is further configured to collect original task data, and send the collected original task data to a cloud device; and receive the general network model and the configuration information returned by the cloud device.
[0204] An embodiment of the present invention provides an edge computing device, which is applied to a cloud device, such as Fig.10 As shown, it includes a memory 61, a processor 62, and a computer program stored in the memory 61 and executable on the processor 62; when the processor 62 executes the program, the edge computing method as described above is implemented.
[0205] In some embodiments, the processor 62 is used to receive characteristic data of task data and configuration information of the task sent by at least one edge device; determine a task network model corresponding to the task according to the configuration information of the task; generate a prediction result for the data of the task according to the characteristic data using the task network model; and send the prediction result to the edge device;
[0206] Different edge devices share parameters of the general network model and keep the parameters fixed.
[0207] In some embodiments, the processor 62 is also used to receive the original task data collected by the edge device, and use the original task data to build a data set; use the data set to train a general network model; determine the model division point k of each task, use the model division point k as the configuration information of the task, and build a task network model according to the configuration information of the task; send the configuration information of the task and the general network model to the edge device.
[0208] In some embodiments, the processor 62 is also used to input the training data corresponding to the task into the general network model, obtain intermediate features layer by layer, normalize the intermediate features obtained at each layer of the general network model, calculate the weighted sum of the statistical values of the partial intervals of the normalized brightness of the intermediate features layer by layer, and compare the calculation result with the set threshold. If the calculation result is less than the threshold, continue to calculate according to the intermediate features of the next layer; if the calculation result exceeds the threshold, stop the calculation and record the current number of layers k.
[0209] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the above method are implemented.
[0210] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage terminal devices to be detected or any other non-transmission media that can be used to store information that can be accessed by the computer terminal device to be detected. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carriers.
[0211] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An edge computing method, characterized in that: Executed by edge devices, including: Get the task data; Extracting features from data of the task using a general network model and configuration information of the task; Sending the extracted feature data and configuration information of the task to a cloud device; Receiving a prediction result of the data for the task returned by the cloud device; Among them, different edge devices share the parameters of the general network model and keep the parameters fixed; the edge device side maintains a general network model suitable for multiple tasks, and the cloud device maintains the task network model of each task; The configuration information includes: Task number; The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
2. The edge computing method according to claim 1, characterized in that: The task data includes at least one of the following: Images, text, video, audio, digital signals; The task includes at least one of the following: image classification, object detection, and text prediction.
3. The edge computing method according to claim 1, characterized in that: Before extracting features from the task data using the general network model and the configuration information of the task, the method further includes: Collecting original task data, and sending the collected original task data to a cloud device; Receive the general network model and the configuration information returned by the cloud device.
4. An edge computing method, characterized in that: Executed by cloud devices, including: Receiving characteristic data of task data and configuration information of the task sent by at least one edge device; Determining a task network model corresponding to the task according to the configuration information of the task; Using the task network model to generate a prediction result for the data of the task according to the feature data; Sending the prediction result to the edge device; Among them, different edge devices share parameters of a general network model and keep the parameters fixed; the edge device side maintains a general network model suitable for multiple tasks, and the cloud device maintains a task network model for each task; The configuration information includes: Task number; The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
5. The edge computing method according to claim 4, characterized in that: The task data includes at least one of the following: Images, text, video, audio, digital signals; The task includes at least one of the following: image classification, object detection, and text prediction.
6. The edge computing method according to claim 4, characterized in that: The method further comprises: Receiving original task data collected by the edge device, and constructing a data set using the original task data; Using the data set to train a general network model; Determine a model division point k of each task, use the model division point k as configuration information of the task, and construct a task network model according to the configuration information of the task; The configuration information of the task and the general network model are sent to the edge device.
7. The edge computing method according to claim 6, characterized in that: The task model division point k determined for each task includes: The training data corresponding to the task is input into the general network model, and the intermediate features are obtained layer by layer. The intermediate features obtained from each layer of the general network model are normalized, and the weighted sum of the statistical values of the partial intervals of the normalized brightness of the intermediate features is calculated layer by layer, and the calculation result is compared with the set threshold. If the calculation result is less than the threshold, the calculation is continued according to the intermediate features of the next layer; if the calculation result exceeds the threshold, the calculation is stopped and the current layer number k is recorded.
8. An edge computing device, characterized in that: Applied to edge devices, including: The acquisition module is used to obtain task data; A feature extraction module, used to extract features from the data of the task using a general network model and the configuration information of the task; A sending module, used to send the extracted feature data and the configuration information of the task to a cloud device; A receiving module, used for receiving the prediction result of the data for the task returned by the cloud device; Among them, different edge devices share the parameters of the general network model and keep the parameters fixed; the edge device side maintains a general network model suitable for multiple tasks, and the cloud device maintains the task network model of each task; The configuration information includes: Task number; The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
9. An edge computing device, characterized in that: Applied to cloud devices, including: A receiving module, used to receive characteristic data of task data and configuration information of the task sent by at least one edge device; A processing module, used to determine a task network model corresponding to the task according to the configuration information of the task; A prediction module, used to generate a prediction result for the data of the task according to the feature data using the task network model; A sending module, used to send the prediction result to the edge device; Among them, different edge devices share parameters of a general network model and keep the parameters fixed; the edge device side maintains a general network model suitable for multiple tasks, and the cloud device maintains a task network model for each task; The configuration information includes: Task number; The model division point k of the task, k is the number of layers that need to be executed in the general network model for data processing of the task.
10. An edge computing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; characterized in that: When the processor executes the program, it implements the edge computing method as described in any one of claims 1-7.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the edge computing method as described in any one of claims 1 to 7 are implemented.
