WO2020125236A1 - 数据处理方法及装置、存储介质和电子装置 - Google Patents
数据处理方法及装置、存储介质和电子装置 Download PDFInfo
- Publication number
- WO2020125236A1 WO2020125236A1 PCT/CN2019/115082 CN2019115082W WO2020125236A1 WO 2020125236 A1 WO2020125236 A1 WO 2020125236A1 CN 2019115082 W CN2019115082 W CN 2019115082W WO 2020125236 A1 WO2020125236 A1 WO 2020125236A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- model
- processing
- sub
- data
- result
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0495—Quantised networks; Sparse networks; Compressed networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/09—Supervised learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/096—Transfer learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/04—Protocols for data compression, e.g. ROHC
Definitions
- This application relates to the field of computers, and specifically to data processing technology.
- AI processing models for example, face recognition models
- face recognition models usually use large neural networks for data processing, have high-precision recognition effects, and users are satisfied with the processing effects.
- the large neural network included in the artificial intelligence model has a large number of layers and nodes.
- the memory overhead and the calculation amount are huge. Due to resource constraints, it is very difficult to deploy the AI processing model in the mobile device.
- Model compression technology is usually used to compress the AI processing models.
- the calculation amount and memory overhead of the mobile terminal device are still very large and cannot be deployed and run.
- the AI processing model cannot be deployed in the mobile terminal device due to the limited model compression capability of the model compression technology.
- the embodiments of the present application provide a data processing method and device, a storage medium, and an electronic device, to at least solve the related art technology in which the AI processing model cannot be deployed in the mobile terminal device due to the limited model compression capability of the model compression technology problem.
- a data processing method including: performing first processing on data to be processed using a first sub-model corresponding to an AI processing model to obtain an intermediate processing result, where the AI processing model is used to treat Process the data and perform target processing to obtain the target processing result.
- the AI processing model corresponds to the first sub-model and the second sub-model.
- the first sub-model is generated based on the M neural network layers in the AI processing model.
- the second The sub-model is generated according to the K neural network layers in the AI processing model, M and K are positive integers greater than or equal to 1; the intermediate processing result is sent to the first server, where the first server is used to use the second sub-model The model performs a second process on the intermediate processing result to obtain the target processing result; and receives the target processing result returned by the first server.
- a data processing apparatus including: a processing unit, configured to perform first processing on data to be processed using a first sub-model corresponding to an AI processing model to obtain an intermediate processing result, where The AI processing model is used to perform target processing on the data to be processed to obtain the target processing result.
- the AI processing model corresponds to the first sub-model and the second sub-model.
- the first sub-model is based on the AI processing model M neural network layers are generated, and the second sub-model is generated according to K neural network layers in the AI processing model, M and K are positive integers greater than or equal to 1; a sending unit is used to send intermediate processing results To the first server, where the first server is used to perform the second processing on the intermediate processing result using the second sub-model to obtain the target processing result, the target processing includes the first processing and the second processing; the first receiving unit is used to receive The target processing result returned by the first server.
- a storage medium in which a computer program is stored, wherein the computer program is set to execute the above method when it is run.
- an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above through a computer program method.
- the first sub-model corresponding to the AI processing model is used to perform the first processing on the data to be processed to obtain an intermediate processing result, wherein the AI processing model corresponds to the first sub-model and the second sub-model, the first The sub-model is generated based on M neural network layers in the AI processing model.
- the second sub-model is generated based on K neural network layers in the AI processing model.
- M and K are positive integers greater than or equal to 1; the intermediate processing results are sent to A first server, wherein the first server is used to perform a second process on the intermediate processing result using the second sub-model to obtain a target processing result, and the target processing includes the first processing and the second processing; receiving the target processing result returned by the first server Because the first sub-model containing M neural network layers and the second sub-model containing K neural network layers in the AI processing model are deployed on different devices, the values of M and K can be set as needed, and flexible Set the scale of the first sub-model and the second sub-model, so as to control the calculation amount and memory overhead of each sub-model, and facilitate the deployment of the AI processing model in the mobile terminal device, to achieve the deployment of the AI processing model in the mobile terminal device The purpose is to achieve the technical effect of improving the user experience, and then solve the problem in the related art that due to the limited model compression capability of the model compression technology, the AI processing model cannot be deployed in the mobile terminal device.
- FIG. 1 is a schematic diagram of an application environment of a data processing method according to an embodiment of the present application
- FIG. 2 is a schematic flowchart of an optional data processing method according to an embodiment of the present application.
- FIG. 3 is a schematic diagram of an optional data processing method according to an embodiment of the present application.
- FIG. 4 is a schematic diagram of another optional data processing method according to an embodiment of the present application.
- FIG. 5 is a schematic diagram of yet another optional data processing method according to an embodiment of the present application.
- FIG. 6 is a schematic diagram of an optional picture object recognition result according to an embodiment of the present application.
- FIG. 7 is a schematic diagram of yet another optional data processing method according to an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of an optional data processing apparatus according to an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of an optional electronic device according to an embodiment of the present application.
- a data processing method is provided.
- the above data processing method may be applied to, but not limited to, the application environment shown in FIG. 1.
- the mobile terminal device 102 is connected to the server 106 through the network 104.
- a first sub-model generated according to the AI processing model is deployed in the mobile terminal device 102, and a second sub-model generated according to the AI processing model is deployed in the server 106, where the first sub-model corresponds to M pieces of the AI processing model
- the second sub-model corresponds to the K neural network layers of the AI processing model
- M and K are positive integers greater than or equal to 1.
- the mobile terminal device 102 After acquiring the data to be processed, the mobile terminal device 102 performs the first processing on the data to be processed using the first sub-model to obtain an intermediate processing result, and sends the intermediate processing result to the server 106 through the network 104.
- the server 106 After receiving the intermediate processing result, the server 106 performs second processing on the intermediate processing result using the second sub-model to obtain the target processing result of the data to be processed, and sends the obtained target processing result to the mobile terminal device 102 through the network 104.
- the mobile terminal device 102 receives the target processing result returned by the server 106.
- the mobile terminal device 102 may include, but is not limited to, at least one of the following: a mobile phone, a tablet computer, a notebook computer, a smart wearable device, and the like.
- the network 104 may include but is not limited to a wired network and a wireless network, wherein the wired network may include: a local area network, a metropolitan area network, and a wide area network, and the wireless network may include: Bluetooth, WIFI (Wireless Fidelity, wireless fidelity), a mobile network And other networks that realize wireless communication.
- the server 106 may include, but is not limited to, at least one of the following: a PC and other devices used to provide services. The above is just an example, and this embodiment does not make any limitation on this.
- the foregoing data processing method may include:
- Step S202 the first sub-model corresponding to the AI processing model is used to perform first processing on the data to be processed to obtain an intermediate processing result, wherein the AI processing model corresponds to the first sub-model and the second sub-model, and the first sub-model It is generated based on M neural network layers in the AI processing model, and the second sub-model is generated based on K neural network layers in the AI processing model, and M and K are positive integers greater than or equal to 1.
- Step S204 Send the intermediate processing result to the first server, where the first server is used to perform the second processing on the intermediate processing result using the second sub-model to obtain the target processing result, and the target processing includes the first processing and the second processing;
- Step S206 Receive the target processing result returned by the first server.
- the above data processing method can be applied to a process in which a mobile terminal device acquires data to be processed through a sensor (for example, a camera of a mobile terminal).
- a sensor for example, a camera of a mobile terminal.
- the following uses an application scenario of acquiring data to be processed through a camera of a mobile terminal as an example for description.
- the application installed in the mobile terminal invokes the camera of the mobile terminal to perform webcasting, and at the same time triggers the processing of the image data acquired through the camera using the first sub-model deployed in the mobile terminal (for example, Process specific targets in the image data, which may include but not limited to filter processing, face-lifting processing, big-eye processing, etc.), and transmit the processed intermediate data to the wireless network (eg, mobile network, WIFI network) to Cloud server, the cloud server uses the second sub-model deployed by it to perform subsequent processing on the intermediate data, and returns the obtained image data to the mobile terminal for display on the mobile terminal or transmission to other mobile terminals watching live broadcast for display .
- the wireless network eg, mobile network, WIFI network
- the operation of acquiring the data to be processed and the operation of the data to be processed may be real-time or non-real-time.
- the specific acquisition method is not limited in this embodiment.
- ResNet-101 residual Neural Network
- storage requirements exceeding 200MB
- floating-point multiplication time required to calculate each picture.
- devices such as mobile phones and FPGAs with only megabytes of resources, it is very difficult to deploy such a large model.
- R-CNN (Region-Convolutional Neural Network)
- SSD Single Shot Multibox Detector
- YOLO You Only Love One, based on The target detection model of convolutional neural network.
- the recognition accuracy of R-CNN decreases as the basic network model decreases.
- Table 1 shows the accuracy of different basic models of R-FCN (Region-base Fully Convolutional Network).
- the data acquired by the data acquisition sensor (sensor) of the mobile terminal equipment is getting larger and larger, such as mobile phone cameras, more and more high-definition, which brings large picture data and is transmitted to the cloud computing.
- the speed is slow and the traffic consumption is large. Therefore, users are reluctant to use high-precision DNN (Deep Neural Network, deep neural network) large models.
- DNN Deep Neural Network, deep neural network
- the relevant processing methods are: use model compression algorithm to compress the high-precision AI processing model as a whole, and compress the entire large model into a small model.
- the computational cost of the neural network is ultimately reduced.
- the above processing method is generally divided into two steps:
- Step 1 Train a neural network model with high recognition accuracy and high computational power on a GPGPU (General Purpose Computer on GPU) cluster with super computing power.
- GPGPU General Purpose Computer on GPU
- Step 2 On the basis of the high-precision large model, neural network compression technology (model compression technology), train a small model with low recognition accuracy and computation amount, and finally meet the computing power of the embedded device (mobile terminal device).
- model compression technology model compression technology
- Table 2 and Table 3 are the performance data of the related model compression technology.
- Table 2 shows the performance comparison results of the low-rank decomposition technology on the ILSVRC-2012 data set.
- Table 3 shows the migration/compression convolution filter in Performance comparison results on CIFAR-10 and CIFAR-100 datasets.
- the compression ratio (Compression Rate) is less than 5 times, for a high-precision large neural network, even if the compression is 5 times, the calculation amount and memory overhead for the mobile terminal The equipment is still very large and cannot be deployed.
- the deployment of related AI processing models on the mobile terminal will lose the accuracy of the final AI processing model recognition.
- the final compressed accuracy may not be accepted by users at all, and the experience is extremely poor.
- two sub-models are generated according to the AI processing model (AI processing model): a first sub-model and a second sub-model, and the first sub-model is deployed on the mobile device, and the second sub-model is deployed on the server ,
- AI processing model AI processing model
- the first sub-model is deployed on the mobile device
- the second sub-model is deployed on the server
- the mobile terminal device uses the first sub-model corresponding to the AI processing model to perform first processing on the data to be processed to obtain an intermediate processing result.
- the above-mentioned AI processing model is used to perform target processing on the data to be processed to obtain the target processing result.
- the data to be processed may be multimedia data to be processed, which may include but is not limited to: image data, video data, and voice data.
- the above target processing includes but is not limited to: image processing (image deblurring, image object recognition, image beautification, image rendering, text translation), voice processing (voice translation, voice denoising).
- the target processing results may include but are not limited to: image processing results (image deblurring results, object recognition results, image beautification results, image rendering results, text translation results), voice processing results (voice denoising) Results, voice translation results).
- the corresponding first sub-model and second sub-model can be generated according to the AI processing model.
- the first sub-model is generated based on the M neural network layers in the AI processing model
- the second sub-model is based on K of the AI processing model Neural network layer generation, where M and K are positive integers greater than or equal to 1.
- the first sub-model can be deployed on the mobile terminal device, and the second sub-model can be deployed on the first server (cloud server).
- the M neural network layers and the K neural network layers are network layers at different levels in the AI processing model.
- the above AI processing model corresponds to the first sub-model and the second sub-model.
- the so-called corresponding can be understood as the combination of the first sub-model and the second sub-model can realize the function of the AI processing model to achieve the same or similar processing effect .
- training data (which may be multimedia data, for example, image data, video data, voice data, etc.) may be used to train the initial AI processing model to obtain an AI processing model (high-precision AI processing model).
- AI processing model high-precision AI processing model
- the specific training process may be combined with related technologies, which will not be repeated in this embodiment.
- two computing segments can be split from the AI processing model, where the M neural network layers disassembled are the first computing segment and the K neural network layers disassembled are the second computing segment , Where N is greater than or equal to the sum of M and K.
- the first calculation section only includes a part of the neural network layer corresponding to the high-precision AI processing model, the calculation amount and memory overhead of the first calculation section can be controlled within the range that the mobile terminal device can bear. Therefore, the split first computing segment can be directly deployed in the mobile device as the first sub-model.
- a model compression algorithm for example, a distillation method
- a distillation method may be used to compress the neural network layer included in the first calculation section to obtain the first sub-model.
- the mobile terminal device before processing the data to be processed using the first sub-model corresponding to the AI processing model, receives the first sub-model sent by the second server, where the second server is used to M neural network layers are compressed to obtain the first sub-model, in which the target compression algorithm is used to compress the neural network.
- the second server may use the target compression algorithm (model compression algorithm) for compressing the neural network to compress the M neural network layers included in the first calculation section to obtain the first sub-model.
- the K neural network layers included in the second calculation segment are used as the second sub-model.
- the calculation amount and memory overhead of the first calculation segment can be further reduced, and at the same time, the amount of data transmitted to the first server during use can be reduced, and the resource consumption of mobile devices can be reduced and improved. user experience.
- the second sub-model is used to compensate the processing accuracy lost due to the compression of the first sub-model containing M neural network layers relative to the AI processing model.
- the neural network layer included in the second calculation section After compressing the first calculation section, in order to ensure the accuracy of the entire AI processing model, the neural network layer included in the second calculation section can be trained, and the parameter information of the neural network layer included in the second calculation section can be adjusted. To compensate for the loss of accuracy caused by model compression on the first calculation section.
- the second server may use the target compression algorithm to compress the M neural network layers to obtain the first sub-model; obtain the first The sub-model performs the first processing on the training object to obtain the first processing result; trains the K neural network layers to obtain the second sub-model, where the input of the K neural network layers is the first processing result, and the training constraints
- the difference between the processing accuracy of the output result of the second sub-model and the second processing result is less than or equal to the target threshold, where the second processing result is the training using the AI processing model (the AI processing model without model compression).
- the processing result of the object processing is less than or equal to the target threshold, where the second processing result is the training using the AI processing model (the AI processing model without model compression).
- the output of the first sub-model can be used as the input of the second calculation section, combined with the AI processing model (without model compression) processing results of the training data, use
- the model training algorithm trains a network recognition layer (second sub-model) that does not lose the final accuracy for the neural network layer included in the second calculation section.
- the first sub-model can be deployed to the mobile terminal device, and the second sub-model can be deployed to the first server (cloud processor).
- the mobile device in order to directly deploy a high-precision R-FCN large model (the basic model of which uses ResNet-101) in the mobile terminal design, as shown in Figure 4, it is split into two segments, and the cloud segment computing part (second Computing section) and the mobile computing section (the first computing section), the mobile device only deploys the compressed first 3 layers of the network, and the networks other than the first 3 layers are deployed in the cloud (in this case, N is equal to the sum of M and K ).
- Figure 5 shows a method for training the compression layer of the network, which can be distilled based on this loss function, which is closest to the output of the first three layers of the original ResNet-101.
- the cloud computing part you can use the output of the compressed network as an input, and use the method of transfer learning to train a network recognition layer (second sub-model) that does not lose the final accuracy, and deploy it to the cloud (for example, the first server).
- a network recognition layer for example, the first server
- the mobile device After deploying the first sub-model to the mobile device, the mobile device can obtain the data to be processed.
- the data to be processed may be real-time data or non-real-time data.
- the method of obtaining the data to be processed may be There are many.
- the data to be processed may be received by the mobile terminal device from other devices (other mobile terminal devices, terminal devices, server devices, etc.).
- the data to be processed may be acquired by the mobile terminal device through its own data collection component.
- the above data collection component may be, but not limited to: a sensor (for example, a camera), a microphone, and the like.
- the data to be processed is acquired through the target sensor of the mobile terminal device.
- the mobile terminal device may perform the first processing on the data to be processed using the first sub-model to obtain an intermediate processing result.
- AI processing models For different types of data to be processed, different AI processing models can be used for processing. For the same data to be processed, one or more AI processing models can be used for processing.
- the AI processing model is an AI recognition model, which is used to recognize the target object contained in the image to be processed, and the first processing performed by the first sub-model is the first recognition processing .
- Performing the first processing on the data to be processed using the first sub-model corresponding to the AI processing model to obtain the intermediate processing result may include: performing the first recognition processing on the image to be processed using the first sub-model to obtain the intermediate recognition result.
- the AI processing model is an AI deblurring model, which is used to deblur the image to be processed to obtain the processing result of the deblurring result.
- One process is the first deblurring process.
- Performing the first processing on the data to be processed using the first sub-model corresponding to the AI processing model to obtain the intermediate processing result may include: performing the first deblurring processing on the image to be processed using the first sub-model to obtain the intermediate deblurring result.
- the AI processing model is an AI translation model, which is used to convert the data contained in the data to be translated
- the first language data using the first language is translated into second language data using the second language, and the first processing performed by the first sub-model is the first translation processing.
- Performing the first processing on the data to be processed using the first sub-model corresponding to the AI processing model to obtain the intermediate processing result may include: performing the first translation processing on the translated data using the first sub-model to obtain the intermediate translation result.
- step S204 the intermediate processing result is sent to the first server.
- the sending may be performed through the mobile network of the mobile terminal device, or may be performed by the mobile terminal device through another wireless network. Since the processing result (calculation result) of the first sub-network is sent, the data size is generally much smaller than the size of the original data to be processed, and user privacy is also guaranteed.
- the first server may use the deployed second sub-model to perform second processing on the intermediate processing result to obtain the target processing result.
- a second sub-model corresponding to different AI processing models may be used to process the intermediate processing results.
- one or more second sub-models corresponding to the AI processing model may be used to process the intermediate processing result.
- the second process is a second recognition process
- the target recognition result is used to indicate the target object in the image to be processed.
- the first server uses the second sub-model to perform a second recognition process on the intermediate recognition result, and obtains the recognition result of the target object in the image to be processed.
- the second process is a second deblurring process
- the target recognition result is used to indicate the deblurring result of the image to be processed.
- the first server uses the second sub-model to perform a second deblurring process on the intermediate deblurring result to obtain the target deblurring result in the image to be processed.
- the second process is a second translation process
- the target recognition result is a target translation result containing the second language data
- the first server uses the second sub-model to perform a second translation process on the intermediate translation result to obtain the target translation result containing the second language data.
- the first server After obtaining the target processing result, the first server sends the target translation result to the mobile terminal device.
- the mobile terminal device receives the target processing result returned by the first server.
- the mobile terminal device may display the target recognition result (to-be-processed image) on the mobile terminal device, or play the target recognition result (to-be-processed voice data, for example, to-be-translated data) .
- the high-precision AI processing model can be applied to video products for AI processing of video products, which may include but not limited to: AI automatic deblurring, AI image automatic recognition, etc.
- AI automatic picture recognition technology For example, AI automatic picture recognition technology.
- Commonly used high-precision large models include: R-CNN, SSD and YOLO, etc. The recognition effect is shown in Figure 6.
- the object recognition method in this example adopts the method of calculating the AI processing model in sections, and generates two corresponding computing parts according to the high-precision AI processing model: the mobile computing part and the cloud computing part.
- the mobile computing part corresponds to the first m-layer neural network layer (for example, the first three layers) of the AI processing model and is deployed in the mobile terminal (mobile terminal devices, embedded devices, such as mobile phones, etc.).
- the cloud computing part corresponds to the remaining part of the AI processing model (other neural network layers than the previous m-layer neural network layer) and is deployed in the cloud (cloud cluster, cloud computing center, cloud server).
- the mobile device When performing sensor data processing, on the mobile device, perform calculations through the mobile computing section to obtain intermediate results, and connect the mobile and cloud networks (eg, mobile networks, wireless networks, etc.) to obtain the intermediate results Send to the cloud.
- the cloud receives the intermediate results sent by the mobile terminal, uses the AI to process the remaining part of the relay calculation, and sends the final processing results to the mobile terminal.
- the calculation amount and memory overhead of the mobile terminal can be reduced, and the feasibility of deploying a high-precision AI processing model on the mobile terminal is ensured.
- using the intermediate result of the mobile computing part as the input of the cloud computing part can reduce the data traffic on the mobile side while protecting user privacy, thereby improving the user experience.
- the computing part corresponding to the AI processing model can be locally compressed: the mobile terminal computing part is subjected to model compression as a local high compression ratio part (high compression ratio calculation section, that is, a high compression ratio neural network layer), and The cloud computing part is not compressed, as other uncompressed parts (high-precision computing section, that is, high-precision neural network layer).
- high compression ratio calculation section that is, a high compression ratio neural network layer
- high-precision computing section that is, high-precision neural network layer
- a network intermediate result (the output result of the high compression ratio neural network layer) that is similar to the first layer or the previous layers of the original network is obtained. ), and send the intermediate results to the cloud by connecting the mobile and cloud networks.
- the cloud receives the intermediate result of the mobile terminal, uses the remaining calculation part of the relay calculation, and sends the final recognition result to the mobile terminal.
- the network layer described by the neural network layer with high compression ratio is simple, it can greatly compress the amount of calculation, and the loss of information is much less than that of the entire network. Moreover, through the calculation of the neural network layer with high compression ratio, an output result similar to the first layer or the first few layers of the original network can be obtained, and the data size of the above output result is generally much smaller than the size of the original sensor data (also less than the uncompressed When the mobile terminal calculates the data size of the output result), it can reduce the final amount of transmitted data. At the same time, through the calculation of other uncompressed parts, the original recognition accuracy when using the AI processing model can be maintained or as much as possible, thereby improving the user experience.
- the object recognition method in this example includes the following steps:
- Step 1 Deploy AI processing models on mobile and cloud.
- the AI processing model Before using the AI processing model for processing, the AI processing model can be trained to obtain the mobile computing part and the cloud computing part, and the mobile computing part is deployed to the mobile terminal, and the cloud computing part is deployed to the cloud.
- the original model can be trained to obtain a high-precision A processing I model.
- the intermediate data of the obtained high-precision AI processing model can be used as a label, and the first algorithm (for example, distillation) used to compress the model can be used to process the AI processing.
- the first n layers of the model (for example, the first three layers) neural network layer is trained and compressed to obtain the mobile computing part; the output of the mobile computing part can be used as an input, and the intermediate data and/or final data of the model can be processed with high-precision AI
- a second algorithm for example, transfer learning
- transfer learning is used to train other neural network layers in the AI processing model except the first n layers (for example, the first three layers) to obtain a cloud computing part.
- the above-mentioned partial compression method of the AI processing model can be applied to the deployment of all mobile terminal AI processing models.
- the basic model of this model uses ResNet-101.
- two computing parts are generated according to ResNet-101: mobile computing part and cloud computing part.
- this part can be a compressed network. You can use the intermediate data of the high-precision AI processing model as a label, and use the distillation method to guide the training of the first three neural network layers of the compressed AI processing model to obtain a high compression ratio neural network layer (mobile terminal computing part), which is finally deployed to mobile end.
- Figure 5 shows one way to train the compression layer of the network. Based on the loss function shown in Fig. 5, the output results of the first three layers closest to the original ResNet-101 can be distilled out.
- this part can be a high-precision network.
- You can use the transfer learning method (transfer learning) to train the neural network layer other than the first three neural network layers in the AI processing model to obtain the cloud computing part.
- the input of the high-precision network is the output of the compressed network.
- the training process can refer to the output of the high-precision AI processing model (intermediate data and/or final data) to obtain a network recognition layer that does not lose or minimize the final accuracy.
- the output of the neural network layer with high compression ratio is used as the input of the remaining submodules of the high-precision model, and the submodel is trained again to ensure that the model adapts to the compressed input changes to achieve the accuracy of the original AI processing model.
- the above training process may be executed by a specific device (target device) or a specific server, or may be executed by the cloud.
- the compression network and the high-precision network training are completed, they can be sent to the mobile terminal and the cloud through the obtained compression network and the high-precision network for network deployment, respectively.
- Step 2 Obtain sensor data through the sensor of the mobile device.
- the mobile device can obtain sensor data through the sensors of the mobile device.
- the above sensor data may be any data acquired by the sensor, and may include but not limited to: voice data, image data, or other data.
- step 3 the intermediate result is calculated through the high-compression ratio neural network of the mobile terminal device, and the intermediate result is sent to the cloud computing center.
- the mobile computing part (a neural network with high compression ratio) of the AI processing model is used to calculate the sensor data to obtain intermediate results, and the intermediate results are sent to the cloud computing center through the network.
- Step 4 Obtain the final recognition result through the high-precision neural network calculation of the cloud computing center, and send the final recognition result to the mobile terminal device.
- the high-precision AI processing model is calculated in sections, and the corresponding high compression ratio calculation section and high-precision calculation section are generated according to the AI processing model, and the mobile terminal and the cloud are deployed respectively. Computation tasks with the same performance as the high-precision AI processing model. Further, the local compression of the AI processing model is adopted, and the neural network with high compression ratio is used to replace the first layer or several layers of the high-precision AI processing model.
- the network (rather than the entire model network), completes the calculation of the first layer or the previous layers, instead of reducing the calculation at the expense of accuracy, as with other full-network compression methods.
- the terminal-side device uses the first sub-model corresponding to the AI processing model to perform the first processing on the data to be processed to obtain an intermediate processing result, where the AI processing model is used to perform target processing on the data to be processed to obtain Target processing results, the AI processing model corresponds to the first sub-model and the second sub-model, the first sub-model corresponds to M neural network layers in the AI processing model, and the second sub-model corresponds to K in the AI processing model Neural network layer, M and K are positive integers greater than or equal to 1; send the intermediate processing result to the first server, where the first server is used to perform the second processing on the intermediate processing result using the second sub-model to obtain the target processing
- the target processing includes the first processing and the second processing; receiving the target processing result returned by the first server, which solves the problem that the AI processing model cannot be deployed in the mobile device due to the limited model compression capability of the model compression technology in the related art The problem has reached the effect of improving the user experience.
- the above method before processing the data to be processed using the first sub-model corresponding to the AI processing model, the above method further includes:
- the second sub-model is used to compensate the processing accuracy lost by the AI processing model due to compression of the M neural network layers.
- the above method further includes:
- the second server uses the target compression algorithm to compress the M neural network layers to obtain the first sub-model
- the second server obtains the first processing result obtained by performing the first processing on the training object by the first sub-model
- the second server trains the K neural network layers to obtain a second sub-model.
- the input of the K neural network layers is the first processing result
- the training constraints are: the output result of the second sub-model and the second sub-model
- the difference in processing accuracy of the second processing result is less than or equal to the target threshold, where the second processing result is a processing result obtained by processing the training object using the AI processing model.
- the target compression algorithm is used to compress the M neural network layers to obtain the first sub-model, which can reduce the calculation amount and memory overhead of the first sub-model, and the intermediate processing result sent by the mobile device to the first server
- the amount of data contained improves the user experience.
- the second sub-model compensates for the accuracy loss caused by the compression of the first sub-model, improves the processing accuracy of the data to be processed, and thereby improves the user experience.
- Performing the first processing on the data to be processed using the first sub-model corresponding to the AI processing model to obtain the intermediate processing result includes: performing the first recognition processing on the image to be processed using the first sub-model to obtain the intermediate processing result, where the data to be processed is For the image to be processed, the first processing is the first recognition process, the image to be processed contains the target object, and the AI processing model is used to identify the target object in the image to be processed;
- Receiving the target processing result returned by the first server includes: receiving the target recognition result returned by the first server, where the target processing result is a target recognition result, and the target recognition result is performed by the first server using the second sub-model on the intermediate recognition result.
- the recognition processing results in that the second processing is the second recognition processing, and the target recognition result is used to indicate the target object in the image to be processed.
- the first sub-model corresponding to the AI processing model performs the first processing on the data to be processed, and obtaining the intermediate processing result includes: performing the first deblurring processing on the image to be processed using the first sub-model to obtain the intermediate processing result, wherein the data to be processed For the image to be processed, the first processing is the first deblurring processing, and the AI processing model is used to perform the deblurring operation on the image to be processed to obtain the target deblurring result;
- Receiving the target processing result returned by the first server includes receiving the target deblurring result returned by the first server, where the target processing result is the target deblurring result, and the target deblurring result is deblurred by the first server using the second sub-model As a result, the second deblurring process is performed, and the second process is the second deblurring process.
- Using the first sub-model corresponding to the AI processing model to perform the first processing on the data to be processed and obtaining the intermediate processing result includes: performing the first translation processing on the translated data using the first sub-model to obtain the intermediate translation result, where the data to be processed is For the data to be translated, the first processing is the first translation processing, and the AI processing model is used to translate the first language data in the first language contained in the data to be translated into second language data in the second language;
- Receiving the target processing result returned by the first server includes: receiving the target translation result returned by the first server, where the target processing result is the target translation result, and the target translation result is performed by the first server using the second sub-model on the intermediate translation result.
- the translation process is obtained, the second process is the second translation process, and the target translation result includes the second language data.
- one or more different processes are performed on different types of data to be processed to meet different needs of users, improve the ability of terminal service processing, and improve users Experience.
- the above method before performing the first processing on the data to be processed using the first sub-model corresponding to the AI processing model, the above method further includes:
- the target sensor of the mobile terminal device obtains the data to be processed, which can realize the real-time processing of the data to be processed, adapt to different application requirements, and improve the user experience.
- FIG. 8 is a schematic diagram of an optional data processing apparatus according to an embodiment of the present application. As shown in FIG. 8, the apparatus may include:
- the processing unit 82 is used to perform the first processing on the data to be processed using the first sub-model corresponding to the AI processing model to obtain an intermediate processing result, where the AI processing model is used to perform the target processing on the data to be processed to obtain the target processing
- the AI processing model corresponds to the first sub-model and the second sub-model.
- the first sub-model is generated based on M neural network layers in the AI processing model
- the second sub-model is based on K neural network layers in the AI processing model.
- M and K are positive integers greater than or equal to 1;
- the sending unit 84 is configured to send the intermediate processing result to the first server, where the first server is used to perform the second processing on the intermediate processing result using the second sub-model to obtain the target processing result.
- the target processing includes the first Processing and second processing;
- the first receiving unit 86 is configured to receive the target processing result returned by the first server.
- the foregoing data processing apparatus may be, but not limited to, applied to a process in which a mobile terminal device acquires data to be processed through a sensor (for example, a camera of a mobile terminal).
- a sensor for example, a camera of a mobile terminal
- processing unit 82 in this embodiment may be used to perform step S202 in the embodiment of the present application
- sending unit 84 in this embodiment may be used to perform step S204 in the embodiment of the present application
- the first receiving unit 86 in may be used to execute step S206 in the embodiment of the present application.
- the terminal-side device uses the first sub-model corresponding to the AI processing model to perform the first processing on the processed data to obtain an intermediate processing result, where the AI processing model is used to perform target processing on the processed data to obtain Target processing results.
- the AI processing model corresponds to the first sub-model and the second sub-model.
- the first sub-model is generated based on M neural network layers in the AI processing model
- the second sub-model is based on K nerves in the AI processing model.
- M and K are positive integers greater than or equal to 1; send the intermediate processing results to the first server, where the first server is used to perform the second processing on the intermediate processing results using the second sub-model to obtain the target processing
- the target processing includes the first processing and the second processing; receiving the target processing result returned by the first server, which solves the problem that the AI processing model cannot be deployed in the mobile device due to the limited model compression capability of the model compression technology in the related art The problem has reached the effect of improving the user experience.
- the above device further includes:
- the second receiving unit is used to receive the first sub-model sent by the second server before processing the data to be processed using the first sub-model corresponding to the AI processing model, where the second server is used to target M
- the neural network layer is compressed to obtain the first sub-model, in which the target compression algorithm is used to compress the neural network.
- the target compression algorithm is used to compress the M neural network layers to obtain the first sub-model, which can reduce the calculation amount and memory overhead of the first sub-model, and the intermediate processing result sent by the mobile device to the first server The amount of data contained improves the user experience.
- the processing unit 82 includes a processing module
- the first receiving unit 86 includes a receiving module
- the receiving module is used to receive the target recognition result returned by the first server, where the target processing result is the target recognition result, and the target recognition result is obtained by the first server performing the second recognition process on the intermediate recognition result using the second sub-model
- the second process is a second recognition process, and the target recognition result is used to indicate the target object in the image to be processed.
- the foregoing processing unit 82 includes: a first processing module, and the first receiving unit 86 includes, a first receiving module, wherein,
- the first processing module is used to perform a first deblurring process on the image to be processed using the first sub-model to obtain an intermediate deblurring result, where the data to be processed is the image to be processed and the first processing is the first deblurring process , AI processing model is used to perform the deblurring operation on the image to be processed to obtain the target deblurring result;
- the first receiving module is used to receive the target deblurring result returned by the first server, wherein the target processing result is the target deblurring result, and the target deblurring result is used by the first server to use the second sub-model for the intermediate deblurring result It is obtained by performing the second deblurring process, and the second process is the second deblurring process.
- the foregoing processing unit 82 includes: a second processing module, and the first receiving unit 86 includes, a second receiving module, wherein,
- the second processing module is used to perform the first translation process on the translated data using the first sub-model to obtain an intermediate translation result, where the data to be processed is the data to be translated, the first processing is the first translation processing, and the AI processing
- the model is used to translate the first language data in the first language contained in the data to be translated into second language data in the second language;
- the second receiving module is used to receive the target translation result returned by the first server, wherein the target processing result is the target translation result, and the target translation result is used by the first server to perform the second translation on the intermediate translation result using the second sub-model
- the processing is obtained, the second processing is the second translation processing, and the target translation result includes the second language data.
- one or more different processes are performed on different types of data to be processed to meet different needs of users, improve the ability of terminal service processing, and improve users Experience.
- the above device further includes:
- the acquiring unit is configured to acquire the data to be processed through the target sensor of the mobile terminal device before performing the first processing on the data to be processed using the first sub-model corresponding to the AI processing model.
- the target sensor of the mobile terminal device obtains the data to be processed, which can realize the real-time processing of the data to be processed, adapt to different application requirements, and improve the user experience.
- a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the above method embodiments during runtime.
- the above storage medium may be set to store a computer program for performing the following steps:
- the AI processing model is used to perform target processing on the data to be processed to obtain the target processing result.
- the AI processing model and the first One sub-model corresponds to the second sub-model.
- the first sub-model is generated based on M neural network layers in the AI processing model, and the second sub-model is generated based on K neural network layers in the AI processing model.
- M and K are greater than Or a positive integer equal to 1;
- S2 Send the intermediate processing result to the first server, where the first server is used to perform the second processing on the intermediate processing result using the second sub-model to obtain the target processing result, and the target processing includes the first processing and the second processing;
- the storage medium may include: a flash disk, a read-only memory (Read-Only Memory, ROM for short), a random access device (Random Access Memory, RAM for short), a magnetic disk, or an optical disk.
- an electronic device for implementing the above data processing method.
- the electronic device includes: a processor 902, a memory 904, a data bus 906, and a transmission device 908 and so on.
- the above components can be connected through a data bus 906 or other lines for data transmission.
- a computer program is stored in the memory, and the processor is configured to execute the steps in any one of the foregoing method embodiments through the computer program.
- the above-mentioned electronic device may be located in at least one network device among multiple network devices of the computer network.
- the above processor may be configured to perform the following steps through a computer program:
- the AI processing model is used to perform target processing on the data to be processed to obtain the target processing result.
- the AI processing model and the first One sub-model corresponds to the second sub-model.
- the first sub-model is generated based on M neural network layers in the AI processing model, and the second sub-model is generated based on K neural network layers in the AI processing model.
- M and K are greater than Or a positive integer equal to 1;
- S2 Send the intermediate processing result to the first server, where the first server is used to perform the second processing on the intermediate processing result using the second sub-model to obtain the target processing result, and the target processing includes the first processing and the second processing;
- the structure shown in FIG. 9 is merely an illustration, and the electronic device may also be a smart device, a smart phone (such as an Android phone, an ios phone, etc.), a tablet computer, a palmtop computer, and mobile Internet Devices (Mobile Internet Devices, MID for short), PAD and other terminal devices.
- FIG. 9 does not limit the structure of the above electronic device.
- the electronic device may further include more or fewer components than those shown in FIG. 9 (such as a network interface, etc.), or have a configuration different from that shown in FIG. 9.
- the memory 904 may be used to store software programs and modules, such as program instructions/modules corresponding to the data processing method and apparatus in the embodiments of the present application, and the processor 902 executes each program by running the software programs and modules stored in the memory 904 A variety of functional applications and data processing, that is, the method of transmitting the above-mentioned signature information.
- the memory 904 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
- the memory 904 may further include memories remotely provided with respect to the processor 902, and these remote memories may be connected to the terminal through a network. Examples of the aforementioned network include, but are not limited to, the Internet, intranet, local area network, mobile communication network, and combinations thereof.
- the transmission device 908 described above is used to receive or send data via a network.
- the aforementioned network may include a wired network and a wireless network.
- the transmission device 908 includes a network adapter (Network Interface Controller, referred to as NIC for short), which can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network.
- the transmission device 908 is a radio frequency (RadioFrequency, RF for short) module or Bluetooth, which is used to communicate with the Internet in a wireless manner.
- the integrated unit in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in the computer-readable storage medium.
- the technical solution of the present application may essentially be a part that contributes to the existing technology or all or part of the technical solution may be embodied in the form of a software product, and the computer software product is stored in a storage medium.
- Several instructions are included to enable one or more computer devices (which may be personal computers, servers, network devices, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
- the disclosed client may be implemented in other ways.
- the device embodiments described above are only schematic.
- the division of the unit is only a logical function division.
- there may be other division methods for example, multiple units or components may be combined or may Integration into another system, or some features can be ignored, or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, units or modules, and may be in electrical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be 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.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or software function unit.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Data Mining & Analysis (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Molecular Biology (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Neurology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Image Analysis (AREA)
Abstract
本申请公开了一种数据处理方法及装置、存储介质和电子装置。其中,该方法包括:使用AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型与所述第一子模型和第二子模型相对应,第一子模型根据所述AI处理模型中的M个神经网络层生成,第二子模型根据所述AI处理模型中的K个神经网络层,M、K为大于或者等于1的整数;将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果;接收第一服务器返回的目标处理结果。
Description
本申请要求于2018年12月17日提交中国专利局、申请号为CN201811545184.4、发明名称为“数据处理方法及装置、存储介质和电子装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及计算机领域,具体而言,涉及数据处理技术。
目前,随着移动端设备(例如,手机,智能可穿戴设备)的流行,使得人工智能AI(Artificial Intelligence,人工智能)模型(例如,深度学习模型)在资源(内存、CPU、能耗和带宽等)有限的便携式设备上部署变得越来越重要。
AI处理模型(例如,人脸识别模型)通常采用大型神经网络进行数据处理,拥有高精度的识别效果,用户对处理效果体验满意。但是,人工智能模型包含的大型神经网络具有大量的层级与结点,内存开销和计算量巨大,受资源的限制,在移动端设备中部署AI处理模型非常困难。
目前,为了在移动端设备中能够部署AI处理模型,考虑如何减少它们所需要的内存与计算量就非常重要,通常采用模型压缩技术对AI处理模型进行模型压缩。然而,对于高精度的大神经网络,使用当前的模型压缩技术之后,其计算量和内存开销对于移动端设备依然很大,无法部署运行。也就是说,相关技术中存在由于模型压缩技术的模型压缩能力有限导致无法在移动端设备中部署AI处理模型的问题。
发明内容
本申请实施例中提供了一种数据处理方法及装置、存储介质和电子装置,以至少解决相关技术中存在由于模型压缩技术的模型压缩能力有限导致无法在移动端设备中部署AI处理模型的技术问题。
根据本申请实施例的一个方面,提供了一种数据处理方法,包括:使用AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型用于对待处理数据执行目标处理,得到目标处理结果,AI处理模型与所述第一子模型和第二子模型相对应,第一子模型根据所述AI处理模型中的M个神经网络层生成,第二子模型根据所述AI处理模型中的K个神经网络层生成,M、K为大于或者等于1的正整数;将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果;接收第一服务器返回的目标处理结果。
根据本申请实施例的另一方面,还提供了一种数据处理装置,包括:处理单元,用于使用AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型用于对待处理数据执行目标处理,得到目标处理结果,AI处理模型与所述第一子模型和第二子模型相对应,所述 第一子模型根据所述AI处理模型中的M个神经网络层生成,所述第二子模型根据所述AI处理模型中的K个神经网络层生成,M、K为大于或者等于1的正整数;发送单元,用于将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果,目标处理包括第一处理和第二处理;第一接收单元,用于接收第一服务器返回的目标处理结果。
根据本申请实施例的又一方面,还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述方法。
根据本申请实施例的又一方面,还提供了一种电子装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,上述处理器通过计算机程序执行上述的方法。
在本申请实施例中,使用AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型与第一子模型和第二子模型相对应,第一子模型根据AI处理模型中的M个神经网络层生成,第二子模型根据AI处理模型中的K个神经网络层生成,M、K为大于或者等于1的正整数;将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果,目标处理包括第一处理和第二处理;接收第一服务器返回的目标处理结果,由于将AI处理模型中的包含M个神经网络层的第一子模型和包含K个神经网络层的第二子模型部署到不同的设备上,可以根据需要设定M、K的值,灵活设置第一子模型和第二子模型的规模,从而控制各子模型的计算量和内存开销,方便在移动端设备中进行AI处理模型的部署,达到了在移动端设备中部署AI处理模型的目的,从而实现了提高用户体验的技术效果,进而解决了相关技术中存在由于模型压缩技术的模型压缩能力有限导致无法在移动端设备中部署AI处理模型的问题。
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是根据本申请实施例的一种数据处理方法的应用环境的示意图;
图2是根据本申请实施例的一种可选的数据处理方法的流程示意图;
图3是根据本申请实施例的一种可选的数据处理方法的示意图;
图4是根据本申请实施例的另一种可选的数据处理方法的示意图;
图5是根据本申请实施例的又一种可选的数据处理方法的示意图;
图6是根据本申请实施例的一种可选的图片对象识别结果的示意图;
图7是根据本申请实施例的又一种可选的数据处理方法的示意图;
图8是根据本申请实施例的一种可选的数据处理装置的结构示意图;以及
图9是根据本申请实施例的一种可选的电子装置的结构示意图。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
根据本申请实施例的一个方面,提供了一种数据处理方法,可选地,上述数据处理方法可以但不限于应用于如图1所示的应用环境中。移动端设备102通过网络104与服务器106相连。在移动端设备102中部署有根据AI处理模型生成的第一子模型,在服务器106中部署有根据AI处理模型生成的第二子模型,其中,第一子模型对应于AI处理模型的M个神经网络层,第二子模型对应于AI处理模型的K个神经网络层,M、K均为大于或者等于1的正整数。
移动端设备102获取到待处理数据之后,使用第一子模型对待处理数据执行第一处理,得到中间处理结果,并将中间处理结果通过网络104发送给服务器106。
服务器106接收到中间处理结果之后,使用第二子模型对中间处理结果进行第二处理,得到待处理数据的目标处理结果,并将得到的目标处理结果通过网络104发送给移动端设备102。
移动端设备102接收服务器106返回的目标处理结果。
可选地,在本实施例中,上述移动端设备102可以包括但不限于以下至少之一:手机、平板电脑、笔记本电脑、智能可穿戴设备等。上述网络104可以包括但不限于有线网络和无线网络,其中,上述有线网络可以包括:局域网、城域网和广域网,上述无线网络可以包括:蓝牙、WIFI(Wireless Fidelity,无线保真)、移动网络及其他实现无线通信的网络。上述服务器106可以包括但不限于以下至少之一:PC机及其他用于提供服务的设备。上述只是一种示例,本实施例对此不做任何限定。
可选地,作为一种可选的实施方式,如图2所示,上述数据处理方法可以包括:
步骤S202,使用AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型与所述第一子模型和第二子模型 相对应,第一子模型根据AI处理模型中的M个神经网络层生成,第二子模型根据AI处理模型中的K个神经网络层生成,M、K为大于或者等于1的正整数。
步骤S204,将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果,目标处理包括第一处理和第二处理;
步骤S206,接收第一服务器返回的目标处理结果。
上述数据处理方法可以应用于移动端设备通过传感器(例如,移动终端的摄像头)获取待处理数据的过程中。下面以通过移动终端的摄像头获取待处理数据的应用场景为例进行说明。
移动终端中安装的应用(例如,网络直播应用)调用移动终端的摄像头进行网络直播,调用摄像头的同时触发使用移动终端中部署的第一子模型对通过摄像头获取到的图像数据进行处理(例如,对图像数据中的特定目标进行处理,可以包括但不限于滤镜处理、瘦脸处理、大眼处理等),并将处理后得到的中间数据通过无线网络(例如,移动网络、WIFI网络)传输到云端服务器,由云端服务器使用其部署的第二子模型对中间数据进行后续处理,并将得到的图像数据返回给移动终端,在移动终端上进行显示,或者传输给观看直播的其他移动终端进行显示。
获取待处理数据的操作以及对待处理数据的操作可以是实时的,也可以是非实时的。具体的获取方式,本实施例中对此不作限定。
目前,高效的深度学习方法可以显著地影响分布式系统、嵌入式设备和用于人工智能的FPGA(FPGA Field Programmable Gate Array,现场可编程门阵列)等。例如,ResNet-101(Residual Neural Network,残差神经网络)具有101层卷积网络、超过200MB的储存需求和计算每一张图片所需要的浮点数乘法时间。对于只有兆字节资源的手机和FPGA等设备,部署这种大模型就非常困难。
常用的高精度大模型包括:R-CNN(Region-Convolutional Neural Network,区域卷积神经网络),SSD(Single Shot Multibox Detector,单发多盒探测器)和YOLO(You Only Love One,一种基于卷积神经网络的目标检测模型)。R-CNN的识别精度随这基础网络模型的减小,而下降。如表1所示,表1示出了R-FCN(Region-base Fully Convolutional Network,基于区域的全卷积网络)的不同基础模型的精度。
表1
然而,这些高精度的大模型(即使最小的基础网络模型ResNet50),在移动端设备中根本无法部署。
移动端设备的数据采集sensor(传感器)获取的数据越来越大,比如手机摄像头,越来越高清,带来图片数据很大,传送到云端计算,速度慢,流量消耗大。因此,用户不愿意使用高精度的DNN(Deep Neural Network,深度神经网络)大模型。
如图3所示,为了能够在移动端设备中部署AI处理模型,相关的处理方式为:采用模型压缩算法对高精度的AI处理模型进行整体压缩,将大模型整体压缩为一个小模型,以损失AI处理模型的识别精度为代价,最终降低神经网络的计算量。上述处理方法一般分两个步骤:
步骤1,在超强计算能力的GPGPU(General Purpose Computer on GPU,在图形处理器上进行通用运算)集群上,训练出高识别精度和高计算量神经网络模型。
步骤2,在高精度的大模型基础上,神经网络压缩技术(模型压缩技术),训练一个低识别精度和计算量的小模型,最终满足嵌入式设备(移动端设备)的计算能力。
目前的模型压缩技术可以大致分为四类:参数修剪和共享(parameter pruning and sharing)、低秩分解(low-rank factorization)、迁移/压缩卷积滤波器(transfered/compact convolutional filter)和知识精炼(knowledge distillation)。
然而,由于模型压缩技术的压缩能力有限,很多高精度大模型压缩后,依然无法部署到移动端。表2和表3为相关模型压缩技术的性能数据,其中,表2示出了低秩分解技术在ILSVRC-2012数据集上的性能对比结果,表3示出了迁移/压缩卷积滤波器在CIFAR-10和CIFAR-100数据集上的性能对比结果。
表2
表3
表2和表3示出的当前模型压缩技术的性能数据,压缩比(Compression Rate)都是5倍以下,对于高精度的大神经网络,即使压缩5倍,其计算量和内存开销对于移动端设备依然很大,无法部署运行。
同时,相关的AI处理模型在移动端的部署方案,均会损失最终的AI处理模型识别精度。有些AI处理模型,最终压缩后的精度,可能完全无法被用户接受,体验极差。
在本申请中,根据AI处理模型(AI处理模型)生成两个子模型:第一子模型和第二子模型,并将第一子模型部署在移动端设备,将第二子模型部署在服务器中,通过第一子模型结合第二子模型配合使用的方式实现使用AI处理模型处理的计算任务,以此减少AI处理模型部署在移动端设备中的模型的计算量和内存开销,达到可以在移动端设备中部署AI处理模型的目的,同时由于向服务器传输的仅为第一子模型的处理结果,在较少传输的数据量的同时,保护了用户隐私,提高了用户体验。
下面结合图2所示的步骤详述本申请的实施例。
在步骤S202提供的技术方案中,移动端设备使用AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果。
上述AI处理模型用于对待处理数据执行目标处理,得到目标处理结果。待处理数据可以是待处理多媒体数据,可以包括但不限于:图像数据、视频数据、语音数据。上述目标处理包括但不限于:图像处理(图像去模糊、图像对象识别、图像美化、图像渲染、文字翻译)、语音处理(语音翻译、语音去噪)。得到目标处理结果可以包括但不限于:图像处理结果(图像去模糊的结果、对象识别的结果、图像美化的而结果、图像渲染的结果、文字翻译的结果),语音处理结果(语音去噪的结果、语音翻译的结果)。
根据AI处理模型可以生成对应的第一子模型和第二子模型,具体的,第一子模型根据AI处理模型中的M个神经网络层生成,第二子模型根据AI处理模型中的K个神经网络层生成,其中,M、K均为大于或者等于1的正整数。第一子模型可以部署在移动端设备,第二子模型可以部署在第一服务器中(云端服务器)。其中,所述M个神经网络层和所述K个神经网络层为所述AI处理模型中不同层级的网络层。
上述AI处理模型与第一子模型和第二子模型相对应,所谓相对应可以理解是为第一子模型和第二子模型相结合能够实现AI处理模型的功能以达到相同或者近似的处理效果。
在部署AI处理模型之前,可以首先对初始AI处理模型进行训练,得到包括N个神经网络层的AI处理模型。
可选地,可以使用训练数据(可以是多媒体数据,例如,图像数据、视频数据、语音数据等)对初始AI处理模型进行训练,得到AI处理模型(高精度的AI处理模型)。具体的训练过程可以结合相关技术,本实施例中对此不作赘述。
在得到AI处理模型之后,可以从AI处理模型中拆分出两个计算段,其中,拆出的M个神经网络层为第一计算段,拆出的K个神经网络层为第二计算段,其中,N大于或者等于M与K的和。
由于第一计算段仅包含了与高精度AI处理模型对应的部分神经网络层,第一计算段的计算量和内存开销可以控制在移动端设备可承受的范围内。因而拆分出的第一计算段可作为第一子模型直接部署到移动端设备中。
为了进一步控制第一计算段的计算量和内存开销,可以采用模型压缩算法(例如,蒸馏法)对第一计算段中包含的神经网络层进行压缩,得到第一子模型。
可选地,在使用与AI处理模型对应的第一子模型对待处理数据进行处理之前,移动端设备接收第二服务器发送的第一子模型,其中,第二服务器用于使用目标压缩算法对上述M个神经网络层进行压缩,得到第一子模型,其中,目标压缩算法用于对神经网络进行压缩。
第二服务器可以使用用于对神经网络进行压缩的目标压缩算法(模型压缩算法)对第一计算段中包含的M个神经网络层进行压缩,得到第一子模型。对应的,将第二计算段中包含的K个神经网络层作为第二子模型。
通过对M个神经网络层进行模型压缩,可以进一步减少第一计算段的计算量和内存开销,同时可以减少使用过程中向第一服务器传输的数据量,降低对移动端设备的资源消耗,提高用户体验。
可选地,第二子模型用于补偿相对于AI处理模型,由于对包含M个神经网络层的第一子模型进行压缩所损失的处理精度。
在对第一计算段进行模型压缩之后,为了保证整个AI处理模型的精度,可以对第二计算段中包含的神经网络层进行训练,调整第二计算段中包含的神经网络层的参数信息,以补偿由于对第一计算段进行模型压缩而造成的精度损失。
可选地,在使用与AI处理模型对应的第一子模型对待处理数据进行处理之前,第二服务器可以使用目标压缩算法,对M个神经网络层进行压缩,得到第一子模型;获取第一子模型对训练对象执行第一处理得到的第一处理结果;对K个神经网络层进行训练,得到第二子模型,其中,K个神经网络层的输入为第一处理结果,训练的约束条件为:第二子模型的输出结果与第二处理结果的处理精度差值小于或等于目标阈值,其中,第二处理结果为使用AI处理模型(未进行过模型压缩时的AI处理模型)对训练对象进行处理得到的处理结果。
在对第二计算段中包含的神经网络层进行训练时,可以以第一子模型的输出作为第二计算段的输入,结合AI处理模型(未进行模型压缩)对训练数据的处理结果,使用模型训练算法对第二计算段中包含的神经网络层,训练出一个不损失最终精度的网络识别层(第二子模型)。
在第二服务器模型训练完成,得到第一子模型和第二子模型之后,可以将 第一子模型部署到移动端设备,将第二子模型部署到第一服务器(云端处理器)。
例如,为了在移动端设别中直接部署高精度的R-FCN大模型(其基础模型采用ResNet-101),如图4所示,将其拆分为2段,云段计算部分(第二计算段)和移动端计算部分(第一计算段),移动端设备只部署压缩的前3层网络,除了前3层以外的网络部署在云端(这种情况下,N等于M与K的和)。
在对网络进行压缩时,可以采用蒸馏法训练前3层网络,得到压缩网络(第一子模型),并将其部署移动端设备。图5展示了训练网络压缩层一种方法,基于这个损失函数可以蒸馏出,最接近原始ResNet-101前3层的输出结果。
对于云端计算部分,可以利用压缩网络的输出作为输入,利用迁移学习的方法,训练出一个不损失最终精度的网络识别层(第二子模型),部署到云端(例如,第一服务器)。
在将第一子模型部署到移动端设备之后,移动端设备可以通过获取待处理数据,上述待处理数据可以是实时获取的数据,也可以是非实时获取的数据,获取的待处理数据的方式可以有多种。
作为一种可选的实施方式,待处理数据可以是移动端设备从其他设备(其他移动端设备、终端设备、服务器设备等)中接收到的。
作为另一种可选的实施方式,待处理数据可以是移动端设备通过自身的数据采集部件获取到的。上述数据采集部件可以但不限于:传感器(例如,摄像头),麦克风等。
可选地,在使用与AI处理模型对应的第一子模型对待处理数据执行第一处理之前,通过移动端设备的目标传感器获取待处理数据。
在获取到待处理数据之后,移动端设备可以使用第一子模型对待处理数据执行第一处理,得到中间处理结果。
对于不同类型的待处理数据,可以采用不同的AI处理模型进行处理。对于同一待处理数据,可以采用一种或多个AI处理模型进行处理。
可选地,在待处理数据为待处理图像的情况下,AI处理模型为AI识别模型,用于识别待处理图像中包含的目标对象,第一子模型执行的第一处理为第一识别处理。
使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果可以包括:使用第一子模型对待处理图像执行第一识别处理,得到中间识别结果。
可选地,在待处理数据为待处理图像的情况下,AI处理模型为AI去模糊模型,用于对待处理图像进行去模糊处理,得到去模糊结果的处理结果,第一子模型执行的第一处理为第一去模糊处理。
使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果可以包括:使用第一子模型对待处理图像执行第一去模糊处理,得到中间去模糊结果。
可选地,在待处理数据为待翻译数据(可以是语音,也可以是图片或其他需要进行翻译的数据)的情况下,AI处理模型为AI翻译模型,用于将待翻译数据中包含的使用第一语言的第一语言数据,翻译为使用第二语言的第二语言数据,第一子模型执行的第一处理为第一翻译处理。
使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果可以包括:使用第一子模型对待翻译数据执行第一翻译处理,得到中间翻译结果。
在步骤S204提供的技术方案中,将中间处理结果发送给第一服务器。
上述发送可以是通过移动端设备的移动网络进行的,也可以是移动端设备通过其他无线网络进行的。由于发送的是第一子网络的处理结果(计算结果),数据大小一般远小于原始待处理数据的大小,同时用户隐私方面也得到保证。
第一服务器接收到中间处理结果之后,可以使用部署的第二子模型对中间处理结果执行第二处理,得到目标处理结果。
对于不同类型的待处理数据,可以采用与不同的AI处理模型对应的第二子模型对于中间处理结果进行处理。对于同一待处理数据,可以采用一种或多个与AI处理模型对应的第二子模型对于中间处理结果进行处理。
可选地,在待处理数据为待处理图像的情况下,第二处理为第二识别处理,目标识别结果用于指示待处理图像中的目标对象。
第一服务器使用第二子模型对中间识别结果执行第二识别处理得到,得到待处理图像中的目标对象的识别结果。
可选地,在待处理数据为待处理图像的情况下,第二处理为第二去模糊处理,目标识别结果用于指示待处理图像的去模糊结果。
第一服务器使用第二子模型对中间去模糊结果执行第二去模糊处理,得到待处理图像中的目标去模糊结果。
可选地,在待处理数据为待翻译数据的情况下,第二处理为第二翻译处理,目标识别结果为包含第二语言数据的目标翻译结果。
第一服务器使用第二子模型对中间翻译结果执行第二翻译处理,得到包含第二语言数据的目标翻译结果。
在得到目标处理结果之后,第一服务器将目标翻译结果发送给移动端设备。
在步骤S206提供的技术方案中,移动端设备接收第一服务器返回的目标处理结果。
在接收到第一服务器返回的目标处理结果之后,移动端设备可以在移动端设备上显示目标识别结果(待处理图像),或者,播放目标识别结果(待处理语音数据,例如,待翻译数据)。
下面结合具体示例进行说明。高精度AI处理模型可以应用到视频产品中,用于对视频产品的AI处理,可以包括但不限于:AI自动去模糊,AI图片自动识别等,例如,AI自动图片识别技术。常用的高精度大模型包括:R-CNN、 SSD和YOLO等,识别效果如图6所示。
本示例中的对象识别方法采用对AI处理模型分段计算的方式,根据高精度AI处理模型,生成与之对应的两个计算部分:移动端计算部分和云端计算部分。移动端计算部分对应于AI处理模型的前m层神经网络层(例如,前3层),部署在移动端(移动端设备,嵌入式设备,如,手机等)中。云端计算部分对应于AI处理模型的剩余部分(除前m层神经网络层以外的其他神经网络层),部署在云端(云集群,云计算中心,云服务器)。
在进行传感器数据处理时,在移动端设备上,通过移动端计算部分执行计算,获得中间结果,并通过连接移动端和云端的网络(例如,移动网络,无线网络等),将获得的中间结果发送给云端。云端接收移动端发送的中间结果,使用AI处理模型的剩余部分接力计算,并将最终处理结果发送给移动端。
通过上述分段计算的方式,可以减少移动端的计算量和内存开销,保证在移动端部署高精度AI处理模型的可行性。并且,将移动端计算部分的中间结果作为云端计算部分的输入,可以减少移动端的数据通讯量,同时保护用户的隐私,从而提高用户体验。
可选地,可以对与AI处理模型对应的计算部分进行局部压缩:对移动端计算部分进行模型压缩,作为局部高压缩比部分(高压缩比计算段,即高压缩比神经网络层),而云端计算部分不进行压缩,作为其他无压缩部分(高精度计算段,即高精度神经网络层)。
在进行传感器数据处理时,在移动端设备上,通过高压缩比神经网络层的计算,获得一个近似原始网络的第一层或者前几层的网络中间结果(高压缩比神经网络层的输出结果),并通过连接移动端和云端的网络,将中间结果发送给云端。
云端接收移动端的中间结果,使用剩余计算部分接力计算,并将最终识别结果发送给移动端。
由于高压缩比神经网络层所描述的网络层次简单,可以大幅度压缩计算量,所损失的信息比全网络压缩要少很多。并且,通过高压缩比神经网络层的计算,可以获得一个近似原始网络的第一层或者前几层的输出结果,而上述输出结果的数据大小一般远小于原始传感器数据的大小(也小于无压缩时移动端计算部分的输出结果的数据大小),可以降低最终的传输数据量。同时,通过其他无压缩部分的计算,可以保持或者尽量保持使用AI处理模型处理时的原有识别精度,从而提高用户体验。
对于对象识别的流程,如图7所示,本示例中的对象识别方法包括以下步骤:
步骤1,在移动端和云端部署AI处理模型。
在使用AI处理模型进行处理之前,可以对AI处理模型进行训练,得到移动端计算部分和云端计算部分,并将移动端计算部分部署到移动端,将云端计算部分部署到云端。
在对AI处理模型进行训练时,对于无压缩的AI处理模型,可以对原始模型进行训练,得到高精度A处理I模型。对于局部压缩的AI处理模型,在上述训练的基础上,可以用得到的高精度AI处理模型的中间数据作为标签,采用用于对模型进行压缩的第一算法(例如,蒸馏法)对AI处理模型的前n层(例如,前3层)神经网络层进行训练压缩,得到移动端计算部分;可以用移动端计算部分的输出结果作为输入,用高精度AI处理模型的中间数据和/最终数据作为标签,采用第二算法(例如,迁移学习)训练AI处理模型中除前n层(例如,前3层)以外的其他神经网络层,得到云端计算部分。
上述AI处理模型的局部压缩方式可以应用在所有移动端AI处理模型的部署中。
以目前精度较好的R-FCN大模型为例进行说明,该模型的基础模型采用ResNet-101。如图4所示,根据ResNet-101生成两个计算部分:移动端计算部分和云端计算部分。
对于移动端计算部分,该部分可以为压缩网络。可以用高精度AI处理模型的中间数据作为标签,采用蒸馏法指导训练压缩AI处理模型的前3层神经网络层,得到一个高压缩比的神经网络层(移动端计算部分),最终部署到移动端。
图5示出了训练网络压缩层的一种方式。基于图5中示出的损失函数可以蒸馏出最接近原始ResNet-101的前3层的输出结果。
对于云端计算部分,该部分可以为高精度网络。可以采用迁移学习的方法(transfer learning)对AI处理模型中除了前3层神经网络层以外的神经网络层进行训练,得到云端计算部分。该高精度网络的输入为压缩网络的输出,训练过程可以参考高精度AI处理模型的输出结果(中间数据和/或最终数据),以得到一个不损失或者尽量不损失最终精度的网络识别层,最终部署到移动端。
在训练时,将高压缩比神经网络层的输出结果,作为高精度模型的剩余子模块的输入,再次训练该子模型,确保模型适应压缩后的输入变化,以达到原始AI处理模型的精度。
在进行AI处理模型部署时,上述训练过程可以是由特定的设备(目标设备)或者特定的服务器执行的,也可以由云端执行的。在压缩网络和高精度网络训练完成之后,可以通过得到的压缩网络和高精度网络发送至移动端和云端,分别进行网络部署。
步骤2,通过移动端设备的传感器获取传感器数据。
在AI处理模型部署完成之后,移动端设备可以通过移动端设备的传感器获取传感器数据。上述传感器数据可以是任意通过传感器获取到的数据,可以包括但不限于:语音数据、图像数据或者其他数据。
步骤3,通过移动端设备的高压缩比的神经网络计算得到中间结果,并将中间结果发送给云计算中心。
在移动端设备中,使用AI处理模型的移动端计算部分(高压缩比的神经网络)对传感器数据进行计算,得到中间结果,并将中间结果通过网络发送给云计算中心。
步骤4,通过云计算中心的高精度的神经网络计算得到最终识别结果,并将最终识别结果发送给移动端设备。
通过本示例的上述技术方案,对高精度AI处理模型进行分段计算,根据AI处理模型生成与之对应的高压缩比计算段和高精度计算段,分别部署移动端和云端,接力计算完成一个与高精度AI处理模型具有同等性能的计算任务,进一步地,采用对AI处理模型进行局部压缩的方式,利用高压缩比的神经网络替换高精度AI处理模型最开始的一层或者几层的子网络(而不是整个模型网络),完成第一层或者前几层的计算量,而不是同其他全网络压缩方法一样,以损失精度为代价,降低计算量,通过上述方式,可以使得用户在损失少量流量的情况下,可以借助云端,获取高精度的神经网络模型的体验,为移动端部署高精度AI处理模型提供了便利,扩大了对云端的计算需求。
通过上述步骤S202至步骤S206,终端侧设备使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型用于对待处理数据执行目标处理,得到目标处理结果,AI处理模型与第一子模型和第二子模型相对应,第一子模型对应于AI处理模型中的M个神经网络层,第二子模型对应于AI处理模型中的K个神经网络层,M、K为大于或者等于1的正整数;将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果,目标处理包括第一处理和第二处理;接收第一服务器返回的目标处理结果,解决了相关技术中存在由于模型压缩技术的模型压缩能力有限导致无法在移动端设备中部署AI处理模型的问题,达到了提高用户体验的效果。
作为一种可选的技术方案,在使用与AI处理模型对应的第一子模型对待处理数据进行处理之前,上述方法还包括:
S1,接收第二服务器发送的第一子模型,其中,第二服务器用于使用目标压缩算法对M个神经网络层进行压缩,得到第一子模型,其中,目标压缩算法用于对神经网络进行压缩。
可选地,第二子模型用于补偿AI处理模型由于对M个神经网络层进行压缩所损失的处理精度。
可选地,在使用所述AI处理模型的所述第一子模型对待处理数据进行处理之前,上述方法还包括:
S1,第二服务器使用目标压缩算法,对M个神经网络层进行压缩,得到第一子模型;
S2,第二服务器获取第一子模型对训练对象执行第一处理得到的第一处理结果;
S3,第二服务器对K个神经网络层进行训练,得到第二子模型,其中,K 个神经网络层的输入为第一处理结果,训练的约束条件为:第二子模型的输出结果与第二处理结果的处理精度差值小于或等于目标阈值,其中,第二处理结果为使用AI处理模型对训练对象进行处理得到的处理结果。
通过本实施例,使用目标压缩算法对M个神经网络层进行压缩,得到第一子模型,可以减少第一子模型的计算量和内存开销,以及移动端设备向第一服务器发送的中间处理结果所包含的数据量,提高用户体验。进一步地,通过对第一子模型和第二子模型进行训练,以通过第二子模型补偿由于第一子模型压缩所造成的精度损失,提高待处理数据的处理精度,进而提高用户体验。
作为一种可选的技术方案,
使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果包括:使用第一子模型对待处理图像执行第一识别处理,得到中间处理结果,其中,待处理数据为待处理图像,第一处理为第一识别处理,待处理图像中包含目标对象,AI处理模型用于识别待处理图像中的目标对象;
接收第一服务器返回的目标处理结果包括:接收第一服务器返回的目标识别结果,其中,目标处理结果为目标识别结果,目标识别结果由第一服务器使用第二子模型对中间识别结果执行第二识别处理得到,第二处理为第二识别处理,目标识别结果用于指示待处理图像中的目标对象。
作为另一种可选的技术方案,
使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果包括:使用第一子模型对待处理图像执行第一去模糊处理,得到中间处理结果,其中,待处理数据为待处理图像,第一处理为第一去模糊处理,AI处理模型用于对待处理图像执行去模糊操作,得到目标去模糊结果;
接收第一服务器返回的目标处理结果包括:接收第一服务器返回的目标去模糊结果,其中,目标处理结果为目标去模糊结果,目标去模糊结果由第一服务器使用第二子模型对中间去模糊结果执行第二去模糊处理得到,第二处理为第二去模糊处理。
作为又一种可选的技术方案,
使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果包括:使用第一子模型对待翻译数据执行第一翻译处理,得到中间翻译结果,其中,待处理数据为待翻译数据,第一处理为第一翻译处理,AI处理模型用于将待翻译数据中包含的使用第一语言的第一语言数据,翻译为使用第二语言的第二语言数据;
接收第一服务器返回的目标处理结果包括:接收第一服务器返回的目标翻译结果,其中,目标处理结果为目标翻译结果,目标翻译结果由第一服务器使用第二子模型对中间翻译结果执行第二翻译处理得到,第二处理为第二翻译处理,目标翻译结果中包含第二语言数据。
通过本实施例,对于不同类型的待处理数据执行一种或多种不同的处理(例如,对象识别、图像去模糊、数据翻译),满足用户不同的需求,提高终 端业务处理的能力,提高用户体验。
作为一种可选的技术方案,在使用与AI处理模型对应的第一子模型对待处理数据执行第一处理之前,上述方法还包括:
S1,通过移动端设备的目标传感器获取待处理数据。
通过本实施例,通过移动端设备的目标传感器获取待处理数据,可以实现对待处理数据的实时处理,适应不同的应用需求,提高用户体验。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
根据本申请实施例,还提供了一种用于实施上述数据处理方法的数据处理装置。图8是根据本申请实施例的一种可选的数据处理装置的示意图,如图8所示,该装置可以包括:
(1)处理单元82,用于使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型用于对待处理数据执行目标处理,得到目标处理结果,AI处理模型与第一子模型和第二子模型相对应,第一子模型根据AI处理模型中的M个神经网络层生成,第二子模型根据AI处理模型中的K各神经网络层生成,M、K为大于或者等于1的正整数;
(2)发送单元84,用于将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果,目标处理包括第一处理和第二处理;
(3)第一接收单元86,用于接收第一服务器返回的目标处理结果。
上述数据处理装置可以但不限于应用于移动端设备通过传感器(例如,移动终端的摄像头)获取待处理数据的过程中。
需要说明的是,该实施例中的处理单元82可以用于执行本申请实施例中的步骤S202,该实施例中的发送单元84可以用于执行本申请实施例中的步骤S204,该实施例中的第一接收单元86可以用于执行本申请实施例中的步骤S206。
通过本申请提供的实施例,终端侧设备使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型用于对待处理数据执行目标处理,得到目标处理结果,AI处理模型与第一子模型和第二子模型相对应,第一子模型根据AI处理模型中的M个神经网络层生成,第二子模型根据AI处理模型中的K个神经网络层生成,M、K为大于或者等于1的正整数;将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果,目标处 理包括第一处理和第二处理;接收第一服务器返回的目标处理结果,解决了相关技术中存在由于模型压缩技术的模型压缩能力有限导致无法在移动端设备中部署AI处理模型的问题,达到了提高用户体验的效果。
作为一种可选的技术方案,上述装置还包括:
第二接收单元,用于在使用与AI处理模型对应的第一子模型对待处理数据进行处理之前,接收第二服务器发送的第一子模型,其中,第二服务器用于使用目标压缩算法对M个神经网络层进行压缩,得到第一子模型,其中,目标压缩算法用于对神经网络进行压缩。
通过本实施例,使用目标压缩算法对M个神经网络层进行压缩,得到第一子模型,可以减少第一子模型的计算量和内存开销,以及移动端设备向第一服务器发送的中间处理结果所包含的数据量,提高用户体验。
作为一种可选的技术方案,上述处理单元82包括:处理模块,第一接收单元86包括,接收模块,其中,
(1)处理模块,用于使用第一子模型对待处理图像执行第一识别处理,得到中间识别结果,其中,待处理数据为待处理图像,第一处理为第一识别处理,待处理图像中包含目标对象,AI处理模型用于识别待处理图像中的目标对象;
(2)接收模块,用于接收第一服务器返回的目标识别结果,其中,目标处理结果为目标识别结果,目标识别结果由第一服务器使用第二子模型对中间识别结果执行第二识别处理得到,第二处理为第二识别处理,目标识别结果用于指示待处理图像中的目标对象。
作为另一种可选的技术方案,上述处理单元82包括:第一处理模块,第一接收单元86包括,第一接收模块,其中,
(1)第一处理模块,用于使用第一子模型对待处理图像执行第一去模糊处理,得到中间去模糊结果,其中,待处理数据为待处理图像,第一处理为第一去模糊处理,AI处理模型用于对待处理图像执行去模糊操作,得到目标去模糊结果;
(2)第一接收模块,用于接收第一服务器返回的目标去模糊结果,其中,目标处理结果为目标去模糊结果,目标去模糊结果由第一服务器使用第二子模型对中间去模糊结果执行第二去模糊处理得到,第二处理为第二去模糊处理。
作为又一种可选的技术方案,上述处理单元82包括:第二处理模块,第一接收单元86包括,第二接收模块,其中,
(1)第二处理模块,用于使用第一子模型对待翻译数据执行第一翻译处理,得到中间翻译结果,其中,待处理数据为待翻译数据,第一处理为第一翻译处理,AI处理模型用于将待翻译数据中包含的使用第一语言的第一语言数据,翻译为使用第二语言的第二语言数据;
(2)第二接收模块,用于接收第一服务器返回的目标翻译结果,其中,目标处理结果为目标翻译结果,目标翻译结果由第一服务器使用第二子模型对 中间翻译结果执行第二翻译处理得到,第二处理为第二翻译处理,目标翻译结果中包含第二语言数据。
通过本实施例,对于不同类型的待处理数据执行一种或多种不同的处理(例如,对象识别、图像去模糊、数据翻译),满足用户不同的需求,提高终端业务处理的能力,提高用户体验。
作为一种可选的技术方案,上述装置还包括:
获取单元,用于在使用与AI处理模型对应的第一子模型对待处理数据执行第一处理之前,通过移动端设备的目标传感器获取待处理数据。
通过本实施例,通过移动端设备的目标传感器获取待处理数据,可以实现对待处理数据的实时处理,适应不同的应用需求,提高用户体验。
根据本申请的实施例的又一方面,还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:
S1,使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型用于对待处理数据执行目标处理,得到目标处理结果,AI处理模型与第一子模型和第二子模型相对应,第一子模型根据AI处理模型中的M个神经网络层生成,第二子模型根据AI处理模型中的K个神经网络层生成,M、K为大于或者等于1的正整数;
S2,将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果,目标处理包括第一处理和第二处理;
S3,接收第一服务器返回的目标处理结果。
可选地,在本实施例中,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取器(Random Access Memory,简称为RAM)、磁盘或光盘等。
根据本申请实施例的又一个方面,还提供了一种用于实施上述数据处理方法的电子装置,如图9所示,该电子装置包括:处理器902、存储器904、数据总线906和传输装置908等。上述各部件可以通过数据总线906或者其他用于数据传输的线进行连接。该存储器中存储有计算机程序,该处理器被设置为通过计算机程序执行上述任一项方法实施例中的步骤。
可选地,在本实施例中,上述电子装置可以位于计算机网络的多个网络设备中的至少一个网络设备。
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:
S1,使用与AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,AI处理模型用于对待处理数据执行目标处理,得到目标处理结果,AI处理模型与第一子模型和第二子模型相对应,第一子模型根据AI处理模型中的M个神经网络层生成,第二子模型根据AI处理模型中的K个神经网络层生成,M、K为大于或者等于1的正整数;
S2,将中间处理结果发送给第一服务器,其中,第一服务器用于使用第二子模型对中间处理结果执行第二处理,得到目标处理结果,目标处理包括第一处理和第二处理;
S3,接收第一服务器返回的目标处理结果。
可选地,本领域普通技术人员可以理解,图9所示的结构仅为示意,电子装置也可以是智能设备、智能手机(如Android手机、ios手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,简称为MID)、PAD等终端设备。图9其并不对上述电子装置的结构造成限定。例如,电子装置还可包括比图9中所示更多或者更少的组件(如网络接口等),或者具有与图9所示不同的配置。
其中,存储器904可用于存储软件程序以及模块,如本申请实施例中的数据处理方法和装置对应的程序指令/模块,处理器902通过运行存储在存储器904内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述签名信息的传输方法。存储器904可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器904可进一步包括相对于处理器902远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
上述的传输装置908用于经由一个网络接收或者发送数据。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置908包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置908为射频(RadioFrequency,简称为RF)模块或蓝牙,其用于通过无线方式与互联网进行通讯。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步 骤。
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。
Claims (15)
- 一种数据处理方法,应用于移动端设备,包括:使用人工智能AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,所述AI处理模型与所述第一子模型和第二子模型相对应,所述第一子模型根据所述AI处理模型中的M个神经网络层生成,所述第二子模型根据所述AI处理模型中的K个神经网络层生成,所述M、K为大于或者等于1的正整数;将所述中间处理结果发送给第一服务器,其中,所述第一服务器用于使用所述第二子模型对所述中间处理结果执行第二处理,得到目标处理结果;接收所述第一服务器返回的所述目标处理结果。
- 根据权利要求1所述的方法,在使用所述AI处理模型的所述第一子模型对所述待处理数据进行处理之前,所述方法还包括:接收第二服务器发送的所述第一子模型,其中,所述第二服务器用于使用目标压缩算法对所述AI处理模型中拆分出的M个神经网络层进行压缩,得到所述第一子模型;或,接收第二服务器发送的所述第一子模型,其中,所述第二服务器用于从所述AI处理模型中拆分出的M个神经网络层作为所述第一子模型。
- 根据权利要求2所述的方法,所述第二子模型用于补偿所述AI处理模型由于对所述M个神经网络层进行压缩所损失的处理精度。
- 根据权利要求2所述的方法,在使用所述AI处理模型的所述第一子模型对待处理数据进行处理之前,所述方法还包括:获取所述第一子模型对训练对象执行所述第一处理得到的第一处理结果;对从所述AI处理模型中拆分的K个神经网络层进行训练,得到满足训练约束条件的所述第二子模型,其中,所述K个神经网络层的输入为所述第一处理结果,所述训练约束条件为:所述第二子模型的输出结果与第二处理结果的处理精度差值小于或等于目标阈值,其中,所述第二处理结果为使用所述AI处理模型对所述训练对象进行处理得到的处理结果。
- 根据权利要求1所述的方法,所述使用所述AI处理模型对应的所述第一子模型对所述待处理数据执行第一处理,得到中间处理结果包括:当所述待处理数据为待处理图像时,使用所述第一子模型对所述待处理图像执行第一识别处理,得到中间识别结果,其中,所述AI处理模型用于识别所述待处理图像中的目标对象;接收所述第一服务器返回的所述目标处理结果包括:接收所述第一服务器返回的目标识别结果,其中,所述目标识别结果由所述第一服务器使用所述第二子模型对所述中间识别结果执行第二识别处理得到,所述目标识别结果用于指示所述待处理图像中的所述目标对象。
- 根据权利要求1所述的方法,所述使用所述AI处理模型对应的所述第一子模型对所述待处理数据执行第一处理,得到中间处理结果包括:当所述待处理数据为待处理图像时,使用所述第一子模型对所述待处理图像执行第一去模糊处理,得到中间去模糊结果,其中,所述AI处理模型用于对所述待处理图像执行去模糊操作,得到目标去模糊结果;接收所述第一服务器返回的所述目标处理结果包括:接收所述第一服务器返回的所述目标去模糊结果,其中,所述目标去模糊结果由所述第一服务器使用所述第二子模型对所述中间去模糊结果执行第二去模糊处理得到。
- 根据权利要求1所述的方法,所述使用所述AI处理模型对应的所述第一子模型对所述待处理数据执行第一处理,得到中间处理结果包括:当所述待处理数据为待翻译数据时,使用所述第一子模型对待翻译数据执行第一翻译处理,得到中间翻译结果,其中,所述AI处理模型用于将所述待翻译数据中包含的使用第一语言的第一语言数据,翻译为使用第二语言的第二语言数据;接收所述第一服务器返回的所述目标处理结果包括:接收所述第一服务器返回的目标翻译结果,其中,所述目标翻译结果由所述第一服务器使用所述第二子模型对所述中间翻译结果执行第二翻译处理得到,所述目标翻译结果中包含所述第二语言数据。
- 根据权利要求1所述的方法,在使用所述AI处理模型中的所述第一子模型对所述待处理数据执行所述第一处理之前,所述方法还包括:通过所述移动端设备自身的数据采集部件获取所述待处理数据,所述数据采集部件包括传感器和/或麦克风。
- 根据权利要求1至8中任一项所述的方法,所述第一子模型部署在移动端设备上,所述第一服务器为云端服务器。
- 一种数据处理装置,包括:处理单元,用于使用人工智能AI处理模型对应的第一子模型对待处理数据执行第一处理,得到中间处理结果,其中,所述AI处理模型与所述第一子模型和第二子模型相对应,所述第一子模型根据所述AI处理模型中的M个神经网络层生成,所述第二子模型根据所述AI处理模型中的K个神经网络层生成,所述M、K为大于或者等于1的正整数;发送单元,用于将所述中间处理结果发送给第一服务器,其中,所述第一服务器用于使用所述第二子模型对所述中间处理结果执行第二处理,得到所述目标处理结果,所述目标处理包括所述第一处理和所述第二处理;第一接收单元,用于接收所述第一服务器返回的所述目标处理结果。
- 根据权利要求10所述的装置,所述装置还包括:第二接收单元,用于接收第二服务器发送的所述第一子模型,其中,所述第二服务器用于使用目标压缩算法对所述M个神经网络层进行压缩,得到所述第一子模型;或,接收第二服务器发送的所述第一子模型,其中,所述第二服务器用于从所述AI处理模型中拆分出的M个神经网络层作为所述第一子模型。
- 根据权利要求10所述的装置,所述处理单元包括:处理模块,用于当所述待处理数据为待处理图像时,使用所述第一子模型对所述待处理图像执行第一识别处理,得到中间识别结果,其中,所述AI处理模型用于识别所述待处理图像中的目标对象;所述第一接收单元包括:接收模块,用于接收所述第一服务器返回的目标识别结果,其中,所述目标识别结果由所述第一服务器使用所述第二子模型对所述中间识别结果执行第二识别处理得到,所述目标识别结果用于指示所述待处理图像中的所述目标对象。
- 根据权利要求10至12中任一项所述的装置,所述装置还包括:获取单元,用于在使用所述AI处理模型中的所述第一子模型对所述待处理数据执行所述第一处理之前,通过移动端设备自身的数据采集部件获取所述待处理数据,所述数据采集部件包括传感器和/或麦克风。
- 一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至8任一项中所述的方法。
- 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至8任一项中所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP19898280.3A EP3901829A4 (en) | 2018-12-17 | 2019-11-01 | DATA PROCESSING METHOD AND DEVICE, STORAGE MEDIA, AND ELECTRONIC DEVICE |
| US17/083,607 US11689607B2 (en) | 2018-12-17 | 2020-10-29 | Data processing method and apparatus, storage medium, and electronic device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811545184.4 | 2018-12-17 | ||
| CN201811545184.4A CN109685202B (zh) | 2018-12-17 | 2018-12-17 | 数据处理方法及装置、存储介质和电子装置 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US17/083,607 Continuation US11689607B2 (en) | 2018-12-17 | 2020-10-29 | Data processing method and apparatus, storage medium, and electronic device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020125236A1 true WO2020125236A1 (zh) | 2020-06-25 |
Family
ID=66186259
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/115082 Ceased WO2020125236A1 (zh) | 2018-12-17 | 2019-11-01 | 数据处理方法及装置、存储介质和电子装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US11689607B2 (zh) |
| EP (1) | EP3901829A4 (zh) |
| CN (1) | CN109685202B (zh) |
| WO (1) | WO2020125236A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111753761A (zh) * | 2020-06-28 | 2020-10-09 | 北京百度网讯科技有限公司 | 模型生成方法、装置、电子设备及存储介质 |
| CN113240108A (zh) * | 2021-05-13 | 2021-08-10 | 北京字跳网络技术有限公司 | 模型训练方法、装置和电子设备 |
Families Citing this family (57)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11437032B2 (en) | 2017-09-29 | 2022-09-06 | Shanghai Cambricon Information Technology Co., Ltd | Image processing apparatus and method |
| US11397579B2 (en) | 2018-02-13 | 2022-07-26 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
| EP3651074B1 (en) | 2018-02-13 | 2021-10-27 | Shanghai Cambricon Information Technology Co., Ltd | Computation device and method |
| US11630666B2 (en) | 2018-02-13 | 2023-04-18 | Shanghai Cambricon Information Technology Co., Ltd | Computing device and method |
| CN110162162B (zh) * | 2018-02-14 | 2023-08-18 | 上海寒武纪信息科技有限公司 | 处理器的控制装置、方法及设备 |
| EP3624020B1 (en) | 2018-05-18 | 2025-07-02 | Shanghai Cambricon Information Technology Co., Ltd | Computation method and product thereof |
| EP3825841B1 (en) | 2018-06-27 | 2025-08-06 | Shanghai Cambricon Information Technology Co., Ltd | On-chip code breakpoint debugging method, on-chip processor, and chip breakpoint debugging system |
| CN110728364B (zh) | 2018-07-17 | 2024-12-17 | 上海寒武纪信息科技有限公司 | 一种运算装置和运算方法 |
| KR102519467B1 (ko) | 2018-08-28 | 2023-04-06 | 캠브리콘 테크놀로지스 코퍼레이션 리미티드 | 데이터 전처리 방법, 장치, 컴퓨터 설비 및 저장 매체 |
| US11703939B2 (en) | 2018-09-28 | 2023-07-18 | Shanghai Cambricon Information Technology Co., Ltd | Signal processing device and related products |
| CN109685202B (zh) | 2018-12-17 | 2023-03-21 | 腾讯科技(深圳)有限公司 | 数据处理方法及装置、存储介质和电子装置 |
| CN111385462A (zh) | 2018-12-28 | 2020-07-07 | 上海寒武纪信息科技有限公司 | 信号处理装置、信号处理方法及相关产品 |
| CN111832737B (zh) | 2019-04-18 | 2024-01-09 | 中科寒武纪科技股份有限公司 | 一种数据处理方法及相关产品 |
| US11847554B2 (en) | 2019-04-18 | 2023-12-19 | Cambricon Technologies Corporation Limited | Data processing method and related products |
| CN112085190B (zh) | 2019-06-12 | 2024-04-02 | 上海寒武纪信息科技有限公司 | 一种神经网络的量化参数确定方法及相关产品 |
| US11676028B2 (en) | 2019-06-12 | 2023-06-13 | Shanghai Cambricon Information Technology Co., Ltd | Neural network quantization parameter determination method and related products |
| US12001955B2 (en) | 2019-08-23 | 2024-06-04 | Anhui Cambricon Information Technology Co., Ltd. | Data processing method, device, computer equipment and storage medium |
| JP7146954B2 (ja) | 2019-08-23 | 2022-10-04 | 安徽寒武紀信息科技有限公司 | データ処理方法、装置、コンピュータデバイス、及び記憶媒体 |
| US12165039B2 (en) | 2019-08-23 | 2024-12-10 | Anhui Cambricon Information Technology Co., Ltd. | Neural network quantization data processing method, device, computer equipment and storage medium |
| CN112434781B (zh) | 2019-08-26 | 2024-09-10 | 上海寒武纪信息科技有限公司 | 用于处理数据的方法、装置以及相关产品 |
| WO2021036905A1 (zh) | 2019-08-27 | 2021-03-04 | 安徽寒武纪信息科技有限公司 | 数据处理方法、装置、计算机设备和存储介质 |
| US11588796B2 (en) * | 2019-09-11 | 2023-02-21 | Baidu Usa Llc | Data transmission with obfuscation for a data processing (DP) accelerator |
| CN110659330B (zh) * | 2019-09-23 | 2025-05-27 | 北京百度网讯科技有限公司 | 数据处理方法、装置及存储介质 |
| CN110955915B (zh) * | 2019-12-14 | 2022-03-25 | 支付宝(杭州)信息技术有限公司 | 一种隐私数据的处理方法及装置 |
| CN111091182A (zh) * | 2019-12-16 | 2020-05-01 | 北京澎思科技有限公司 | 数据处理方法、电子设备及存储介质 |
| CN111049836A (zh) * | 2019-12-16 | 2020-04-21 | 北京澎思科技有限公司 | 数据处理方法、电子设备及计算机可读存储介质 |
| CN111125760B (zh) * | 2019-12-20 | 2022-02-15 | 支付宝(杭州)信息技术有限公司 | 保护数据隐私的模型训练、预测方法及其系统 |
| CN111260053A (zh) * | 2020-01-13 | 2020-06-09 | 支付宝(杭州)信息技术有限公司 | 使用可信执行环境来进行神经网络模型训练的方法和装置 |
| CN113298843B (zh) | 2020-02-24 | 2024-05-14 | 中科寒武纪科技股份有限公司 | 数据量化处理方法、装置、电子设备和存储介质 |
| CN113408716B (zh) | 2020-03-17 | 2025-06-24 | 安徽寒武纪信息科技有限公司 | 计算装置、方法、板卡和计算机可读存储介质 |
| CN113408717B (zh) | 2020-03-17 | 2025-09-09 | 安徽寒武纪信息科技有限公司 | 计算装置、方法、板卡和计算机可读存储介质 |
| CN111522278A (zh) * | 2020-05-22 | 2020-08-11 | 江苏中岚智能科技有限公司 | 一种集成数据采集控制传输功能的实时性系统 |
| CN111709516B (zh) * | 2020-06-09 | 2023-07-28 | 深圳先进技术研究院 | 神经网络模型的压缩方法及压缩装置、存储介质、设备 |
| CN111860810A (zh) * | 2020-06-30 | 2020-10-30 | 浪潮(北京)电子信息产业有限公司 | 一种基于fpga的神经网络运算方法、装置及设备 |
| EP3944146A1 (en) * | 2020-07-21 | 2022-01-26 | Microsoft Technology Licensing, LLC | Distributed machine learning model |
| CN114065900B (zh) * | 2020-07-30 | 2025-12-02 | 华为技术有限公司 | 数据处理方法和数据处理装置 |
| WO2022050729A1 (en) | 2020-09-03 | 2022-03-10 | Samsung Electronics Co., Ltd. | Methods and wireless communication networks for handling data driven model |
| CN112783807B (zh) * | 2020-12-31 | 2023-12-29 | 深圳大普微电子科技有限公司 | 一种模型计算方法及系统 |
| CN112905189B (zh) * | 2021-02-24 | 2024-06-25 | 嘉楠明芯(北京)科技有限公司 | 模型翻译方法、装置及计算机可读存储介质 |
| CN115080219A (zh) * | 2021-03-15 | 2022-09-20 | 伊姆西Ip控股有限责任公司 | 数据处理方法、电子设备和计算机程序产品 |
| CN115842835A (zh) * | 2021-09-10 | 2023-03-24 | 华为技术有限公司 | 一种通信方法及装置 |
| CN113792297B (zh) * | 2021-09-10 | 2025-07-25 | 支付宝(杭州)信息技术有限公司 | 一种业务处理方法、装置及设备 |
| US20230103149A1 (en) * | 2021-09-30 | 2023-03-30 | International Business Machines Corporation | Adaptively compressing a deep learning model |
| CN116010067A (zh) * | 2021-10-20 | 2023-04-25 | 华为云计算技术有限公司 | 模型推理方法、云平台、设备和存储介质 |
| CN114239835A (zh) * | 2021-12-09 | 2022-03-25 | 杭州电子科技大学 | 一种降低网络依赖的多设备协同推理方法 |
| JP2023105469A (ja) * | 2022-01-19 | 2023-07-31 | ソニーセミコンダクタソリューションズ株式会社 | 情報処理装置、情報処理システム、コンピュータ読み取り可能な記録媒体及び情報処理方法 |
| CN116579380A (zh) * | 2022-01-30 | 2023-08-11 | 华为技术有限公司 | 一种数据处理方法以及相关设备 |
| CN114168251A (zh) * | 2022-02-14 | 2022-03-11 | 龙旗电子(惠州)有限公司 | 语言切换方法、装置、设备、计算机可读存储介质及产品 |
| CN115439731B (zh) * | 2022-09-11 | 2025-12-05 | 贵州大学 | 一种农作物果实采摘的果实识别定位方法 |
| CN118235492A (zh) * | 2022-10-19 | 2024-06-21 | 北京小米移动软件有限公司 | 一种基于ai模型的终端定位方法及装置 |
| CN117036720A (zh) * | 2022-10-27 | 2023-11-10 | 腾讯科技(深圳)有限公司 | 图像数据处理方法、装置、设备及存储介质 |
| KR20240125353A (ko) * | 2023-02-10 | 2024-08-19 | 삼성전자주식회사 | 무선 통신 시스템에서 ai/ml 미디어 서비스를 제공하기 위한 방법 및 장치 |
| CN119962660A (zh) * | 2023-11-08 | 2025-05-09 | 华为技术有限公司 | 一种模型推理方法及装置 |
| CN117852071A (zh) * | 2023-12-01 | 2024-04-09 | 羚羊工业互联网股份有限公司 | 基于大模型的隐私保护方法及相关装置、设备和存储介质 |
| US12580624B2 (en) * | 2023-12-22 | 2026-03-17 | Cisco Technology, Inc. | Dynamic split computing for beamforming |
| CN119240523A (zh) * | 2024-09-25 | 2025-01-03 | 中国长江电力股份有限公司 | 一种基于视觉的起重机钢丝绳缠绕异常检测系统及方法 |
| CN119296013B (zh) * | 2024-12-12 | 2025-04-04 | 浙江大华技术股份有限公司 | 一种二次研判方法、二次研判装置以及计算机存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104933463A (zh) * | 2015-07-07 | 2015-09-23 | 杭州朗和科技有限公司 | 深度神经网络模型的训练方法和设备 |
| CN107909147A (zh) * | 2017-11-16 | 2018-04-13 | 深圳市华尊科技股份有限公司 | 一种数据处理方法及装置 |
| CN108875899A (zh) * | 2018-02-07 | 2018-11-23 | 北京旷视科技有限公司 | 用于神经网络的数据处理方法、装置和系统及存储介质 |
| CN109685202A (zh) * | 2018-12-17 | 2019-04-26 | 腾讯科技(深圳)有限公司 | 数据处理方法及装置、存储介质和电子装置 |
Family Cites Families (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8463025B2 (en) * | 2011-04-26 | 2013-06-11 | Nec Laboratories America, Inc. | Distributed artificial intelligence services on a cell phone |
| US10452971B2 (en) * | 2015-06-29 | 2019-10-22 | Microsoft Technology Licensing, Llc | Deep neural network partitioning on servers |
| US11715009B2 (en) * | 2016-05-20 | 2023-08-01 | Deepmind Technologies Limited | Training neural networks using synthetic gradients |
| US20180129900A1 (en) * | 2016-11-04 | 2018-05-10 | Siemens Healthcare Gmbh | Anonymous and Secure Classification Using a Deep Learning Network |
| CN107145946A (zh) * | 2017-03-17 | 2017-09-08 | 华南理工大学 | 一种在不同神经网络结构间进行知识迁移的方法 |
| CN107025440A (zh) | 2017-03-27 | 2017-08-08 | 北京航空航天大学 | 一种基于新型卷积神经网络的遥感图像道路提取方法 |
| US10970138B2 (en) * | 2017-05-09 | 2021-04-06 | Microsoft Technology Licensing, Llc | Modular applications using a common provisioning service |
| US11531932B2 (en) * | 2017-07-06 | 2022-12-20 | Google Llc | Systems and methods for compression and distribution of machine learning models |
| US10652565B1 (en) * | 2017-10-12 | 2020-05-12 | Amazon Technologies, Inc. | Image compression and decompression using embeddings |
| CN108012121A (zh) * | 2017-12-14 | 2018-05-08 | 安徽大学 | 一种边缘计算和云计算融合的实时视频监控方法及系统 |
| CN109993298B (zh) * | 2017-12-29 | 2023-08-08 | 百度在线网络技术(北京)有限公司 | 用于压缩神经网络的方法和装置 |
| CN108564552A (zh) * | 2018-04-28 | 2018-09-21 | 深圳市商汤科技有限公司 | 图像去模糊的方法及装置 |
| CN108629772B (zh) * | 2018-05-08 | 2023-10-03 | 上海商汤智能科技有限公司 | 图像处理方法及装置、计算机设备和计算机存储介质 |
| CN108829683B (zh) * | 2018-06-29 | 2022-06-10 | 北京百度网讯科技有限公司 | 混合标注学习神经网络模型及其训练方法、装置 |
| US11676026B2 (en) * | 2018-06-29 | 2023-06-13 | D5Ai Llc | Using back propagation computation as data |
| KR102606287B1 (ko) * | 2018-09-19 | 2023-11-27 | 삼성전자주식회사 | 애플리케이션의 번역 정보를 제공하는 디바이스 및 방법 |
-
2018
- 2018-12-17 CN CN201811545184.4A patent/CN109685202B/zh active Active
-
2019
- 2019-11-01 EP EP19898280.3A patent/EP3901829A4/en active Pending
- 2019-11-01 WO PCT/CN2019/115082 patent/WO2020125236A1/zh not_active Ceased
-
2020
- 2020-10-29 US US17/083,607 patent/US11689607B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104933463A (zh) * | 2015-07-07 | 2015-09-23 | 杭州朗和科技有限公司 | 深度神经网络模型的训练方法和设备 |
| CN107909147A (zh) * | 2017-11-16 | 2018-04-13 | 深圳市华尊科技股份有限公司 | 一种数据处理方法及装置 |
| CN108875899A (zh) * | 2018-02-07 | 2018-11-23 | 北京旷视科技有限公司 | 用于神经网络的数据处理方法、装置和系统及存储介质 |
| CN109685202A (zh) * | 2018-12-17 | 2019-04-26 | 腾讯科技(深圳)有限公司 | 数据处理方法及装置、存储介质和电子装置 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3901829A4 |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111753761A (zh) * | 2020-06-28 | 2020-10-09 | 北京百度网讯科技有限公司 | 模型生成方法、装置、电子设备及存储介质 |
| CN111753761B (zh) * | 2020-06-28 | 2024-04-09 | 北京百度网讯科技有限公司 | 模型生成方法、装置、电子设备及存储介质 |
| CN113240108A (zh) * | 2021-05-13 | 2021-08-10 | 北京字跳网络技术有限公司 | 模型训练方法、装置和电子设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP3901829A1 (en) | 2021-10-27 |
| US11689607B2 (en) | 2023-06-27 |
| CN109685202B (zh) | 2023-03-21 |
| US20210042889A1 (en) | 2021-02-11 |
| EP3901829A4 (en) | 2022-03-23 |
| CN109685202A (zh) | 2019-04-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020125236A1 (zh) | 数据处理方法及装置、存储介质和电子装置 | |
| CN110263909B (zh) | 图像识别方法及装置 | |
| CN114418121B (zh) | 模型训练方法、对象处理方法及装置、电子设备、介质 | |
| CN116704291B (zh) | 分片并行的模型训练方法、装置、设备及存储介质 | |
| WO2022246986A1 (zh) | 数据处理方法、装置、设备及计算机可读存储介质 | |
| KR20210092138A (ko) | 심층 신경망을 이용한 다중 프레임 이미지 및 비디오 처리를 위한 다중 프레임 상황별 어텐션을 위한 시스템 및 방법 | |
| CN111539353A (zh) | 一种图像场景识别方法及装置、计算机设备以及存储介质 | |
| CN113723161B (zh) | 神经网络模型的训练方法、存储介质及电子设备 | |
| WO2024179510A1 (zh) | 一种图像处理方法及相关装置 | |
| CN113658065A (zh) | 图像降噪方法及装置、计算机可读介质和电子设备 | |
| EP4682774A1 (en) | Federated learning method and related apparatus | |
| WO2025035943A1 (zh) | 语音增强模型的训练方法、装置、设备、介质和程序产品 | |
| US20250150640A1 (en) | Apparatus and method for image encoding and decoding | |
| CN112463391A (zh) | 内存控制方法、内存控制装置、存储介质与电子设备 | |
| CN110211017B (zh) | 图像处理方法、装置及电子设备 | |
| JP7418578B2 (ja) | マイクロ構造マスクを用いたマルチスケールファクタ画像の超解像 | |
| CN110232338A (zh) | 基于二值神经网络的轻量化Web AR识别方法及系统 | |
| CN109005060B (zh) | 一种基于层级化高度异构分布式系统的深度学习应用优化框架 | |
| JP2024087821A (ja) | 圧縮センシングシステム、及び方法 | |
| CN113920023B (zh) | 图像处理方法及装置、计算机可读介质和电子设备 | |
| CN114764744A (zh) | 图像处理模型的训练方法、电子设备及存储介质 | |
| CN118350450B (zh) | 联邦混合域泛化目标检测方法、装置、电子设备及介质 | |
| CN121713485A (zh) | 基于基础图形的网格压缩 | |
| CN102779328A (zh) | 一种图像降噪方法及系统 | |
| CN112887726B (zh) | 图像处理方法和装置、存储介质及电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19898280 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2019898280 Country of ref document: EP Effective date: 20210719 |


